[x3d-public] question re scripts and XML entities

Yves Piguet yves.piguet at gmail.com
Mon Dec 5 00:30:11 PST 2016


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
>  
> _______________________________________________
> 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