xsl:sequence

Used within a sequence constructor to construct a sequence of nodes or atomic values. The sequence is returned as a result of the instruction.

Format

<xsl:sequence
               
  select = expression>
               
  [xsl:fallback]
               
</xsl:sequence>
               

            

Description

Unlike most other instructions, xsl:sequence can return a sequence containing existing nodes, rather than constructing new nodes. The items comprising the result sequence are selected using the select attribute. When xsl:sequence is used to add atomic values to a sequence, the effect is very similar to the xsl:copy-of instruction.

Any optional xsl:fallback instructions are ignored by XSLT 2.0 processors, but they can be included to define fallback behavior for XSLT 1.0 processors.

Example

This code produces the output, 37.

<xsl:variable name="values" as="xs:integer*">
               
    <xsl:sequence select="(1,2,3,4)"/>
               
    <xsl:sequence select="(8,9,10)"/>
               
</xsl:variable>
               
<xsl:value-of select="sum($values)"/>
               

            

Why XQuery - The Case for XQuery

Read "The Case for XQuery" - an article that debuted in the November 2005 issue of SOA WebServices Journal, written by Jerry King, Vice President of DataDirect Technologies.

Support for US National Library of Medicine (NLM) Document Type Definitions

Stylus Studio provides support for editing and validating XML documents using US National Library of Medicine data models. In this tutorial, we'll provide a step-by-step overview of how to use the NLM DTD's in Stylus Studio!

XMLSCHEMA-DEV Blog

XML Schema-DEV is an active community for XML Schema-releated development - join the discussion on XML Schema standards, tools, implementations and more. Bookmark this RSS or ATOM feed today!

Stylus Most Wanted

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-2007 All Rights Reserved.