W3C home > Mailing lists > Public > public-xml-core-wg@w3.org > March 2005

PEX15 XPointers with percent escapes: what type of error?

From: Paul Grosso <pgrosso@arbortext.com>
Date: Wed, 23 Mar 2005 12:38:10 -0500
Message-ID: <F13E1BF26B19BA40AF3C0DE7D4DA0C0303BDF4FE@ati-mail01.arbortext.local>
To: <public-xml-core-wg@w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:32 GMT