[X3D-Public] Should MFString (and SFString) in XML encoding use backslashes?

Michalis Kamburelis michalis.kambi at gmail.com
Tue Jul 19 20:11:57 PDT 2011


2011/7/19 Braden McDaniel <braden at endoframe.com>:
> After XML processing, the string is parsed to pick out the MFString
> components; '"' is used as the delimiter for these (and thus literal '"'
> characters must be escaped).

Thanks, this confirms my findings and my current implementation :)

>
> However, the spec prose that precedes that example is wrong when it
> calls the "string" field an SFString: it's actually an MFString.

Ah, good catch. I submitted this bug, along with my suggested wording
to add about double quotes, to the X3D Specification Feedback Form.

>
> It's not necessary to escape them for SFString because there's no
> post-XML processing to break the SFString into components.  (Escaping
> them should be harmless, though.)
>

Escaping them isn't harmless. At least in FreeWRL, InstantReality, and
my current view3dscene implementation: extra backslashes are part of
the SFString content, they are visible. When generating X3D, a
software must be aware of this, and escape with backslashes *only* for
MFString values.

Michalis



More information about the X3D-Public mailing list