[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: RE: What is the correct behaviour of vendor:node-s
> > 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. Maybe something as $vrtf-Empty as defined bellow: <xsl:variable name="vrtf-Empty"> <xsl:copy-of select="/.."/> </xsl:variable> This could be an XPath expression, whose value (an empty or non-empty node-set) depends on the values of the variables it references. In such case, it is not obvious whether an RTF is empty or not, therefore it would require the programmer to always test for non-emptiness before applying the node-set() function, if an empty argument (empty RTF) was not allowed. This would be ***extremely inconvenient***. > > 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. If this is a buglet, then using a "correct" processor would be extremely inconvenient -- see the preceding explanation. Therefore, would it be possible, ***please***, to produce a short, one-paragraph specification for vendor:node-set(), which says that it should also accept node-sets, including the empty one? I regard this as a "mini-EXSLT", just covering the vendor:node-set() function, which is a de-facto standard, but appears to lack a specification... Maybe Jeni could do this and include appropriate text in EXSL, if nobody has any objections? Cheers, Dimitre. __________________________________________________ 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
|
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
|