[x3d-public] MFString quotes

Leonard Daly Leonard.Daly at realism.com
Wed Mar 15 14:40:10 PDT 2017


Oh man, twice in one day... :-(


>> On 15 Mar 2017, at 21:49, Leonard Daly <Leonard.Daly at realism.com> wrote:
>>
>> [...]
> I agree.
>
>> Note that the XML element produces an MFString with 1 element
>>
>>   <Text string="'string 1' 'string 2'"/>
>>
>> In this case the single element would be - 'string 1' 'string 2'
> But this is invalid per 19776-1 v3.3; see http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/EncodingOfFields.html#SFString

You are correct. There was a lot of discussion about the syntax on this 
12+ years ago. It goes back to my first statement about all string 
elements (whether SFString or MFString) must be quoted.


>
> There is a specific note which states that an unquoted attribute _value_ (without the quotes which belong to XML) is an invalid MFString. I.e. you may not replace a single-element MFString with an SFString.

This may be fine for strings, but insisting that URLs (also MFString) 
also be double-quoted when dealing with X3D embedded in HTML is really 
awkward (trying to find something besides ridiculous). The node

    <Inline url="subscene.x3d"></Inline>


would not be valid; however the "correct" syntax of

    <Inline url='"subscene.x3d"'></Inline>

would cause most people to pause and puzzle over the strange notation.


Leonard Daly


>
>> NOTE  The construct
>>
>> "string3"
>>
>> is not a valid instance of an MFString. Such an MFString would be properly specified as
>>
>> '"string3"'
> I think that shouldn't change in v4.
>
> Yves
>
>


-- 
*Leonard Daly*
3D Systems & Cloud Consultant
LA ACM SIGGRAPH Chair
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170315/fe40797d/attachment-0001.html>


More information about the x3d-public mailing list