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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] xml schema

[ Lists Home | Date Index | Thread Index ]

Hi Joe,

> <Excerpt>
> Having no namespace, the definition of person in the included
> schema is coerced into the http://example.com namespace.
> </Excerpt>
> I *believe* there are more requirements necessary for coercion to
> occur, other than the included schema having no target namespace and
> the including schema having a target namespace:
>  (1) The including schema must have a default namespace, and
>  (2) The target namespace of the including schema must be the default
>      namespace

I don't think that's the case. In Schema Representation Constraint:
Inclusion Constraints and Semantics the XML Schema Rec. says:

  In addition to the conditions imposed on <include> element
  information items by the schema for schemas, all of the following
  must be true:
  In either case call the <include>d <schema> item SII, the valid
  schema I and the <include>ing item's parent <schema> item SII’.

  2 One of the following must be true:

  2.1 SII has a targetNamespace [attribute], and its ·actual
      value· is identical to the ·actual value· of the targetNamespace
      [attribute] of SII’ (which must have such an [attribute]).
  2.2 Neither SII nor SII’ have a targetNamespace [attribute].
  2.3 SII has no targetNamespace [attribute] (but SII’ does).

  3 The appropriate case among the following must be true:
  3.2 If clause 2.3 above is satisfied, then the schema
      corresponding to the <include>d item's parent <schema> must
      include not only definitions or declarations corresponding to
      the appropriate members of its own [children], but also
      components identical to all the ·schema components· of I, except
      that anywhere the ·absent· target namespace name would have
      appeared, the ·actual value· of the targetNamespace [attribute]
      of SII’ is used. In particular, it replaces ·absent· in the
      following places:

  3.2.1 The {target namespace} of named schema components, both at the
        top level and (in the case of nested type definitions and
        nested attribute and element declarations whose code was
        qualified) nested within definitions; 

  3.2.2 The {namespace constraint} of a wildcard, whether negated or


Nowhere does it mention what the default namespace of the included
schema is (and it would be very strange if it did, in my opinion,
since the default namespace of a document is largely a syntactic
issue, and so shouldn't be relevant when you look at another file on
the Infoset level).


Jeni Tennison


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

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