[x3d-public] MFString quotes are not apostrophes; X3D Canonical Form for XML encoding

Don Brutzman brutzman at nps.edu
Thu Mar 16 02:23:18 PDT 2017


I believe the specification is trying to communicate this form: "single quotes" where a quote is a single quotation-mark characters, representable as " or " (and _not_ an apostrophe ' ' character).

As in ClassicVRML MFString: string ["single quotes" "for each" "individual SFString entry" ]

or

XML encoding MFString: string=' "single quotes" "for each" "individual SFString entry" '

Equivalent XML syntax that might be used by any user agent (i.e. processor/program) is

	 string=' "single quotes" "for each" "individual SFString entry" '

Or even mixing/matching is allowed and equivalent:

	 string=' "single quotes" "for each" "individual SFString entry" '

Certainly the first form is more readable.  X3D-Edit strives to provide those conversions automatically as needed.


On 3/15/2017 4:35 PM, Leonard Daly wrote:
> I think I see where the problem is. In Section 5.5 of V3.3 (http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/EncodingOfFields.html#SFString) states: "The MFString specifies zero or more SFStrings enclosed in single quotes".
>
> This is wrong. While it is certainly easier (most of the time) to use single quotes as the attribute deliminator, X3D cannot enforce that because in section 4.3.1 - XML encoding (http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/concepts.html#XMLEncoding) the spec states: "This clause describes the syntax of XML-encoded, human-readable X3D files. The syntax of X3D in terms of the XML encoding are presented in this part of ISO/IEC 19776. The semantics of X3D are as defined in ISO/IEC 19775-1 <http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/references.html#[I19775_1]>. Rules for parsing and handling XML-encoded documents are defined in 2.[XML] <http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/references.html#[XML]>."
>
> This is a spec bug and needs to be reported.
>
> I don't know of a single parse that limits the attribute-value deliminator to being a single-quote character.
>
>
> Leonard Daly
>
>
>
>
>>
>>     From: Leonard Daly <Leonard.Daly at realism.com <mailto:Leonard.Daly at realism.com>>
>>     To: X3D Graphics public mailing list <x3d-public at web3d.org <mailto:x3d-public at web3d.org>>
>>     Subject: Re: [x3d-public] MFString quotes
>>
>>
>>     ...need to be quoted. XML (as many
>>     have noted) also requires that all attribute values be quoted, though it
>>     does not care if a single or double quote is used. So both of the
>>     following are legal:
>>
>>       <Text string='"string 1" "string 2"'/>
>>       <Text string=""string 1" "string 2""/>
>>
>>
>> This is legal in XML but not valid x3d. X3d requires single quotes surrounding the MFString attribute value.
>> The only motivation for this x3d limitation seems to be that vrml requires double quotes for each MFString  component, as you helpfully recalled.
>> But why not allow then what you provide above for XML ?
>> Andreas
>>
>>
>>
>>
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
> --
> *Leonard Daly*
> 3D Systems & Cloud Consultant
> LA ACM SIGGRAPH Chair
> President, Daly Realism - /Creating the Future/
>
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>


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