Subject: [xsl] conditional display of content From: "Ganesh Babu N" <nbabuganesh@xxxxxxxxx> Date: Tue, 27 May 2008 10:51:31 +0530 |
Dear All, This is the XML file: <pbl:cast xml:id="dea0000038"> ..... ...... <pbl:castmember xml:id="dea0000042"> <db:person xml:id="dea0000043"> <db:personname>Katherine Alexander</db:personname> </db:person> <pbl:role xml:id="dea0000044"> <db:personname>LINDA</db:personname> </pbl:role> </pbl:castmember> ...... ....... </pbl:cast> ...... ..... ..... ..... <pbl:speaker xml:id="dea0000111"><pbl:roleref xlink:role="http://docbook.org/xlink/role/olink" xlink:href="9780141182742_DeathSalesman_001_INC.xml#dea0000044"/></pbl:speaker> ...... .... ..... <pbl:speaker xml:id="dea0000111"><pbl:roleref xlink:role="http://docbook.org/xlink/role/olink" xlink:href="9780141182742_DeathSalesman_001_INC.xml#dea0000044"/></pbl:speaker> My requirement is to display the corresponding the role/personname in the speaker tag. The condition is id and href should match. <xsl:template match="pbl:roleref> <xsl:if test="substring-after(@href),#) = //pbl:castmember/pbl:role/@xml:id"> <xsl:value-of select="//pbl:castmember/pbl:role/personname"/> </xsl:if> </xsl:template> I am not getting the output. Please let me know where I am going wrong. Regards, N. Ganesh Babu
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Filtering duplicate tags, Mukul Gandhi | Thread | Re: [xsl] conditional display of co, Andrew Welch |
[xsl] Filtering duplicate tags, Buddhi D. Mahindarat | Date | Re: [xsl] Filtering duplicate tags, Mukul Gandhi |
Month |