[
Lists Home |
Date Index |
Thread Index
]
> -----Original Message-----
> From: Takuki Kamiya [mailto:tkamiya@us.fujitsu.com]
> Sent: Sunday, March 06, 2005 1:33 AM
> To: www-xml-schema-comments@w3.org; xml-dev@lists.xml.org
> Subject: [xml-dev] clarification needed for include
>
> Hi,
>
> Section 4.2.1 in XML Schema Part 1 2nd Ed mentions in the
> "schema representation constraint" section that:
>
> "1.2 It resolves to a <schema> element information item in a
> well-formed information set, which in turn corresponds to a
> valid schema."
> (In http://www.w3.org/TR/xmlschema-1/#layer2)
>
> It basically asserts that the schema document being included
> has to be "valid". I am not so sure what this "valid" means.
>
> Is it "valid" in terms of what? I guess it is probably meant
> to be "valid" against the whole XML Schema specification.
Yes, that is correct. More specifically, it must be valid according to
the rules specified in "C.1 Validation Rules" in XML Schema Part 1 2nd
Edition.
> If it is the case there's another question.
>
> Say for example, schema A includes schema B, and B uses a
> component (eg. type definition) that is defined in schema A.
>
> My question is: does schema B have to also "include" schema A?
> If B does not include A, then schema B is now "invalid" since
> it does not validate as a stand-alone schema document because
> some of the references (eg. type references) do not (cannot)
> resolve without being aware of components in schema A.
Schema B has to include Schema A - that is, Schema B must be able to
validate as a stand-alone schema.
However, regarding inclusion in an XML instance document (separate but
related issue) - if you had the following case:
includes includes
Schema A --------> Schema B --------> Schema C
Then in an XML instance document you would only need to list Schema A in
the "schemaLocation" attribute of the <include> element in the instance
document - that is, the schema processor is responsible for resolving
the reference of Schema C from Schema B. You would not be required to
list Schema B or Schema C in the "schemaLocation" attribute.
Kind Regards,
Joseph Chiusano
Booz Allen Hamilton
Strategy and Technology Consultants to the World
> I know I can experiment with the implementations, which I did
> including ours and got different results. Only one
> implementation required schema B to include A, but others did
> not care about it.
>
> Any comments are appreciated.
>
> Thank you,
>
> -Takuki Kamiya (Fujitsu Software Corporation)
>
>
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org
> <http://www.xml.org>, an initiative of OASIS
> <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
>
>
|