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

 


Help: OASIS Mailing Lists Help | MarkMail Help

cgmo-webcgm message

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


Subject: Re[2]: [cgmo-webcgm] implications of URI vs. IRI


Hi Dieter,

You said:
NOTE: If we required an escaped string inside the CGM now, this will
make almost all existing files invalid ones as soon as a simple space
is in a name attribute.

You are talking about the 'name' attribute within a URI only, correct?
Or, let me rephrase...
Files which have a name attribute (containing a space) that is used in
a URI become invalid, right?

I would be in favor of deprecating (i.e., authors should stop creating
such files) the old behavior (no escaping) and adding 'a la' SVG
wording to the spec. Like Dieter says, but with an emphasis on
deprecating the old behavior.

-- 
 Benoit   mailto:benoit@itedo.com

 
Thursday, October 6, 2005, 7:52:43 AM, Dieter wrote:

DW> All,

DW> I am not yet convinced that we are heading in the right direction here.

DW> Example:
DW> Let's assume we have the string "nihon" inside a linkUri: "id(ÈÕ±¾)"

DW> using UTF-16 (big endian) this is: 65 e5 67 2c (4 Bytes)
DW> converted to UTF-8: EF BB BF E6 97 A5 E6 9C AC (9 Bytes)

DW> and then you can apply escaping for all non-ascii chars

DW> %EF%BB%BF%E6%97%A5%E6%9C%AC (27 Bytes)

DW> and now we store it into the linkURI attribute, however, since
DW> somewhere else in the file we have this string in japanese characters
DW> as an ID, all non-graphical strings will be stored as UTF-16 (could be
DW> UTF-8 as well):

DW> I save the writing, you end up with 54 bytes.

DW> So we are moving from 4 bytes to 54 bytes.

DW> I hope that this accurately describes the procedure that has been discussed
DW> over the past couple of days.

DW> Comparison to SVG:
DW> In 5.3.2. [1], SVG says the following:

DW> "The value of the href attribute must be a URI reference as defined in
DW> [RFC2396], or must result in a URI reference after the escaping procedure
DW> described below is applied. The procedure is applied when passing the URI
DW> reference to a URI resolver."

DW> Interesting to see the last sentence here. IMO this means, it is perfectly
DW> legal to store the URI reference using any encoding, as long as it will be
DW> transcoded to UTF-8 and escaped before passing it on to a URI resolver.

DW> This has always been my understanding, and this is how all of our products
DW> have been handling references.

DW> NOTE:
DW> If we required an escaped string inside the CGM now, this will make almost
DW> all existing files invalid ones as soon as a simple space is in a name
DW> attribute.

DW> RECOMMENDATION:
DW> Amend wording slightly to match watch SVG is doing and allow for both
DW> styles, escaped and not escaped.

DW> Comments?

DW> Regards,
DW> Dieter


DW> [1] http://www.w3.org/TR/SVG11/struct.html#xlinkRefAttrs


>> -----Original Message-----
>> From: Lofton Henderson [mailto:lofton@rockynet.com] 
>> Sent: Wednesday, October 05, 2005 1:06 AM
>> To: Benoit Bezaire; cgmo-webcgm@lists.oasis-open.org
>> Subject: Re: [cgmo-webcgm] implications of URI vs. IRI
>> 
>> At 05:09 PM 10/4/2005 -0400, Benoit Bezaire wrote:
>> >Hi Lofton,
>> >
>> >I just did a quick search... I think that URI is only restricting 
>> >characters to US-ASCII; it has no control on the encoding (utf-8,
>> >utf-16 etc...).
>> >
>> >In XML syntax such as XHTML and SVG, files can have just about any
>> >encoding; I'm not aware of any special processing for the xlink:href
>> >attribute (i.e., this is a URI, change the encoding to _blah_). It
>> >wouldn't make any sense. The scope of the encoding is for 
>> the complete 
>> >document.
>> >
>> >The above is not a fact, only my understanding.
>> 
>> It matches my understanding.  And it is clear that XML and/or 
>> URI (rfc3986) require "URI escaping" for non-ASCII characters 
>> in URIs, i.e., for character that are outside of the ASCII 
>> repertoire.  And this is independent of the character-set 
>> encoding of the URI.
>> 
>> So finally, a URI from HTML into CGM containing a 
>> reference-by-name to "my object group" would be written like this:
>> 
>> <a 
>> href="http://example.org/myCGM.cgm#name(my%20object%20group)">blah</a>
>> 
>> and a WebCGM 'linkuri' first parameter would be this:
>> 
>> http://example.org/myCGM.cgm#name(my%20object%20group)
>> 
>> -Lofton.
>> 
>> 
>> >Tuesday, September 20, 2005, 2:45:48 PM, Lofton wrote:
>> >
>> >LH> All --
>> >
>> >LH> When I was putting together first unicode tests, Dieter also 
>> >LH> supplied me with this nifty "advanced" test.  It gets 
>> into Japanese 
>> >LH> text for SF text like APS ids and names.
>> >
>> >LH> It highlights an interesting implication of our decision 
>> to stick 
>> >LH> with URI instead of switching to IRI.  URI encoding 
>> requires that 
>> >LH> any non-ASCII characters are included by the "URI escaping 
>> >LH> mechanism", see WebCGM
>> >3.1.1.4
>> >LH> [1], and the more detailed XML description [2].  
>> Basically, get the
>> >LH> **UTF8** representation of the characters, and replace 
>> each byte in 
>> >LH> that representation by the 3-character string %HH, where 
>> HH is the 
>> >LH> hex representation of the byte.
>> >
>> >LH> So suppose consider for example the 2-character id of 
>> the object in 
>> >LH> the upper-left box, and its use in a link from the object in the
>> >upper-right box.
>> >
>> >LH> If that id were the two characters c1c2, lets suppose 
>> that it could 
>> >LH> be represented by the 4 utf8 bytes b1b2b3b4 (I'm just guessing
>> >LH> about "4", since UTF8 is variable length, it could be 
>> more).  Then 
>> >LH> to put that id
>> >into
>> >LH> a URI string, it would have to be the 12-character string:
>> >
>> >LH> %hh%hh%hh%hh
>> >
>> >LH> where the hh are the are the 4 pairs of hex digits that 
>> represent 
>> >LH> the 4
>> >LH> utf16 bytes. I.e., the CGM URI for the link would be:
>> >
>> >LH> #id(%hh%hh%hh%hh, view_context)
>> >
>> >LH> Side question.  Does URI (rfc3986 [3]) restrict only the 
>> character 
>> >LH> repertoire of the URI, or does it restrict also the 
>> encoding? I.e., 
>> >LH> can a URI be encoded in ascii, isoLatin1, or utf8, or utf16, or
>> >LH> whatever, as
>> >long
>> >LH> as it restricts its repertoire to the URI repertoire?  I suspect
>> >"yes", but
>> >LH> I don't know the answer.  It would be interesting for someone to
>> >research it.
>> >
>> >LH> Thoughts?
>> >
>> >LH> Regards,
>> >LH> -Lofton.
>> >
>> >LH> [0]
>> >LH> 
>> http://docs.oasis-open.org/webcgm/v2.0/WebCGM20-IC.html#webcgm_3_1_
>> >LH> 1_4 [1] 
>> >LH> http://www.w3.org/TR/2004/REC-xml-20040204/#sec-external-ent
>> >LH> [3] URI:  http://www.ietf.org/rfc/rfc3986.txt
>> >LH> [4] IRI:  http://www.ietf.org/rfc/rfc3987.txt




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