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

John Carlson yottzumm at gmail.com
Sun May 16 18:51:34 PDT 2021

I think the best place to start writing examples (besides in emails) is to
submit a full .x3d file with the examples in a pull request to
https://GitHub.com/coderextreme/X3DJSONLD .  The examples should be put in
the src/main/data folder.

X3DJSONLD converts to JSON, Java, Python, Node.JS.   We can easily add VRML
stylesheet in the don.sh script which will call the appropriate VRML
stylesheet, or I can add a VRML serializer (now only an attempt at

To run a .x3d file through the process, download git bash to your windows
box (or use WSL), change  folder to src/main/shell and run:

bash several.sh ../data/your_example_file.x3d ...

encoding files will appear in ../data and binding examples will appear in

Also run:

bash don.sh  ../data/your_example_file.x3d ...

binding files will appear in ../*/net/x3djsonld/data/

donlocal.sh and local.sh work on all original .x3d files (filenames without
new in them) in the X3DJSONLD/src/main/data folder

(note that the Python files in python/net/coderextreme/data reflect a
previous attempt at doing Python SAI and do not reflect the current Python
approach, which is found in python/net/x3djsonld/data)

I have been converting the code over to Linux, so you will probably at
least have to change the classpath file running on Windows.

I presently have a problem with X3dToJson.xslt with quotes within SFString
within an MFString within a comment (so why are we worried?).   I think
that Don has done a remarkable Herculean task with the stylesheets.  And it
shows through X3DJSAIL and X3D-Edit.   But we need to add more targeted
test cases, build round trip packages similar to x3droundtrip.   We also
need more automated insight into when something fails so we don’t have to
go traipsing through diffs.   The validator is good for that, but we need a
validator for various conversion tasks.

If you’re interested in tasks for describing the universe, see Constructor
Theory coming out of Oxford.   I know this is contrary to the typical
declarative subject/object way of describing stuff, but we’re coming back
to functional programming after a long stint in the object world.  I think
a grand unified theory of the universe will include both (the force?).

Would anyone want to help me create a ontology of X3D tasks?   Or tasks in
general?   I’m thinking of trying to extend beyond ordinary database
thinking, and think that relations between UML classes as good place to
start (is , has, collects, etc) the extension.


On Sun, May 16, 2021 at 6:41 PM vmarchetti at kshell.com <vmarchetti at kshell.com>

> This refers to item 3 of the minutes of the May 14 X3D WG meeting  minutes.
> At the May 14 X3D WG meeting we again addressed the long-standing problem
> of defining the XML encoding of the SFString data type in node fields,
> particulalarly when the SFString containg quote characters.  It was
> proposed  to do two related tasks:
> 1. Generate examples of XML encoding which clearly illustrate the correct
> encoding of these edge cases
> 2. Write specification prose text which can be unambiguously interpreted
> by developers in their implementations, to ensure interoperability.
> A perennial issue in these discussions is that we're reasoning about text,
> in text. We usually use the quote characters to  isolate the text we are
> writing about -- that doesn't work here, because the quotes are critical
> part of our discussion. For that reason, in the scope of this document, I
> use curly brackets to set off text examples. In the X3D specification the
> curly bracket characters cause no controversy, and I will not use any
> examples where curly brackets are part of the text values. So, if I were to
> say the the value of an X3D field of type SFString is {"Hello"}, I mean at
> least two things:
> 1. If this value gets put in an MFString value and passed to the X3D Text
> node, it will be rendered as 7 character glyphs.
> 2. In any language binding, the value is a 7 character string in the
> native string representation of that language.
> I propose that our examples should illustrate both issues the X3D
> implementors face: reading an XML encoding of an SFString value and
> determing the correct data for their implementation environment, and
> generating a correct XML encoding of an arbitrary SFString value. As
> Michalis K has pointed, there are relatively few usages of SFString has a
> field type, but one important one is as the name field  in the Metadata
> nodes. So I will propose a set of decoding examples for determining the
> correct value of the name field in the  XML encodings of an empty
> MetadataSet node. The result SFString  for these examples should either be
> the value of the name field or the assertion that the XML encoding itself
> is not a syntactically valid encoding.
>         XML Encoding                          SFString value
>  1.     {<MetadataSet name='items'/>}         ---
>  2.     {<MetadataSet name='"items"'/>}       ---
>  3.     {<MetadataSet name='ite"ms'/>}        ---
>  4.     {<MetadataSet name='\items'/>}        ---
>  5.     {<MetadataSet name='"\"items"'/>}     ---
> The second set of examples should illustrate the encoding problem: To
> specify a correct XML encoding of the empty MetadataSet whose name field
> has the specified value. The XML encoding has multiple correct solutions
> because the XML format itself provides multiple representations  of the
> same XML attribute.
>          SFString          XML encoding
>  1.     {items}           ---
>  2.     {"items"}         ---
>  3.     {ite"ms}          ---
>  4.     {\items}          ---
>  5.     {\"items}         ---
> A final part of this project is to prepare normative  prose that
> determines these example patterns and  can be applied to the general case.
> Vince Marchetti
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20210516/cc433806/attachment-0001.html>

More information about the x3d-public mailing list