[jsdl-wg] Issues for the teleconference tomorrow
Andreas Savva
andreas.savva at jp.fujitsu.com
Tue Mar 8 02:35:44 CST 2005
Karl Czajkowski wrote:
> On Mar 08, Andreas Savva loaded a tape reading:
>
>>Karl, Michel
>>
>>Karl Czajkowski wrote:
>>
>>>On Mar 07, Michel Drescher loaded a tape reading:
>>>
>>>
>>>
>>>>1) Argument list handling in jsdl:Application
>>>>Basically, the modeling of command line arguments in a whole string is
>>>>... cumbersome? I know, it works, but it looks ugly.
>>
>>Michel, I think the word you were looking for was 'simple.' ;-)
>>
>
>
> It is "simple" right up until you need to pass through strings that
> have your separator whitespace, or quote marks, or what have you
> embedded in one program argument! I think it is much simpler to
> maintain structured data than it is to try to embed funny
> serializations of structured data into the JSDL info set model. This
> is particularly so when a consumer of this document needs to translate
> the structure into some arbitrarily different structure or serialized
> syntax to safely pass it through local implementation layers.
It's 'simple' and covers many cases but complicated cases make it very
complex. :-) Your description of the problems is good and I like having
the extra structure.
I know argument parsing is a black art. I think our assumption might
have been that the contents would go through as-is, unseen and untouched
and not our problem.
(We did actually allow more than one argument in the distant past.)
Andreas
>
> That was certainly our experience in trying to make GRAM RSL sane... I
> often regretted the fact that we didn't use as much explicit
> parenthetic grouping for arguments as we did for environment
> variables, because users often made bad assumptions about where the
> argument strings were separated versus treated as one string that
> needed to be "reparsed". Our (pre-WS) RSL parser explicitly
> represented a sequence of strings in the right-hand side of the
> "arguments" clause parse, and we had a somewhat standard whitespace,
> quoting, and quote-escape mechanism to allow people to express any
> possible argument list.
>
> For example:
>
> (arguments= foo bar baz )
>
> was a shorthand for:
>
> (arguments="foo" "bar" "baz")
>
> and you could get whitespace or a stray quote in with:
>
> (arguments="foo bar" "baz""spliced")
>
> which would render as this in the current proposal:
>
> <arguments>
> <argument>foo bar</argument>
> <argument>baz"spliced</argument>
> </arguments>
>
> which I certainly think is more obvious than the RSL way. :-)
>
> I suppose the only tricky one now would be getting angle brackets in
> there:
>
> <argument><not a tag></argument>
>
>
> karl
>
--
Andreas Savva
Fujitsu Laboratories Ltd
More information about the jsdl-wg
mailing list