[x3d-public] [x3d] X3D WG May 14 minutes : SFString in XML encoding examples

Don Brutzman brutzman at nps.edu
Sun May 23 12:48:54 PDT 2021

Thank you for taking a hard look at this Patrick.  Yes, a tricky business.

On 5/18/2021 2:36 AM, Patrick Dähne wrote:
>> This issue is being looked at in more detail because of the proposal in Mantis issue 1320 https://www.web3d.org/member-only/mantis/view.php?id=1320 which would allow an optional variant in the encoding of of an MFString with one element.
> This proposal obviously is a bad idea.

please continue looking, see preceding message, consider this response, and let's keep analyzing examples.

> Given an MFString foo like this:
> <node foo="">
> What’s the content of foo? An empty array of strings? Or an array with a single element, the empty string? In classic VRML encoding:

According to XML (the syntax you used above) an empty attribute value is empty.  Equivalent:

   <node foo=''>

Thus the result is an empty array, VRML syntax foo []

> foo []
> or
> foo [ "" ]
> ???

For your second alternative, to match VRML syntax foo [ "" ]

you would need XML explicitly defining the singleton empty string, such as one of these:

<node foo='""'>
<node foo=' "" '>
<node foo = ' "" ' >

<node foo='""'>
<node foo=' "" '>
<node foo = ' "" '>

<node foo="""">
<node foo=" "" ">
<node foo = " "" ">

<node foo='""'>
<node foo='&#x00022;&#x00022;'>
<node foo="""">
<node foo="&#x00022;&#x00022;">


Note that it is also possible to say which of these equivalent expressions is preferred form (for version control, digital signature/encryption, binary, simplicity): X3D Canonical Form , i.e.

<node foo='""'>

... which certainly seems to be simplest of all the variations.

When we first apply XML rules (which has many variations outside of our control), then apply VRML grammar (which is well understood and simple), it seems like this whole business becomes pretty straightforward.

> Regards,
> Patrick

all the best, Don
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman

More information about the x3d-public mailing list