need explain on xsl:syntax for "level: of title

Here should go questions about transforming XML with XSLT and FOP.
Nikky_zhang
Posts: 18
Joined: Thu Jan 21, 2016 10:28 am

need explain on xsl:syntax for "level: of title

Post by Nikky_zhang »

Hi,

My question is about two xsl: syntax, I can not join it with ditamap.

Code: Select all

<xsl:variable name="level"
select="ancestor::*[contains(@class,'topic/topic')]"/>
if the topic with class topic/topic is the first topicref in the ditamap file. I want to know if the topic has ancestor, and who is his ancestor?

Code: Select all

<xsl:when test="count($level)=1 and parent::*/@id[.=//*/chapter/@id]">
could you please explain what "parent::*/@id[.=//*/chapter/@id] doing here?

Thank you very much!

Please forgive that my question is too baisc. I am new to xsl.

Nikky