[x3d-public] Agenda for X3D WG Open Meeting Wednesday 10th May 2017

Don Brutzman brutzman at nps.edu
Wed May 10 14:03:09 PDT 2017

On 5/10/2017 1:40 PM, Yves Piguet wrote:
> Excuse me if I've missed it, but how do you specify an empty MFString array? If double quotes are optional, '' (empty attribute value) would mean an empty SFString, i.e. [""] if an MFString is expected, not [].

Excellent question.  Two answers for completeness.

a.  For empty MFString array, use default value or an empty attribute.

Empty array value for ClassicVRML:  [ ]


	<Text string=''/>

	<Text string=""/>

b.  For an MFString containing a single empty string:

Empty string value for ClassicVRML:

	  ""   (note no preceding backslash; pretty sure this is allowed by grammar)
	[ "" ]

I think the following are equivalent for XML encoding.  Similar variations/permutations also exist, including optional whitespace outside the "" which is ignored.

	<Text string=' "" '/>

	<Text string=' "" '/>

	<Text string=" "" "/>

	<Text string=' "" '/>

	<Text string=" "" "/> 	

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