XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Escaping and Encoding of reserved URI characters inXPointer Framework

On Tue, Jan 22, 2013 at 6:05 PM, Liam R E Quin <liam@w3.org> wrote:
> On Tue, 2013-01-22 at 17:33 -0800, David Sheets wrote:
>> Maybe someone on this list can clarify the question below?
>>
>> Sent <http://lists.w3.org/Archives/Public/www-xml-linking-comments/2013JanMar/0000.html>
>> 5 days ago to <mailto:www-xml-linking-comments@w3.org> without
>> response:
>
> Note, the XML Core Working Group only meets every other week.

Ok. I thought maybe my question was answerable off-hand.

>>
>> Reading <http://www.w3.org/TR/xptr-framework/#escaping>, I am left
>> with the impression that the number sign (#), percent sign (%), and
>> square bracket characters ('[', ']') do NOT need to be escaped in a
>> fragment identifier subscribing to the XPointer Framework.
>
> This would not be a correct impression.
>>
>> Have I understood this correctly? Does XPointer Framework actually
>> recommend a fragment identifier syntax that contradicts RFC 2396 and
>> its revision RFC 3986?
>
> No. See the examples in 4.2 Examples of Escaping. It depends on the
> context in which the XPointer occurs, though. In an XML document,
> #xpointer(id('r&#xE9;sum&#xE9;'))
> is given as an example, but the #-signs here would be treated as part of
> numeric character references by the XML processor before the link was
> actually used.

Ok. This makes sense.

> The phrase, "except for the number sign (#) and percent sign (%) and the
> square bracket characters re-allowed in [RFC 2732]." could have been
> written, "except for the number sign (#) and percent sign (%), and for
> the square bracket characters re-allowed in [RFC 2732]." and is in the
> paragraph about turning an IRI into a URI. You don't escape the # in an
> IRI when turning it to a URI because it marks the start of the fragment
> identifier. Other #-signs were already escaped when the IRI was
> constructed.

This is not mentioned in Context B. Context B only mentions percent
sign (%) as an IRI reserved character that should be escaped. From
4.1.B:

<blockquote>
Thus, when a pointer is inserted into an IRI reference, any
occurrences of percent signs (%) must be escaped. Other characters may
be escaped as well, though it is not recommended. Characters are
escaped as follows:
</blockquote>

I think this section should recommend escaping all characters that are
not in the IRI fragment production (including the
hash/hatch/number/pound/sharp/cross/octothorp/tictactoe sign (#)). Is
that correct?

> Yes, escaping is a huge mess in XPointer, at least in part becaue IRI
> syntax is a mess.

They're called URLs now, haven't you heard? :-P

Gratefully,

David

> Liam
>
> --
> Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
> Pictures from old books: http://fromoldbooks.org/
> Ankh: irc.sorcery.net irc.gnome.org freenode/#xml
>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS