|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: using boolean to compare id numbers
> > <xsl:template match="user">
> > <xsl:if test="preceding-sibling::user/@uid=@uid">
> > <xsl:message>oops</xsl:message>
> > </xsl:if>
If the XML is large you could use a key:
<xsl:key name="uids" match="user" use="@uid"/>
And then count how many <user>s have the current <user>'s @uid:
<xsl:template match="user">
<xsl:if test="count(key('uids', @uid) > 1))">
<xsl:message>oops<xsl:message>
cheers
andrew
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








