[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xml schema
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|