[x3d-public] question on MFStrings; intermediate whitespace between SFString values in MFString list?
Don Brutzman
brutzman at nps.edu
Sat May 20 16:47:40 PDT 2017
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
More information about the x3d-public
mailing list