[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: [XSLT 2.0] Creating a changeable globally scoped v
> -----Original Message----- > From: Roger L. Costello > > I need to write a stylesheet which dynamically alters the value of a > globally scoped variable. > Hi, To keep it short: that is impossible. I have quite a hard time trying to understand from your description what exactly your requirements are, so it would be a big help if you could more precisely describe what you are after... > Some thoughts come to mind: > <snip /> > > 2. Create a range variable with a sequence of values. From reading the > specs this seemed promising. Here's an example of how this might work: > > <xsl:template match="/"> > <xsl:value-of select="for $i in (1 to 10) return (ex:print())"/> > </xsl:template> > > <xsl:function ex:print"> > <xsl:value-of select="$i"/> > </xsl:function> > If it's something this simple, why not do for instance: <xsl:variable name="i" select="document('vars.xml')/*/number[. > 0 and . <= 10]" /> Where the document vars.xml consists of nodes representing numbers, then have a template matching them <xsl:apply-templates select="$i" /> ... <xsl:template match="number"> <xsl:value-of select="." /> </xsl:template> Hope this gives you an idea... Cheers, Andreas 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
|