is the xsi: prefix assumed to be known in XML?

前端 未结 1 1867
走了就别回头了
走了就别回头了 2020-12-11 11:37

Working on an XML parser, I see a lot of XML files using the xsi:schemaLocation attribute without declaring the xsi namespace.

Is it an error or is there a spec sta

相关标签:
1条回答
  • 2020-12-11 12:13

    No namespaces [other than the XML namespace] can be assumed to be known.

    If a document contains an xsi prefix, there should also be an associated namespace (which would normally be xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance").

    If the namespace is not declared, the XML file is not valid.

    0 讨论(0)
提交回复
热议问题