Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: for-each problem for-each problemTo: NULL Date: 10/1/2005 8:24:00 PM Hallo everyone,
I really can't figure this out.
I want to do the following:
I want to know if a string is more than once in al list of strings.
i have a xml like this:
<root>
<AAA id="1">
<posNr>A1234</posNr>
</AAA>
<BBB id="1">
<posNr>A1234</posNr>
</BBB>
.
.
.
I now want to know if there is a element with a specific posNr twice in the list.
I do that:
<xsl:variable name="PosNrs">
<xsl:copy-of select="/root//posNr"/>
</xsl:variable>
then:
<xsl:for-each select="$PosNrs">
...
</xsl:for-each>
But i get an error. why?
I can't get the for-each to work.
besides i don't know how to get the current item if that would work.
with xslt 2.0 this would be easy.
<xsl:variable name="foundPosNumsIndezes" select="index-of($PosNrs, posNr)"/>
<xsl:choose>
<xsl:when test="count($foundPosNumsIndezes) > 1">
....
can anyone help me please.
thanks very much.
greetings juergen
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
