W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2009

Re: Including schema with target namespace from schema with no target namespace

From: Bob Kline <bkline@rksystems.com>
Date: Tue, 10 Feb 2009 09:03:59 -0500
Message-ID: <4991894F.2000605@rksystems.com>
To: xmlschema-dev@w3.org

Tobias Koenig wrote:
> If the target namespace of the 'to be included' schema differs from the
> target namespace of the including schema, you have to use <import> instead of <include>.

Ah, yes.  I missed that.  Thanks very much.  And thanks to Ken for his 
very helpful example.

I extended things a bit by using attribute groups in the imported schema 
so I could apply different pattern constraints to the values depending 
on where the attributes are being used in the importing schema.  Is 
there a cleaner approach available for doing this?

I did stumble over one other (figurative) root in the path: the W3C 
tutorial at [1] makes it look (in the example for section 2.8) as if 
you're supposed to use "id" instead of "name" to identify an 
attributeGroup you're defining, but I'm guessing that's just a 
typographical error, because the schema processors don't seem to like 
it. :-)

[1] http://www.w3.org/TR/xmlschema-0/

Bob Kline
Received on Tuesday, 10 February 2009 14:04:43 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:15 UTC