|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Comparing nodes in axis
> > As a side question, i tend to make things like > > > > <xsl:if test="parent::menu=(//menu)[$pos]"> > > <xsl:text>1</xsl:text> > > </xsl:if> > > <xsl:if > test="not(parent::menu=(//menu)[$pos])"> > > <xsl:text>0</xsl:text> > > </xsl:if> > > > > Is there any drawback in doing this insted of choose/when/otherwise? Yes, you're writing more code and the XSLT processor is executing more code. In fact, assuming you've got the boolean condition right, you could replace this whole thing by <xsl:value-of select="number(parent::menu=(//menu)[$pos])"/> Michael Kay http://www.saxonica.com/
|
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








