Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: for-each problem >Thread Next - Re: for-each problem Re: for-each problemTo: NULL Date: 10/3/2005 1:00:00 PM juergen wrote: > <xsl:for-each select="$PosNums[starts-with(@posNr, "A1234")]"> You really need to look into an XPath and XSLT tutorial, your example XML has <root> <AAA id="1"> <posNr>A1234</posNr> </AAA> <BBB id="1"> <posNr>A1234</posNr> </BBB> and the variable is formed with <xsl:variable name="PosNrs" select="/root//posNr" /> thus there are no attributes posNr which @posNr would select. Instead you could simply do <xsl:for-each select="$PosNums[starts-with(., 'A1234')]"> to iterator over those <posNr> elements where the contents starts with 'A1234'. Please try an XPath and XSLT tutorial to get familiar with that basic stuff. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
