Subject: [xsl] [XSL]Selecting Sibling from the Top of the Tree From: Alice Ju-Hsuan Wei <ajwei@xxxxxxxxxxx> Date: Thu, 25 Oct 2007 23:40:55 -0400 |
<xsl:template match="book"> <div> <p> <span class="booklist"> Topic: <xsl:call-template name="print"/> </span> <xsl:apply-templates/> </xsl:template>
<xsl:choose> <xsl:when test="count(ancestor::subject) > 1 "> <xsl:if test="preceding-sibling::subject !=''"> [Also Used for: <xsl:value-of select="."/>] </xsl:if> <xsl:if test="following-sibling::subject !=''"> [Also Used for: <xsl:value-of select="."/>] </xsl:if> <xsl:value-of select="id(@topic)"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="id(@topic)"/> </xsl:otherwise> </xsl:choose> </xsl:template>
[---------- The portion is in the header section 6 levels away from the <book> <topicList> <subject xml:id="tech">Technology</subject> <subject xml:id="res">Resource</subject> <subject xml:id="progr">Programming Language</subject> </topicList> --------------]
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Calling subdocuments with, Steven Ericsson-Zeni | Thread | Re: [xsl] 'number-rows-spanned' doe, Kavita Surana |
[xsl] Calling subdocuments with pro, Steven Ericsson-Zeni | Date | RE: [xsl] current()/self::* vs ".", Michael Kay |
Month |