[x3d-public] MFString quotes

Andreas Plesch andreasplesch at gmail.com
Wed Mar 15 04:28:19 PDT 2017


Thanks Leonard.

While the multiple child form would be cleaner, it would be a bigger change
and backwards incompatible. But it would help, I agree.

What Yves and me are suggesting is a much smaller, backwards compatible
adjustment by allowing outer double quotes in addition to single quotes,
following XML.

Now: geoSystem = ' "GD" "CC" '
also allowed now(?): geoSystem = ' "GD" "CC" ' (since
the spec. only mentions double quotes which may be represented by its XML
entity)

Suggestion: relax to: " "GD" "CC" "

I also agree that entities are ugly but that is true for any XML document.

Another idea may be to allow of use some other rarely used character as
delimiter for MFStrings such as bar | :
geoSystem = ' |GD| |CC| '

-Andreas

Date: Tue, 14 Mar 2017 19:57:23 -0700

> From: Leonard Daly <Leonard.Daly at realism.com>
> To: x3d-public at web3d.org
> Subject: Re: [x3d-public] MFString quotes
> Message-ID: <87202915-313c-5a4b-56ae-3530eae48261 at realism.com>
> Content-Type: text/plain; charset="windows-1252"; Format="flowed"
>
> Andreas,
>
> > http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/
> EncodingOfFields.html#SFString
> > <http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/
> EncodingOfFields.html#SFString>
> >
> > clearly states:
> > The MFString specifies zero or more SFStrings enclosed in single
> > quotes (e.g., '"string1" "string2"').
> >
> > ...
> >
> > This makes it hard to conform exactly to the X3D XML encoding
> > standard. I am not sure why X3D imposes this use of quotes.  XML
> > allows for both single and double quotes as outer quotes, and the
> > quotes used in the value could still be specified as double quotes.
> > They just need to be escaped as entity if double quotes are used as
> > outer quotes.
>
>
> This was done to be like VRML where each item had to be double-quoted.
> There was lots of discussion at the time, especially if an MFString
> contained exactly one value. (is "value" and 'value' allowed or does it
> need to be '"value"'?).
>
> After many years of seeing the confusion this is generating, I would
> like to see a child form used. For example:
>
> <Inline>
>    <url='test.x3d'/>
>    <url='test.x3dv'/>
>    <url='test.vrml'/>
> </Inline>
>
> or
>
> <Inline>
>    <url>test.x3d</url>
>    <url>test.x3dv</url>
>    <url>test.vrml</url>
> </Inline>
>
>
> instead of
>
> <Inline url='"test.x3d" "test.x3dv" "test.vrml"'></Inline>
>
>
> If the child notation is not acceptable, then at least drop the
> doubling-up of the quotations when there is only a single value. I think
> the biggest advantage of the second option is that the element values
> can be put into a CDATA block. Really useful if the string (url or
> otherwise) contains special or non-Latin characters. URLs are not
> required to use Latin characters and expressing them as HTML entities
> can be a real mess.
>
> Leonard Daly
>
>
>
>
> >
> >  x3d browsers may behave like this anyways if they use a reasonable
> > XML parser.
> >
> > So I would like to raise if it would be possible to relax the XML
> > encoding a bit to allow use of standard XML serializer ?
> >
> > Andreas
> >
> >
> >
> > _______________________________________________
> > x3d-public mailing list
> > x3d-public at web3d.org
> > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
> --
> *Leonard Daly*
> 3D Systems & Cloud Consultant
> LA ACM SIGGRAPH Chair
> President, Daly Realism - /Creating the Future/
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://web3d.org/pipermail/x3d-public_web3d.org/
> attachments/20170314/6610ebe9/attachment-0001.html>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170315/d0404c7a/attachment.html>


More information about the x3d-public mailing list