XPointers with percent escapes: what type of error?

Section 3.1 states:

Since the xpointer attribute is not a URI reference, %-escaping must not 
appear in the XPointer, nor is there any need for a processor to apply 
or reverse such escaping.

I would normally interpret "must not" as a fatal error. However,

1. This is not linked to 
http://www.w3.org/TR/2004/PR-xinclude-20040930/#dt-must like "must not" 
and "must" in the previous paragraph.

2. Later, the spec says, "An error in the XPointer is a resource error."

I would ask that this sentence be clarified one way or the other. Either 
write, "Since the xpointer attribute is not a URI reference, there is no 
need for a processor to apply or reverse %-escaping in the XPointer; and 
such escaping is a fatal error", or simply write "Since the xpointer 
attribute is not a URI reference, there is no need for a processor to 
apply or reverse %-escaping in the XPointer; and processors must not do 
so."

The latter approach would allow XPointers to contain percent signs that 
were not used for escaping if some as-yet-undefined XPointer scheme 
allowed that. Then the XInclude processor could simply pass the xpointer 
to the XPointer processor and allow the processor to detect any errors 
in the XPointer, all of which could be treated the same (as resource 
errors).

Now that I think about it, this isn't even theoretical. XPointers using 
the xpointer scheme can contain unescaped percent signs, when they're 
not used as parts of IRIs or URIs, which is the case here, For instance

xpointer(//p[@symbol="%"])

In fact, they can even contain things that look like percent escapes, 
and might be in a different context:

xpointer(//a[@href="http://www.example.com/%CE.html"])

Therefore this really needs to be treated the same as all other XPointer 
error conditions, and made a resource error rather than a fatal error.

-- 
Elliotte Rusty Harold  elharo@metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim

Received on Monday, 25 October 2004 09:10:21 UTC