[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Can XML namespaces get into a recursive loop?
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|