OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

xri-editors message

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

Subject: RE: [xri-editors] Xref escaping rules

I assumed we would escape iteratively, once for each level of nesting

1) Embed http://foo.com?id=21#bar in xri:@foo/baz as a cross-reference

a) Escape cross-reference to get

b) Add as cross-reference

When the cross-reference is extracted, it's unescaped to


2) Embed http://foo.com?id=21-%28widget#bar in xri:@foo/baz as a

a) Escape the cross-reference to get

b) Append as cross-reference

When the cross-reference is extracted, it's unescaped to


3) A complex nested example. Embed http://foo.com?id=21-%28widget in
xri:+foo.bar.<xref>, which is in turn embedded in xri://foo.bar/<xref>/baz

a) First escape the innermost cross-reference to get

b) Add as cross-reference

c) Escape the cross-reference to get

d) Add as cross-reference

When the XRI is evaluated, the outermost cross-reference is extracted


And unescaped to give


The next level cross-reference is extracted


and unescaped to give 



-----Original Message-----
From: Wachob, Gabe [mailto:gwachob@visa.com] 
Sent: Monday, June 30, 2003 9:19 AM
To: 'Drummond Reed'; xri-editors@lists.oasis-open.org
Subject: RE: [xri-editors] Xref escaping rules

	This seems pretty reasonable. 

	Have you considered the case where you have two levels of cross
referencing? That is, a cross reference which contains an XRI value that
itself has a cross reference? 






I think you need to amend the rules about escaping/unescaping to account for


> -----Original Message-----
> From: Drummond Reed [mailto:drummond.reed@onename.com]
> Sent: Sunday, June 29, 2003 1:15 PM
> To: xri-editors@lists.oasis-open.org
> Subject: [xri-editors] Xref escaping rules
> Here's the escaping proposal that I brought up on the last TC call.
> The issue is that an XRI or URI is used as a cross-reference 
> may contain
> characters that must be escaped in order to conform with 2396.
> Specifically:
> * "?" may not appear until the start of the one-and-only query segment
> allowed by 2396.
> * The same is true with "#" for fragments
> * Lastly, an UNMATCHED opening or closing paren must be 
> escaped or else
> the cross-reference will not parse correctly. (Note that 
> MATCHED opening
> and closing parens inside do not need escaping because they represent
> either a second-level nested cross-reference or a parenthetically
> enclosed string in a native URI but either way will not be ambiguous.)
> However we can't use just 2396 escaping rules (i.e., "%xx" where xx is
> the hex value of the character) for these four characters 
> because it if
> the embedded XRI or URI contained those same escape sequences 
> natively,
> it would be ambiguous which to unescape and not to unescape when the
> cross-reference is extracted. For example, if a URI already contained
> the escape sequence %3F (the "?" character) before it was 
> turned into a
> cross-reference, how would the parser know NOT to unescape it when
> extracting the cross-reference?
> The proposed solution is to apply two special escaping rules to any
> URI/XRI string being embedded as a cross-reference. They must 
> be applied
> in the following order:
> 1) Parse the string to find any instance of "%3F", "%23", "%28", or
> "%29" and enclose these in parens. Example: "(%3F)".
> 2) Escape any "?", "#", or UNMATCHED paren as per 2396 escaping.
> Example: a URI that contained a query would have the "?" turned into
> %3F.
> To extract a cross-reference, apply the same two rules in 
> reverse, i.e.:
> 1) From the extracted cross-reference, escape any instance of 
> %3F, %23,
> %28, or %29 EXCEPT those enclosed in parens.
> 2) For any instance of "%3F", "%23", "%28", or "%29" enclosed 
> in parens,
> remove the parens.
> Example: 
> Embed: URI "http://foo.com/?id=21#bar" in XRI "xri:@foo/baz/"
> Result: "xri:@foo/baz/(http://foo.com/%3Fid=21%23bar)"
> Embed: URI "http://foo.com/?id=21-%28widget#bar" in XRI 
> "xri:@foo/baz/"
> Result: "xri:@foo/baz/(http://foo.com/%3Fid=21-(%28)widget%23bar)"
> Does this work for everyone? Any other proposals?
> =Drummond 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xri-editors-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: xri-editors-help@lists.oasis-open.org

To unsubscribe, e-mail: xri-editors-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: xri-editors-help@lists.oasis-open.org

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