|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: xsl:key and document()
> -----Original Message----- > From: David Carlisle [mailto:davidc@xxxxxxxxx] > > Why wouldn't you want to use a variable? > Actually, its because I keep getting mixed up and asking dumb questions.... For a moment, I forgot that variables were set only within the context, so you could set them again once you left that scope. Because being unable to never change a variable was so alien to me, and because I had to radically change my thinking, I've wound up swinging too far to the left and developed a fear of setting a variable twice in an XSLT. To put it more concisely, I forgot that this was acceptable: <xsl:for-each select="Tag"> <xsl:variable name="TagID" select="@ID" /> <xsl:for-each select="document('LUType.xml')"> <xsl:value-of select="key('LUType', $TagID)" /> </xsl:for-each> </xsl:for-each> Because I knew the xsl:variable would be called multiple times. At least, I'm making fewer silly mistakes per day..... XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








