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

RE: Complex type as the 'xsl:variable/@as' value

Subject: RE: Complex type as the 'xsl:variable/@as' value
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 17 Nov 2005 17:07:10 -0000
xsl complex type
>   Is it not possible to use a complex type as the content of
> a variable?  Why?

I heard someone at XML 2005 earlier this week arguing that they shouldn't
have been called types, because they don't have instances. It would have
been better to call them "structure definitions" or something.

Basically you want to say

as="element(my:list, my:list-type)"

meaning "an element whose name is my:list and whose type annotation is
my:list-type".

The point here is that the value of the variable is an element(), which is a
subtype of node(), which is a subtype of item(). It isn't an instance of
my:list-type; it is an element annotated as having content that matches the
definition of my:list-type. Subtle distinction, I know: if it's any
consolation it took most people on the working group (me included) about
three years before we understood it.

Michael Kay
http://www.saxonica.com/

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.