OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: XML Schemas: Best Practices - Chameleon design

[ Lists Home | Date Index | Thread Index ]
  • From: "Roger L. Costello" <costello@mitre.org>
  • To: xml-dev@lists.xml.org
  • Date: Wed, 08 Nov 2000 07:42:35 -0500

Paul Spencer wrote:
> 
> But as long as we have an <include> rather than an <import> 
> we run the risk of getting too much rubbish that we don't want.

Paul, I don't understand this statement.  Let's compare the <include>
element versus the <import> element:

<include>: This element enables a schema to reuse components that are in
another schema, provided the other schema has the same targetNamespace,
or, has no targetNamespace.

  Example. <include schemaLocation="BookCatalogue.xsd"/>

<import>: This element enables a schema to reuse components that are in
another schema, provided the other schema has a different
targetNamespace.

  Example. <import namespace="http://www.example.com"
                   schemaLocation="Example.xsd"/>

Both elements bring in *all* the components of the schema being
referenced.  The way that I read your message it seems to suggest that
the <import> element enables a schema to bring in a select set of the
components in the referenced schema (i.e., just the components that are
desired), whereas the <include> element brings in all the components in
the referenced schema.  In fact both <import> and <include> bring in all
the components in the referenced schema.  Perhaps I am simply
misunderstanding your message.

> Now I will disagree with Roger. He says that "As we saw above, 
> the Chameleon Namespace design approach has restrictions on how 
> the no-namespace components must be designed for them to be usable 
> by other schemas. Namely, they must not reference one another. The 
> components must be decoupled (which is a desirable trait)." I 
> disagree that this is a desirable trait. I want several complex 
> data types to use a common simple type that I have defined.

Yes, I understand.  You want reuse.  Of course then you have
dependencies (coupling) between components, so if one component changes
it will impact the other.  This is not good, right?
 
> Meanwhile, did my last message make the list? 

I am not sure.  I also got a similar message this morning. 

Thanks for the comments Paul.  Yes, this is very important material that
we are discussing.  I feel that we are really opening things up and
understanding the issues.  Excellent discussions!  /Roger





 

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

Copyright 2001 XML.org. This site is hosted by OASIS