[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XSLT 2.0: On xsl:sequence and xsl:copy-of

Subject: XSLT 2.0: On xsl:sequence and xsl:copy-of
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Fri, 10 Oct 2003 19:57:59 +0200
xsl sequence
In the latest draft of XSLT 2.0 one of the major new additions is the
xsl:sequence instruction.

Although it is not well-explained, one may conclude from the description
that it is used to produce references to nodes as opposed to copies of
nodes. I have some observations and questions about xsl:sequence and
xsl:copy-of in XSLT 2.0:

  O1. The name xsl:sequence is not the best possible name for this xslt
instruction. Now that everything is a sequence in XPath 2.0, the word
sequence has become a buzz word and its overuse (not to say misuse) can only
lead to confusion. If the result of this instruction is placing references
to nodes in the output, then a more exact name would be one of the
following:

    xsl:reference

    xsl:add-reference

    xsl:node-reference


  O2. xsl:sequence does everything that can be done with xsl:copy-of and
these two xslt instructions are mutually redundant.

  Q1. Is there anything that can be accomplished with xsl:copy-of and which
cannot be accomplished by using xsl:sequence?

  Q2. Is there any compelling reason of keeping xsl:copy-of in the language
(apart for compatibility with XSLT 1.0)?

  Q3. Let's have:

    <xsl:variable name="v1">
      <xsl:sequence select="/"/>
    </xsl:variable>
    <xsl:variable name="v2">
      <xsl:sequence select="/"/>
    </xsl:variable>

    <xsl:copy-of select="$v1 except $v2"/>

Should the output of this code be empty or not? If not, what should the
output be?



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL






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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.