|
[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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








