[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?


namespaces.get
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.