[x3d-public] MFString quotes

Leonard Daly Leonard.Daly at realism.com
Tue Mar 14 19:57:23 PDT 2017


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.html>


More information about the x3d-public mailing list