[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re[2]: [cgmo-webcgm] ISSUE: delimited string inconsistency?
Hi Lofton, I have a few questions that need to be answered before I can provide my opinion. 1) Are we talking about the DOM string value? the XCF string value? or both? 2) I wonder how much importance should be put into parsing the string values in JS? Who wants to do that? I can see a lot of get/set calls, but I expect they will be done without the actual parsing ex: obj1.setAppStructureAttr( "viewcontext", obj2.getAppStructureAttr( "viewcontext" ) ); 3) Would the following string "0 0 100 100" (contains two spaces between 0 0), give your 'split' method a hard time? Would you end up with an empty string for one of the strings? My opinion is that I would like for the XCF string value to be the same as DOM string value (or else I have to duplicate code). And in XML, a wsp+ is (#x20 | #x9 | #xD | #xA)+. Thus my preference for option 2. -- Benoit mailto:benoit@itedo.com Wednesday, May 4, 2005, 10:08:33 AM, Lofton wrote: LH> All, LH> Now that I have actually had to use it in a test, let's put LH> this on thequeue for quick resolution... LH> At 10:22 AM 4/27/2005 -0500, Don Larson wrote: LH> [...] >> Before fixing table 5.7.6, we ought to decide on this... LH> I think that delimiting each number requires a lot of extra LH> typing by coder and it not as readable as "0 0 100 100" LH> I think I prefer wsp to commas. LH> I think everyone probably agrees that it (DOMstring LH> representation of'viewcontext' and 'region' rectangles) should be LH> a single string as opposed to a "delimited string" (per WebCGM LH> 5.5). The latter is unnecessarily complex for these values. LH> I don't feel strongly about the separator of the 4 numbers in LH> the string(i.e., if it is not empty string) -- with the JavaScript LH> String.split() method, it is not hard to do any of the obvious LH> options. For my first test, I just assumed " " (#1 below, single LH> blank) for expedience. LH> However, let's agree soon on a standard correct syntax. Do wewant: LH> 1.) single blank? [ "0 0 100 100".split("") is simplest possible code. ] LH> 2.) wsp as defined in 5.5? [ (#x20 | #x9 | #xD | #xA)+] LH> 3.) single comma? [ "0,0,100,100".split(",") is likewise simplest. ] LH> 4.) other? (one or more blanks? comma w/ optional blanks?...?) LH> Option 2 is user-flexible, but requires a regular expression LH> as the 'split' argument (which is okay, just more coding). It LH> allows things like this: LH> "0 LH> 0 LH> 100 100 " LH> (There are blanks, tabs, and newlines in that string, as allowed by#2.) LH> I prefer simplest (single blank) but can live with any LH> unambiguous solution. Let's decide. LH> Thoughts? LH> -Lofton.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]