Altova Mailing List Archives


[xsl] Attribute/Variable syntax asymmetry (was SAXON: Generate 10 elements per page)

From: "Willink, Ed" <Ed.Willink@--------------->
To:
Date: 2/16/2004 8:29:00 AM
Hi David

> 	<xsl:variable name="value1">
> 		<xsl:value-of select="field1"/>
> 	</xsl:variable>
> 
> why do people keep doing that?

It's because of the syntax asymmetry with xsl:attribute which,
until the Nov 2003 XSLT 2 draft, required a value-of to do a select.
In practice, that means all XSLT implementations since not even
Saxon 7.8 implements select for xsl:attribute.

	Regards
			
		Ed Willink

> -----Original Message-----
> From: David Carlisle [mailto:davidc@xxxxxxxxx]
> Sent: 16 February 2004 10:15
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [xsl] SAXON: Generate 10 elements per page
> 
> 
> 
> 	<xsl:variable name="value1">
> 		<xsl:value-of select="field1"/>
> 	</xsl:variable>
> 
> why do people keep doing that?
> It is a lot of typing and causes the processor to be quite 
> inefficient,
> building up a result tree fragment.
> 
> You should always just do
> 
> 
> 	<xsl:variable name="value1" select="field1"/>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.