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

multiple node values not being returned

Subject: multiple node values not being returned
From: Rahil <qamar_rahil@xxxxxxxxxxx>
Date: Fri, 20 May 2005 11:58:34 +0100
xml multiple node
Hi

In trying to solve a problem I have encountered another problem where all the A/Value text are not being returned. Instead only the first A/Value term is being returned.

Heres my code.

<xsl:variable name="map" select="document('input.xml')"/>
<xsl:variable name="interim" select="$map/TopConcept/*[name()=$aTerm]"/> <!-- where $aTerm='Parts' -->
<xsl:message>Interim = <xsl:value-of select="$interim"/></xsl:message> <!-- Interim = Parts Handle Bolt Nut No ClassName --> <xsl:variable name="aVal" select="for $x in $interim/A/Value return normalize-space($x)"/>
<xsl:message>A Val= <xsl:value-of select="$aVal"/> </xsl:message> <!-- A Val = Handle -->
</xsl:variable>


I expect 'A Val' to return 'Hande Bolt Nut' but it only returns 'Handle'.

What could the problem be considering $interim contains all the values correctly ? My input.xml file is attached below:

--------------
input.xml
--------------
<Parts>
  <A>
   <Class id="123" type="none">Parts</Class>
   <Value id="345" type="text">Handle</Value>
   <Value id="456" type="text">Bolt</Value>
   <Value id="567" type="text">Nut</Value>
  </A>
   <B>
   <Class id="none" type="Property">No ClassName</Class>
   </B>
</Parts>

Appreciate any help.

Thanks
Rahil

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.