mi***@setcce.org (Milan) writes:
I have this situation:
<myxmldoc xmlns:b="urn:schemas-microsoft-com:BizTalkServer"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="C:\shema.xsd">
<Invoice id="invoice">
<myTag1> ... </myTag1>
</Invoice>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"
...
</Signature>
</myxmldoc>
The problem is that XML Spy complains, when validating using XML Shema:
"Mandatory local element 'Signature' must be unqualified (i.e.
outside of any namespace), but you are using a default namespace."
What is this? Is there some workaround? I'd like to keep "Signature"
element (and "myxmldoc" element) exactly as it is now.
What does the schema document 'C:\schema.xsd' say about the
Signature element? Judging by the error message, I'd guess it
declares it as an element local to the complex type of
element 'myxmldoc', and does not associate it with any
namespace.
If you want the Signature element to be in the namespace
http://www.w3.org/2000/09/xmldsig# then (a) you won't be able
to declare it in a schema document without any target namespace,
and (b) the declaration for the complex type used by 'myxmldoc'
will need to refer to a Signature element in the dsig namespace,
not to a Signature element without an associated namespace.
If you'll post the relevant parts of your schema, it will be easier
to figure out what exactly you are trying to do.
In the meantime, I hope this helps a little.
-C. M. Sperberg-McQueen
World Wide Web Consortium