Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Recursive XSD with targetNamespace

From: noah_mendelsohn@--.---.---
To: "Michael Kay" <mike@--------.--->
Date: 11/18/2008 4:26:00 PM
Michael Kay writes:

> Very little that's in XSD makes intuitive sense - get used to it.

I agree that there's all to much that doesn't but I'm not sure I agree on 
this one.
 
> The basic rule is that when you are defining a component (such as an
> element declaration), the "name" attribute gives the local name, and
> it is implicitly qualified by the targetNamespace.

What's so unusual about this.  It's very much like, say, declaring a 
package at the beginning of a java source file.  If you declare a 
package/targetNamespace, then things you define in the source file tend to 
implicitly be in the package/targetNamespace. 

> When you are 
> referencing a component, you use a QName in the "ref" attribute, and
> if the QName is unprefixed, it refers to a name in the default 
> namespace - not the target namespace

If you reference something that's from a package/targetNamespace that's 
not implicitly in scope (e.g. from a Java "import" or a default xmlns:), 
then you have to make an explicilty qualified reference. Yes, these things 
can be confusing if you think about them wrong, but I'm not convinced that 
their the best examples of unnecessary obscurity in XSD.

Noah 

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------







transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent