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: ISSUE: delimited string under-specified


Dave,

Please record this question/issue.  It is a small leftover from a previous thread -- I just want to make sure it doesn't get lost.  (No time to deal with it right now.)

Two parts:  More specification is needed in the document, for valid characters in delimited strings (5.5); and, there is a question needs answering, about escaping "problematic" characters within delimited strings.

Valid characters in delimited strings:
----------
In 5.5, there is a note, "need a link for ValidChar". That character set would be the union of:
1.) valid characters of 'name' ApsAttr
2.) valid characters occurring in linkuri ApsAttr, of 3 subparts:
a. URI (or IRI, if we should decide to go that way)
b. 'linkTitle'
c. behavior
3.) valid characters for "number" (in 'region').

Escaping characters in delimited strings:
----------
Does #2b present us with any problems? E.g., what would be the JS call for setAppStructureAttr for this 'linkuri'?
-- uri: http://www.itedo.com/tc.cgm
-- title: Benoit's test
-- behavior: _replace

For the moment, ignoring APOSTROPHE in Benoit's,
Opt-a (JS string parameter is APOSTROPHE enclosed): 
setAppStructureAttr('"http://www.itedo.com/tc.cgm"  "Benoit's test"  "_replace"')
Opt-b (JS string parameter is QUOTE enclosed):
setAppStructureAttr("'http://www.itedo.com/tc.cgm'  'Benoit's test'  '_replace'")

In Opt-a, the APOSTROPHE in Benoit's interacts with the JS parameter-enclosing APOSTROPHEs, so it must be JS-escaped:  Benoit\'s.

In Opt-b, all of the APOSTROPHEs including Benoit's simply look like characters in the QUOTE-enclosed JS string parameter.  But DOM implementation would have trouble with Benoit's.

So Opt-a is usable (and necessary) in this example.  If the 'title' were changed to: 
title:  Viewer says, "invalid" 
then Opt-b would be usable (and necessary), with QUOTE escaping in the title:  \"invalid\"

If the title needed to contain both an APOSTROPHE and a QUOTE ... well, neither Opt-a nor Opt-b works.  I think we couldn't avoid ambiguous situation at DOM implementation (parsing) level.

Question:  Do we need a DOM-specific escaping rule in our definition of delimited string (5.5)?  E.g., In Opt-a, JS would pass Benoit\\\'s to the DOM implementation as Benoit\'s, and the rule at the DOM implementation level could be that \ is the escaping character. 

Or ... shall we just document a limitation that your data in delimited strings ('name', 'linkuri', ...) cannot contain *both* QUOTE and APOSTROPHE data?

-Lofton.

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