Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: quiz on select vs copy-of

From: "Dimitre Novatchev" <dnovatchev@-----.--->
To: xml-dev@-----.---.---
Date: 9/1/2005 8:10:00 PM
"Oleg A. Paraschenko" <olpa@x...> wrote in message 
20050901234512.0967075d.olpa@x...">news:20050901234512.0967075d.olpa@x......
>  Hello,
>
>  do you know the dark corners of XSLT? Here is one. Compare two
> variables:
>
> <xsl:variable name="v1" select="some-xpath"/>
> <xsl:variable name="v2"><xsl:copy-of select="some-xpath"/></xsl:variable>
>
>  Are "v1" and "v2" the same? I mean: can "v1" and "v2" be used in a
> program interchangeably? Answers:
>
> 1) yes
> 2) no
> 3) implementation-dependant


This is something fundamental and not a dark corner at all.

This is an XSLT FAQ  asked for very frequently in the xsl-list where such 
questions must be directed to.

As defined above, the value of "v1" is of type node-set, while the value of 
"v2" is of type RTF (in XSLT 1.0) or document node (in XSLT 2.0).


There are excellent books by Michael Kay and Jeni Tennison on XSLT (1.0 and 
2.0) and XPath (1.0 and 2.0), which cover in details such questions.

Also, the XSLT FAQ of David Pawson is another great place to look at.


Cheers,
Dimitre Novatchev.


transparent
Print
Mail
Like It
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.

.
.

transparent

transparent