Subject: RE: [xsl] What is the correct behaviour of vendor:node-set($x) when x is empty? From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Fri, 19 Apr 2002 10:03:24 +0100 |
> I cannot reply anything definite, except that Saxon 6.5, MSXML3 and > MSXML4 all work OK with node-set($x), when x is the "empty node-set" > (or should I say the "empty RTF" :o) ). Saxon's node-set() is a no-op when the argument is a node-set, i.e. it just returns the node-set itself; so when applied to an empty node-set, it returns an empty node-set. But what exactly do you mean by an "empty RTF"? There is no such thing. The construct <xsl:variable name="x"/> is defined to evaluate to an empty string. On the other hand <xsl:variable name="y"><xsl:text/></xsl:variable> is defined to evaluate to an RTF consisting of a root node with no children. Saxon's node-set() extension (at least in recent releases), when given a boolean, number, or string as the argument, returns a node-set consisting of a newly-constructed root node that owns a single text node holding the value of the argument, converted to a string. Looking at the code, I fear that saxon:node-set($x) (with $x defined as above) will give you a root node owning a zero-length text node, but I think that's a buglet we can live with. Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx > > And, of course, there's nothing I could find about "what the spec says > about node-set()", as node-set() is an extension function. > > I know that EXSLT is trying to promote a "standard" node-set(). > > Apart from this, could people, who developed XSLT processors share > their opinion what should be the correct behaviour of node-set() in > this case? > > Could we have an agreed specification of it's behaviour? This will > obviously be important for anyone attempting to develop > "portable" XSLT > 1.0 applications while we're waiting for XSLT/XPath 2.0. > > Thanks, > Dimitre Novatchev. > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Tax Center - online filing with TurboTax > http://taxes.yahoo.com/ > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] What is the correct behaviour, Dimitre Novatchev | Thread | [xsl] newbie problem - following-si, Hesselberth, Jan |
RE: [xsl] Replacing images with alt, Michael Kay | Date | RE: [xsl] Problem with API, Michael Kay |
Month |