|
[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
> 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/
|
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








