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] ISSUE: delimited string inconsistency?


At 11:24 AM 5/4/2005 -0400, Benoit Bezaire wrote:
[...]
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?

I was talking DOM string value.  I guess we need to answer the question also for XCF, and I think the answer should be the same. 


2) I wonder how much importance should be put into parsing the string
values in JS? Who wants to do that?

Good question.  It is why I asked about the options -- I don't recommend that we make life simple for JS parsing, if it means significant tradeoff elsewhere.

 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?

Yes,
"  0 0   100       100  ".split(" ")
results in lots of empty 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).

Agreed.

And in
XML, a wsp+ is (#x20 | #x9 | #xD | #xA)+. Thus my preference for
option 2.

Okay.  Using regular expressions, this JS works (tested on "  0\t\t 0\n100     100\n"):

var wsp = /[\x20\x09\0D\x0A]+/;
var nbrs = obj2.getAppStructureAttr("viewcontext").split(wsp);

So JS parsing convenience isn't the issue.

I don't care strongly.

-Lofton.


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