- From: <Mike_Leditschke@nemmco.com.au>
- Date: Fri, 28 Sep 2001 23:31:16 +1000
- To: ht@cogsci.ed.ac.uk (Henry S. Thompson)
- Cc: xmlschema-dev@w3.org
I hope the light I see isn't an oncoming train.... So the two things I misunderstood were 1. Chameleon processing applies to BOTH def and refs. I got the def bit, but assumed that namespaces were the way refs were resolved. Hence my assumption that the default namespace carried into an included schema. 2. Chameleon processing happens AFTER namespace processing All the prefix info has been discarded and converted to equivalent URIs before the chameleon processing is applied. Chameleon processing as you describe it seems elegantly simple... Thanks (as always) for the help. Regards Michael ht@cogsci.ed. ac.uk (Henry To: Mike_Leditschke@nemmco.com.au S. Thompson) cc: xmlschema-dev@w3.org Subject: Re: Default namespaces and <includes> 28/09/2001 10:25 PM Mike_Leditschke@nemmco.com.au writes: > Thank you for replying Henry. > > I understand (I think) the situation of a reference from the includer > to the includee - the default namespace definition is > definitely in scope at that point. > > However, I was thinking more of the reverse case - references > from the includee to the includer. > > Assume the includee has no namespace declarations but the > includer does declare a default namespace equal to the > targetnamespace. > > Does this namespace declaration apply to instances of > the attributes "type", "base" and "ref" in the includee, and > if so, is this explicitly covered in the XML Schema spec? If > it does apply, I don't need to prefix the values of these > attributes. Not in the way you put it, no. I'm sorry I'm not getting this over clearly: The XML Schema REC extends the XML Namespace REC to attribute values of type QName in a _very_ simple way, which is _always_ local to a _single_ XML document. On this basis it constructs *expanded names* (written here in the form {ns or None}local) with respect to which _all_ subsequent processing is done, including import, include, redefine and validation. So the only direct effect a namespace declaration has is on the QName attributes in scope for that declaration in the infoset in which that declaration occurs. > Put another way, if I wish to have the default namespace as the > target namespace in every included schema, do I have > to explicitly do this via a default namespace declaration > within each included schema, Yes. > or can I rely on a default > namespace declaration on the includer? No. > The namespace rec says nothing about includes, so I'm > assuming the include mechanism as defined by XML > schema results in a single logical XML document against > which the rules of the namespace rec can be applied. Absolutely not -- see above. > I have not put default namespace declarations > on my included schemas and do have references from the > includee schemas to the includer, and have not seen errors > in XSV, Xerces and XMLSpy. That's because of chameleon processing, I expect, and is a special feature designed to allow low-level library schema documents declared without a target namespace to be re-used. It is independent of the namespace mechanism as such. Briefly, it says that when including a targetless schema into a targetted one, all defs and refs of the form {None}xxx are turned in to defs and refs of the form {tns}xxx, where 'tns' is the target namespace of the including schema. Hope this helps. ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh W3C Fellow 1999--2001, part-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/ ------------------------------------------ This e-mail is confidential. If you are not the intended recipient, any use, disclosure or copying of this document is unauthorised and prohibited. If you have received this document in error, please delete the email and notify me by return email or by phoning the NEMMCO Helpdesk on 1300 300 295.
Received on Friday, 28 September 2001 09:31:52 UTC