Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


schema composition questions

From: "Shlomo Yona" <S.Yona@--.--->
To: <xmlschema-dev@--.--->
Date: 7/3/2007 3:43:00 PM
Hello,

xsd:import and xsd:include seem straightforward to me until a mix of the
two is used and a "pipeline" of includes and imports is involved. I'd
like to ask a few questions to get things right:

Question #1:

Schema document A has target namespace "A", and contains top level names
"a1","a2",...,"aN".
Schema document B has no target namespace, and contains top level names
"b1","b2",...,"bN".
Schema document C has target namespace "C", and contains top level names
"c1","c2",...,"cN".

A includes B which imports C.

The composed Schema ABC now contains
	A:a1, A:a2, ..., A:aN
	A:b1, A:b2, ..., A:bN
	C:c1, C:c2, ..., C:cN

or is this situation illegal as include should not add new namespaces?!


Question #2:

Does the order in which xsd:import and xsd:include are being processed
have any significance in a schema document?
I mean, is processing
	<xsd:include schemaLocation="foo"/>
	<xsd:import schemaLocation="bar"/>
	<xsd:include schemaLocation="baz"/>
Always the same (from the perspective of the composed schemas at the end
of the process of composing the schemas) as 
	<xsd:include schemaLocation="baz"/>
	<xsd:include schemaLocation="foo"/>
	<xsd:import schemaLocation="bar"/>
or
	<xsd:include schemaLocation="baz"/>
	<xsd:import schemaLocation="bar"/>
	<xsd:include schemaLocation="foo"/>
Or some other ordering?

Question #3:

What is the correct or desired order of composing schemas when there is
more than one schema document that imports/includes some other schema
document?  Should the composition process start with the inner-most
schema document? Or should it start from the outer-most schema document?
Should this matter at all? (I vote for inner-most, but I don't know...)

If FOO schema document includes BAR schema document and BAR includes the
BAZ schema document. BAZ has no target namespace and it has a ref to a
name in BAR and a ref to a name in FOO. Is this OK? Should resolution of
names take place only when all documents are "available" and "visible"
or can the resolution process take place in phases and how?

Question #4:

What happens when the dependency graph of include/import of schema
documents contains circles? In this case, how does one know how deep to
go?


X <- Y <- Z <- W
And
W <- Z <- X
And
W <- Y

Every arrow (<-) means that the schema document on the left side
imports/includes the document on the right side.

It seems to me that depending on the operation, xsd:import or
xsd:include, some circles in the dependency graph should be easy to
resolve and some might be illegal. But what's the rule?


Question #5:

What is the coverage of xsd:any with regards to schema composition?

While I understand that namespace="##local" refers to the same schema
document (file) if it has no target namespace (is this correct?), what's
the scope about the other alternatives? Is the scope of the xsd:any
determined only once all schema documents are available and visible?



Thanks.

Shlomo.

From boris@k... Wed Jul 04 08:09:30 2007
Received: from lisa.w3.org ([128.30.52.41])
	by frink.w3.org with esmtp (Exim


transparent
Print
Mail
Digg
delicious
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