Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Question about xsd:import / xsd:include standards (different pars er implementations)

From: "C. M. Sperberg-McQueen" <cmsmcq@---.--->
To: "Hoang, Anthony M." <ANTHONY.M.HOANG@----.--->
Date: 3/22/2005 11:45:00 AM
On Tue, 2005-03-22 at 17:10, Hoang, Anthony M. wrote:
> I=FFm working with a set of schema files where =B4A=A1, =B4B=A1 and =B4C=
=A1
> represent different XML schema files.  =B4A=A1 and =B4B=A1 share a target
> namespace while =B4C=A1 sits in a different namespace.
> 
>   (1)  =B4A=A1 includes =B4B=A1
> 
>   (2)  =B4A=A1 references an attributeGroup from =B4C=A1
> 
>   (3)  =B4B=A1 imports =B4C=A1
> 
>  
> 
> In two XML parsers, I am required to also have:
> 
>   (4)  =B4A=A1 imports =B4C=A1
> 
> while a third XML parser does not require statement (4).  I thought
> that because =B4A=A1 includes =B4B=A1 which already imports =B4C=A1, I am=
 not
> required to re-import =B4C=A1 in =B4A.=A1

The 'import' element in XML Schema has two effects.

(1) In a schema document, it signals that references
may be made in that schema document to components 
in the imported namespace (i.e. such reference are
not necessarily typos).

(2) It suggests to the schema processor that a
complete validation of documents is likely to 
require components from the imported namespace.
Depending on how the processor goes about seeking
components from a given namespace, an import
element may lead the processor to dereference the
URI given in the schemaLocation attribute; the
attribute is only a hint, though, and some
processors allow the user to say "Get components
from here and here, do not trust other locations".

The signal that references to components in 
another namespace may be made (function 1) is 
specific to the schema document, so I believe 
the processors you work with are right to 
require statement (4).

(I haven't run samples, and I haven't cited
chapter and verse from the XSD 1.0 spec, so
take this with a grain of salt.  I hope it
helps nevertheless.)

-C. M. Sperberg-McQueen
 World Wide Web Consortium



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