[x3d-public] question re scripts and XML entities

Don Brutzman brutzman at nps.edu
Tue Dec 6 09:24:32 PST 2016


agreed completely.

here are some similar thoughts on that point... improvements and additions welcome.

	X3D Scene Authoring Hints: Scripts
	http://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Scripts

On 12/5/2016 12:30 AM, Yves Piguet wrote:
> X3D XML must be valid XML. So your question probably means "is it better to use cdata in X3D XML scripts or to escape special XML characters with entities?"
>
> My feeling is that cdata is preferred for the sake of legibility. But if you generate xml programmatically, you should still detect and escape the sequence of three characters ]]> which marks the end of cdata, replacing it with something like (unquoted) "]]>]<![CDATA[]>".
>
> I think general-purpose xml producers prefer entities. Also cdata blocks (and xml empty elements and case-sensitive tags and attribute names) aren't supported in html5, hence the difficulty to produce X3D XML embeddable in both xhtml and html.
>
> Yves
>
>> On 5 Dec 2016, at 08:37, <yottzumm at gmail.com> <yottzumm at gmail.com> wrote:
>>
>> Is it more correct to have < and friends in X3D XML scripts, or < and friends in X3D XML scripts?
>>
>> Thanks,
>>
>> John

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