Force use of CDATA in XML-schema

隐身守侯 提交于 2019-11-27 06:19:43

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/392770/force-use-of-cdata-in-xml-schema

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!