Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force use of CDATA in XML-schema

Tags:

xml

cdata

xsd

I am creating an xml schema, and I want to make sure that the values in all the elements are CDATA elements.

Is there a way to force this using XML-schema?

like image 801
Dana Avatar asked Dec 30 '22 06:12

Dana


1 Answers

As I recall XML Schema works on the XML Infoset, meaning with the XML document after it is parsed, entities are resolved, whitespace is normalised and CDATA is processed. CDATA is a way of easing the textual serialization not a part of the structural model. So: No. Neither in DTDs or RELAX NG.

like image 195
ttepasse Avatar answered Jan 10 '23 09:01

ttepasse