Search code examples
xmlxsdxsd-validationxml-validationcharacter-set

Does schema validation always check an XML file for conformance to the XML 1.0 character set?


Does schema validation always check an XML file for conformance to the XML 1.0 character set as per:

https://www.w3.org/TR/REC-xml/#charsets

...or does it depend on the XML library you are using?


Solution

  • Character legality is a matter of XML being well-formed, which is a prerequisite for being valid.

    So, it's not schema validation that checks character sets but rather conformant parsing of XML that must occur prior to any validation assessment.

    See also Well-formed vs Valid XML.