[x3d-public] MFString quotes

Leonard Daly Leonard.Daly at realism.com
Wed Mar 15 07:59:39 PDT 2017


Roy, All of my comments are or can be public.

Andreas & Yves,

I understand what you are trying to do -- '"string1" "string2"' (in any 
form including HTML entities) is messy and a bit unwieldy. The problem 
happens (most obvious in the Text node) when the individual elements of 
MFString contain spaces and single quotes (apostrophes). If you wanted 
to display the string (in a Text node):

    She didn't jump.


Then you do something like '"She didn't jump."' to indicate a 
single element.

If the above string is preceded by:

    He yelled "Don't Jump!"

so the set is:

    He yelled "Don't Jump!"
    She didn't jump.

You need to encode the whole thing as:


    '"He yelled "Don't Jump!"" "She didn't jump."'

Removing the quote marks around each individual element would break up 
the element structure.

And yes my proposal is not strictly backwards compatible; however, there 
will be so much change from V3.x to V4 that conversion will be required 
anyway. Why not do it right?


Leonard Daly




> 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
>     <mailto:Leonard.Daly at realism.com>>
>     To: x3d-public at web3d.org <mailto:x3d-public at web3d.org>
>     Subject: Re: [x3d-public] MFString quotes
>     Message-ID: <87202915-313c-5a4b-56ae-3530eae48261 at realism.com
>     <mailto: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>
>     >
>     <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 <mailto:x3d-public at web3d.org>
>     > http://web3d.org/mailman/listinfo/x3d-public_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
>     <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170314/6610ebe9/attachment-0001.html>>
>
>
>
> _______________________________________________
> 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/20170315/a9e1e9c0/attachment-0001.html>


More information about the x3d-public mailing list