[x3d-public] MFString quoting [was: interesting sample]

Don Brutzman brutzman at nps.edu
Thu Apr 27 07:44:23 PDT 2017


On 4/27/2017 5:39 AM, Andreas Plesch wrote:
> On Wed, Apr 26, 2017 at 10:39 PM, Don Brutzman <brutzman at nps.edu <mailto:brutzman at nps.edu>> wrote:
> 
>     On 4/26/2017 7:10 AM, Andreas Plesch wrote:
> [...]
>         But that brings up SFStrings.
>         When not used as part of an MFString, they still have the double quote requirement while XML allows both single or double quotes.
> 
>     agreed for SFString values.  Equivalent constructs:
> 
>     XML
>              <WorldInfo title='Hello world!'/> 
> 
>              <WorldInfo title="Hello world!"/>
> 
> Are you implying that  <WorldInfo title='Hello world!'/> should be a conforming X3D XML encoding (of the WorldInfo node with a title field value) ?

Not quite... Am stating that they are both equivalent representations according to XML Recommendation rules.

> I think you may since the X3D XML encoding does not get to define the outer quotes of an attribute value, meaning that we are all pretty much on the same page.

Correct, yes.

>     ClassicVRML and VRML encodings do not permit such variation, simply
> 
>              WorldInfo {
>                title "Hello world!"
>              }
> 
> Perhaps the X3D XML encoding spec. should retain a  paragraph on best practices for consistency with the VRML encoding.

Not clear what else there is to say?  All three are equivalent and all three produce the same SFString value, so they are are all satisfactory.  Each of the XML variants will pass validation as well.

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