[x3d-public] question on MFStrings; intermediate whitespacebetween SFString values in MFString list?
John Carlson
yottzumm at gmail.com
Sat May 20 18:36:13 PDT 2017
Luckily, I do JSON parsing before XML parsing, so I don’t think I am affected by the "," in XML. Thanks for the info. If someone starts using my DOM code before using JSON, I could be in trouble a little bit though. Probably best to go back and do modifications at some point. This is for X3DJSONLD. (It’s in the *Serializers folks!). I should have been using JSON all along, instead of DOM!
John
Sent from Mail for Windows 10
From: Don Brutzman
Sent: Saturday, May 20, 2017 7:48 PM
To: Joe D Williams; John Carlson
Cc: X3D Graphics public mailing list
Subject: Re: [x3d-public] question on MFStrings; intermediate whitespacebetween SFString values in MFString list?
On 5/20/2017 3:39 PM, Roy Walmsley wrote:
> Hi,
>
> Actually, there is some more general overriding text in the standard which
> does clarify this point.
>
> Look at 5.1.2 Description (see
> http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/EncodingOfFields.html#5.1.2). This is what the third paragraph says:
>
> "Multiple-valued fields are written as an ordered list of values enclosed in
> quotations and separated by whitespace. If the field has zero values, only
> the quotes are written. The last value may optionally be followed by
> whitespace."
>
> So, clearly, between two values in any MFxxxx field, whitespace is required.
> Therefore, no need to specify in individual field details, which none of
> them do.
>
> In my view, therefore, the standard is quite clear.
>
> <Text string='"Line 1""Line 2" '/> is illegal, since there is no whitespace.
> <Text string='"Line 1" "Line 2" '/> is legal, since there is a " ", which is
> a whitespace character, as defined in 4.3.1 XML encoding.
> <Text string='"Line 1","Line 2" '/> is legal, since there is a ",", which is
> a whitespace character, as defined in 4.3.1 XML encoding.
> <Text string='"Line 1"."Line 2" '/> is illegal, since "." is not a
> whitespace character, as defined in 4.3.1 XML encoding.
>
> All the best,
>
> Roy
Thanks Roy. Parsing was getting pretty gnarly without that helpful whitespace separator.
So John, won't be exploring that path further in X3dToJson.xslt stylesheet.
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170520/25abe889/attachment.html>
More information about the x3d-public
mailing list