Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - xs:include changing targetNamespace >Thread Next - 'Re: "Re: xs:include changing targetNamespace"' Re: xs:include changing targetNamespaceTo: "Michael Kay" <mhk@---.--.--> Date: 10/5/2004 11:20:00 AM
"Michael Kay" <mhk@m...> writes:
> Questions about xs:include where the including schema document has a
> targetNamespace and the included document does not:
>
> In 4.2.1, Schema Representation Constraint: Inclusion Constraints and
> Semantics, rune 3.2.1, [Part 1, PER of 2004-03-18] there is apparently =
a
> typo: "whose code was qualified" should presumably be "whose form was
> qualified".
Yes.
> The implication is that the absent namespace should only be replaced by=
the
> target namespace in places where the target namespace would have been u=
sed.
> This would imply that <xs:element ref="A"/> (assuming there is no def=
ault
> namespace) is still to be interpreted as a reference to A in the
> absent-namespace, not a reference to A in the (new) target namespace
Need more information to clarify. There are three possibilities:
1) The <xs:element ref="A"/> and the declaration of A are in the
<include>d schema document. In that case, the reference has been
resolved during the construction of "the =B7schema components=B7 of
I", and clause 3.2.1 will change the TNS of A, a top-level
component, to the <includ>ing TNS.
2) The <xs:element ref="A"/> is in the <include>d schema document,
but there is no declaration for A therein. In this case the
paragraph below the constraint comes in to play:
"=B7Absent=B7 target =B7namespace name=B7s of such as-yet unresolved
reference =B7QName=B7s in <include>d components must also be convert=
ed
if clause 3.2 is satisfied."
3) The <xs:element ref="A"/> is in the <includ>ing document. No
conversion is performed, and the reference stands or falls
depending on whether there is an <xs:import/>.
> and that ##local in a wildcard still refers to the absent namespace,
> not the (new) target namespace. Correct? (And if so, is this
> actually usable?)
No, such wildcards are converted. 3.2.2 says
"[replace =B7absent=B7 namespace with TNS in] [t]he {namespace
constraint} of a wildcard, whether negated or not;"
> Is it true that the effect of including a schema document with no targe=
t
> namespace into a schema document with target namespace T is equivalent =
to
> modifying the included document so that it says targetNamespace="T" b=
efore
> processing it?
No. That would leave all internal references undischarged. It is
equivalent to constructing a schema for the included document, then
replacing =B7absent=B7 with the relevant TNS everywhere in the components
thereof called for in 3.2.1 and 3.2.2.
Note it is because of chameleon include that a list of schema
documents is _not_ sufficient to determine a schema -- you need a
labelled directed graph, with the labels being the TNS.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinbur=
gh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@i...
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged =
spam]
From mhk@m... Tue Oct 05 10:33:05 2004
Received: from lisa.w3.org ([128.30.52.41])
by frink.w3.org with esmtp (E | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
