[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xml schema


if clause type 1
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
        not;

                         http://www.w3.org/TR/xmlschema-1/#src-include

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).
                         
Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.