xsl-list
[Top] [All Lists]

multiple node values not being returned

2005-05-20 03:58:34
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--