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

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

Subject: Re: Re: XSLT 2.0: On xsl:sequence and xsl:copy-of
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 13 Oct 2003 10:16:28 +0100
xsl copy anonymous
Hi Dave,

> MK said:
>> XSLT 2.0 can now do this too, for example
>> 
>> <xsl:variable name="e" as="element()*">
>>  <a/><b/><c/>
>> </xsl:variable>
>
> ... and what is the data type of this variable please Mike?

The data type of the variable above is a sequence of zero-or-more
elements.

The 'as' attribute indicates the data type of the variable. Its syntax
is known as a SequenceType -- it describes a sequence of items. The
items are described by an item type, which can be item() (any item), a
node test or the name of an atomic type. The usual occurrence
indicators (?, +, *) mean the usual things (0-or-1, 1-or-more,
0-or-more).

So in this case the items in the sequence are elements (indicated by
the node test "element()") and there can be 0-or-more of them
(indicated by the "*" occurrence indicator).

> the anonymous type?

Your getting your terminology confused somewhere along the line.
Anonymous types are used in XML Schema (contrasting with named types,
which have names). In XML Schema, an element or attribute has a type,
which can be named or anonymous. In XPath 2.0, every type has a name,
but the names of originally anonymous types are
implementation-dependent, so you can't refer to them. (In practice, as
a user, you never have to worry about the names of anonymous types
because there's no way to access them.)

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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.