PEX15 XPointers with percent escapes: what type of error?

PEX15 XPointers with percent escapes: what type of error?
-----------------------------------------------------------
The original comment is at:
http://lists.w3.org/Archives/Public/www-xml-xinclude-comments/2004Oct/00
08
wherein ERH says:


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.

Received on Wednesday, 23 March 2005 18:06:48 UTC