OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] XSLT stylesheet looping through the same node (recursion?)

We are finally seeing the light at the end of this tunnel. I managed to extract every element values in <p> (single/multiples) except one with the following structure:




<a shape="rect" href="http://www.hobbies.com/fishing" title="Shark Hunting">Coral Bay</a>




I tried the following combinations to get the value 'fishing' without much luck:


<xsl:template match="ns:p[ns:strong='Hobbies:']">

<xsl:for-each select="text()[normalize-space() != '']">

<hobbies><xsl:value-of select="normalize-space()"/></hobbies>




This should work. But you said that <hobbies><xsl:value-of select="../ns:a"/></hobbies> works (starting from the <strong> element). I would expect that to return <hobbies>Coral Bay</hobbies>. Are you sure the input is what you say it is?

Michael Kay


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS