I am writing a schema for my XML validation final, and finally got everything (just about) working. But now I\'m getting the strangest error in my XML. I\'ll start by showing my
The element 'orders' in namespace 'OrdersSchema'
has invalid child element 'order' in namespace 'OrdersSchema'.
List of possible elements expected: 'order'.
In other words, it thinks your schema told the parser to expect a non-namespaced <order>
child element, and you provided a namespaced <os:order>
in the instance document.
http://www.w3.org/TR/xmlschema-0/#NS
Your use of
elementFormDefault="unqualified"
attributeFormDefault="qualified"
is highly unusual, and is probably the source of the trouble. Unless you really want to do something unusual, these should be the other way around.