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

Re: XSLT 2.0: When to use xsl:sequence, when to use x

Subject: Re: XSLT 2.0: When to use xsl:sequence, when to use xsl:value-of, and why?
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Sat, 16 Jun 2007 18:18:45 +0200 (CEST)
Re:  XSLT 2.0: When to use xsl:sequence
"M. David Peterson" wrote:

  Hi David

> In XSLT 2.0, when should I use xsl:sequence, when should I use  
> xsl:value-of, and why?

  The difference is quite simple: xsl:sequence returns the result of
the evaluation of an XPath expression (that is, a sequence), while
xsl:value-of creates one new fresh text node from a sequence.  The
exact rules to build the text node value from a sequence of item()* are
described there:


  You can also trying the following stylesheet, then replace
xsl:value-of by xsl:sequence:


      <xsl:variable name="elem" as="element()">
        <elem a="value"/>

      <xsl:template match="/">
        <xsl:sequence select="$elem/@a"/>




Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

Current Thread


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.
First Name
Last Name
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.