[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Newbie: See if a node exists!
Hi! I have two xml file the first has this format <Display> <Path/> <Title/> <Book> <Author/> <Author/> ... </Book> <Book> <Author/> <Author/> ... </Book> ... </Display> the second has a <Block> tag separating the <Book> tags like this <Display> ... <BLOCK> <Book> ... </Book> ... </BLOCK> ... </Display> What i what is a way to see if a <Block> tag exists and, in that case, just work with the <Book> inside the <Block> if not then work with the <Book> I use this xsl to do that but it doesn't do the Block Part <xsl:choose> <xsl:when test="./BLOCK"> <xsl:call-template name="Title"/> <xsl:apply-templates select="BOOK"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="BookHeader"/> <xsl:apply-templates select="BOOK[not (@destaque=-1)]"/> </xsl:otherwise> </xsl:choose> What am I doing wrong? Thanks in advance! ____________________________________________________________________________ ____ () Chain Sword VROOOOMMMMM ___||_______________________ VROOOMMMM (0___||______________________/ VROOOOMMMM ||~~~~~~~~~~~~~~~~~~~~~~ () "It cuts every thing with a roar" www.geocities.com/Area51/6986 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|