W3C home > Mailing lists > Public > uri@w3.org > December 2007

xpointer fragments and []

From: Jeremy Carroll <jjc@hpl.hp.com>
Date: Thu, 13 Dec 2007 18:58:09 +0000
Message-ID: <476180C1.1030103@hpl.hp.com>
To: URI <uri@w3.org>


I am failing to handle a defect report against my IRI software from an 
end user processing this URI:

http://eg.com/test.txt#xpointer(/unit[5])

This looks to me like a correct use of xpointer, but my software reports 
an illegal character in the fragment, which I take to be the [

I can't see how the RFC 3986 grammar permits it, i.e.


fragment      = *( pchar / "/" / "?" )
pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
                  / "*" / "+" / "," / ";" / "="
pct-encoded   = "%" HEXDIG HEXDIG


seems to give a complete grammar for the fragment, and does not allow [ 
or ].

Is an xpointer fragment indeed illegal in RFC 3986? (and also 3987?)

If not, what have I misunderstood?

Jeremy
Received on Thursday, 13 December 2007 18:58:41 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:11 UTC