XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] targetNamespace and default namespace

>  

Agreed, this looks like a total shipwreck. However...

> 
> 3. The library element is a child of extension and therefore the
> targetNamespace does not apply.

Not correct, the library element is defined using <element ref> rather than <element name>, so it's a reference to a global element declaration elsewhere in the schema, so targetNamespace does apply. However, it seems to be a bad reference, because it has no namespace prefix, therefore it refers to a name in the default namespace, and the default namespace is "http://www.w3.org/2001/XMLSchema";, and that namespace doesn't define any element with local name "library".
> 
> 
>  However, if I'm
> reading the schema spec correctly, this means that this document is
> invalid according to the schema. Am I correct? The schema spec is
> quite opaque on these matters.

Yes the document is invalid. I strongly suspect the schema is invalid too, though you haven't shown us enough of it to be sure. You're almost certainly not reading the schema spec correctly, there are only about three people in the world capable of doing that, but your conclusions are correct anyway.
> 
> In more generic terms if a schema declares a target namespace, and
> elementFormDefault="unqualified", then top-level elements defined in
> the schema should be in the targetNamespace. Am I readin this right?

elementFormDefault is only relevant to local element declarations and there aren't any in the fragment you showed us.

But it's wrong anyway.

Michael Kay
Saxonica


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS