Quantcast
Channel: Extend an XML Schema via the element - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Michael Kay for Extend an XML Schema via the element

$
0
0

By "schema-qualified" I suspect you mean "namespace-qualified".

If you want to allow elements in any namespace or none, use <xs:any namespace="##any"/>

LATER

namespace='##any' is indeed the default, so that doesn't appear to be the problem.

Now you've told us the error message, that points to processContents. The default for processContents is strict, which means an element is allowed only if there is a global element declaration (and it must be valid against that declaration).

In the W3Schools example the instance document has an xsi:schemaLocation attribute for the namespace of the children element that points to a schema containing a declaration of that element. Because processContents="strict", that schema is needed. It doesn't matter what the namespace is, so long as a global element declaration exists.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>