W3C home > Mailing lists > Public > www-xml-xinclude-comments@w3.org > June 2003

Re: NIST test 33 and non-existent subresources

From: Daniel Veillard <daniel@veillard.com>
Date: Wed, 11 Jun 2003 20:06:13 +0200
To: Elliotte Harold <elharo@metalab.unc.edu>
Cc: www-xml-xinclude-comments@w3.org, "sandra.martinez" <sandra.martinez@nist.gov>
Message-ID: <20030611180613.GY12271@daniel.veillard.com>

On Sat, Jun 07, 2003 at 03:38:01PM -0400, Elliotte Harold wrote:
> NIST test 33 points to a subresource that doesn't exist using an element 
> scheme:
> <include xmlns="http://www.w3.org/2001/XInclude"
>       href="../ents/ptrtst.xml#element(chapter)"/>
> It claims this is a fatal error. I don't think this is obvious based on 
> section 4.1. Since an XPointer may select multiple nodes from an XML 
> document, it seems reasonale that it may also select nothing. The 
> XPointer element framework spec states "failure to identify an element 
> results simply in no subresource being identified by this pointer part 
> rather than an XPointer Framework error." Thus I'm not sure that this 
> should really throw a fatal error rather than simply including nothing. 
> If it is the intention that this throw a fatal error, then section 4.1 
> of the XInclude spec should spell this out more explicitly.

  Problem is that in that case all xpointer scheme evaluations failed.
The Xpointer framework spec section 3.3 Scheme-Based Pointer

"When multiple pointer parts are provided, an XPointer processor must
evaluate them in left-to-right order. If the XPointer processor does not
support the scheme used in a pointer part, it skips that pointer part. If
a pointer part does not identify any subresources, evaluation continues
and the next pointer part, if any, is evaluated. The result of the first
pointer part whose evaluation identifies one or more subresources is
reported by the XPointer processor as the result of the pointer as a
whole, and evaluation stops. If no pointer part identifies subresources,
it is an error."

 all schemes have been evaluated, none identified a subresource, it's
an XPointer error. 
 I think the wording you pointed is needed to avoid generating an XPointer
error when one scheme fails but another may suceed, like


  you don't want xpointer(id('foo')) failure to locate a subresource to
actually lead to a full XPointer evaluation error. The error is only
raised if all schemes failed.

  IMHO and assuming XPointer didn't change too much since I worked on it :-)


Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | 
Received on Wednesday, 11 June 2003 14:06:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:09:33 UTC