Re: [xsl] Content constructors and sequences

Subject: Re: [xsl] Content constructors and sequences
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 9 Jan 2002 14:06:08 GMT
> According to the XPath 2.0 WD
that's cheating: reading the spec gives you an unfair advantage.
(Actually I realised that after I posted, perhaps I read that bit of teh
spec too at some time:-)

> I don't like the fragility of adding/removing a type attribute having
> such a big impact on how the variable-binding element is interprete

agreed.
An alternative would be to say that xsl:item worked in xsl:variable a
similar way to xsl:attribute in an element:

Namely that any number or xsl:item's are allowed but none are allowed
once any part of the sequence has been constructed without using xsl:item.
then, one could say that if xsl:variable has constructed a sequence of
xsl:item's then the result is a sequence consisting of the item values.
Otherwise it's a sequence consisting just of a document node, the
document node having content the constructed sequence from xsl:variable.

> Looks like you didn't finish this sentence? ;)
It finished in my head, just my typing didn't follow my intentions.
Not like me, is it...

> Namespaces are fairly free-floating, I think (they
> don't belong to a document).

but you need to put them _somewhere_ if you generate an attribute node
that has name being a Qname involving a prefix then really you need to
have some method of reaching some namespace node which maps that prefix
to a namespace (well you don't have to have but things gettricky
otherwise) in xslt1 you can always go to the parent element and then
find such a namespace node in the namespace axis. If the attribute node
is off on its own it isn't so clear what to do.

David


_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread