[x3d-public] MFString quotes

Andreas Plesch andreasplesch at gmail.com
Tue Mar 14 14:55:03 PDT 2017


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"').

However, at least in Python there seems to be a notion that double quotes
within attribute values in XML should be escaped as " . Also there is
a preference that the outer quotes should be double quotes. This is
probably due to Python XML standard libraries such as elementtree or
minidom being hardcoded to serialize this way.

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.

 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170314/62568b76/attachment.html>


More information about the x3d-public mailing list