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

Newbie: See if a node exists!

Subject: Newbie: See if a node exists!
From: "Américo Albuquerque \(E-mail\)" <aalbuquerque@xxxxxxxxxxxxxxxx>
Date: Fri, 7 Jun 2002 11:51:10 +0100
xsl 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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

Buy Stylus Studio Now

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-2013 All Rights Reserved.