[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: document(a,b) for b not a singleton node set

Subject: Re: document(a,b) for b not a singleton node set
From: Phil Lanch <phil@xxxxxxxxxxxxxxx>
Date: Mon, 29 Nov 1999 20:43:00 +0000
singleton node
David Carlisle wrote:
> 
> Could someone please confirm (or deny) my reading of xslt section
> 12.1...
> 
> If the second argument of document() is a nodeset with more than one
> node, the all but the first node (in document order) have no effect.
> 
> If the second argument is an empty node set, and the string value of the
> first argument is a relative url, then the behaviour is undefined.
> (One might expect that the behaviour in this case is the same as when
> no second argument is given, but I don't see at present how to infer
> that.)

Yes: I don't see how to read it another way.

<rant> Obviously this undefined behaviour is accidental. I think that
for an empty-node-set second argument to give the same behaviour as no
second argument, as you mention, is _easily_ the best candidate for what
was intended. Undefined behaviour leaves no grounds for criticizing an
XSLT processor which adopts _any_ value for the base uri, or which
always returns an empty node set, or which always signals an error. Can
something be done about this? I don't know if this kind of thing is
usually corrected in the errata for a spec, but I don't see why not: it
_is_ an error, and (to be pragmatic) the spec has only been a
recommendation for 2 weeks and I doubt if a "change" now would seriously
inconvenience anyone. </rant>

-- 

cheers

phil

*witness relocation program alumnus*


 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.