XSD Problem

XSD Problem

Post by Mila » Mon, 07 Jul 2003 18:21:34



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.

 
 
 

XSD Problem

Post by Martin Honne » Mon, 07 Jul 2003 19:03:21



> 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.

If you are using a namespace then you need to define one schema for each
namespace.

--

        Martin Honnen
        http://JavaScript.FAQTs.com/

 
 
 

XSD Problem

Post by Mila » Mon, 07 Jul 2003 23:10:13


Thank you. Is there a workaround to have one shema and to keep the
same XML doc as it is now?
 
 
 

XSD Problem

Post by Martin Honne » Tue, 08 Jul 2003 19:32:46



> Thank you. Is there a workaround to have one shema and to keep the
> same XML doc as it is now?

 From my understanding of XML schema not. You need to specify a schema
for each namespace used.
--

        Martin Honnen
        http://JavaScript.FAQTs.com/

 
 
 

XSD Problem

Post by C. M. Sperberg-McQue » Wed, 09 Jul 2003 06:56:04



> 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

 
 
 

1. XSD problem

Hi!
I'm having a problem with a xml document I want to validate.
Please help me to solve it.
The problem is this:
How do I build the xml schema and use it
to validate my xml document (on client-side with XML Parser)  which can
check relations between any xml-elements.

-xml file-
<elements>
   <element1 size="0">
          aaa
   </element1>
   <element2 width="0">
          bbb
   </element2>
   <element3 height="0">
          ccc
   </element3>
  </elements>

For example:

When I change attribute value "size" of the element "element1" than
xsd schema must check that attribute "width" of the element "element2"
is equal  to "1" and  attribute "height" of the element "element3" is equal
to "2"

 Thanks,Julia

2. Stupid Question

3. XSD Problem

4. Unable to write to Linux filesystem

5. XSD problem - Two elements with same name

6. Why is stack derived from deque, not the other way around?

7. xsd problem

8. EIGRP over Frame-Relay

9. xsd problem with all grouping

10. xsd problem please help

11. xsd Import Problem With XSD.EXE -- The Solution

12. "xsd's out of other xsd's" and "databinding in delphi"