[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

conditional display of content

Subject: conditional display of content
From: "Ganesh Babu N" <nbabuganesh@xxxxxxxxx>
Date: Tue, 27 May 2008 10:51:31 +0530
 conditional display of content
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.