[x3d-public] Mantis 1320: relax requirement for quoted single-string value in MFString array

vmarchetti at kshell.com vmarchetti at kshell.com
Sat Jul 4 19:58:01 PDT 2020



> On Jul 4, 2020, at 9:26 PM, Don Brutzman <brutzman at nps.edu> wrote:
> 
> Thanks for your note... yes we had a brief discussion some months ago, will look it up.  Didn't want to dwell on the topic then (each of us too busy!!) but now more metadata is getting created and this relaxation will help.
> 
> My understanding of years of implementation-complexity objections heard to this XML encoding relaxation have not appeared to be grounded by practice, which in this case is quite simple.
> 
> For example, pseudocode adaptable to ~any language that is parsing text into X3D objects:
> 
> 	if (!value.startsWith('"') and !value.endsWith('"')) // example approach #1
> 	{
> 		newMFStringValue = new MFString() of length 1;
> 		newMFStringValue[0] = value;
> 	}
> 	else // continue parsing as before
> 
> 

However, I think this approach of coming up with code or pseudo code to explain or document the standard doesn't account that implementors will want to (and I think should) use standardized code to do all the XML processing, including applying the XML rules for un-encoding the way that attribute values can be encoded in XML.
For example, given an XML fragment
<Element fruit='"apple"'/>

However, the same could be 



Someone using the standard Python module xml.etree to parse the document would only see a Python object with a (Python) attribute named fruit and a value which was the unicode value "apple" . If this occurred in an X3D document,
this would be interpreted as an SFString with value "apple"  or an MFString of one element with value apple .  





> 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
> 
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org




More information about the x3d-public mailing list