XSD: XML files pass validation, but so do XSLs and XSDs

后端 未结 4 500
孤独总比滥情好
孤独总比滥情好 2020-12-12 05:59

So there\'s an XSD schema that validates a data file. It declares root element of the document, and then go complexType\'s that describe structure. The schema h

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-12 06:42

    My understanding is that XML Schema (XSD) does not give any way of requiring that the root node of a document is a certain element -- the only way to do that is to restrict what elements are defined at "global level" to just one element. Is it possible that your validation code is importing the schema for XSLT, so that when it sees an XSLT document it validates because the XSLT elements have been defined at global level.

提交回复
热议问题