OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Can XML namespaces get into a recursive loop?

[ Lists Home | Date Index | Thread Index ]

kar i wrote:
> I am new to this discussion site. I have a question
> about using namespaces to mutually define XML
> schemas.
> Take this example [elided] ...

> As you can clearly see that each of these xml schemas
> use the other for their definition. 

Well, actually, they do not.  The URI used for a namespace has nothing 
to do with the URI for any schema document.  To use another schema, you 
need to import (or include, if you want it to use the same target 
namespace) it.  You haven't done that.  You also have not declared a 
target namespace for either of the two schemas, but you use 
elementFormDefault='qualified', as if you had so declared.

Maybe one or both of those processors tried to use the namespace as a 
hint, and assumed you wanted to import the schema document at the 
namespace URI, but who knows? That is not mandated by the XML Schema 
Recommendation.

In principle, you should be able to import schemas that refer to each 
other, but it is asking for trouble and I have heard that some 
processors have trouble with circular imports.  I'd avoid them, if I 
were you.

I suggest you figure out what namespaces you want to use, if any, 
correct the schemas accordingly, decide which one should import which, 
and get rid of the circular references.

Cheers,

Tom P






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS