OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   quiz on select vs copy-of

[ Lists Home | Date Index | Thread Index ]
  • To: xml-dev <xml-dev@lists.xml.org>
  • Subject: quiz on select vs copy-of
  • From: "Oleg A. Paraschenko" <olpa@xmlhack.ru>
  • Date: Thu, 1 Sep 2005 23:45:12 +0400
  • Organization: xmlhack.ru

  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

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

  The right answer is (2): no. Changing a use of "v1" to "v2", or reverse,
might change the result of a stylesheet. I'll post an example later. Or
you can provide your version.


-- 
Oleg Paraschenko  olpa@ http://xmlhack.ru/  XML news in Russian
http://uucode.com/blog/  Generative Programming, XML, TeX, Scheme




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS