[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

Subject: Re: RE: What is the correct behaviour of vendor:node-set($x) when x is empty?
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 19 Apr 2002 02:43:01 -0700 (PDT)
empty rtf email
> > 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


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.