- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 28 Sep 2001 13:25:20 +0100
- To: Mike_Leditschke@nemmco.com.au
- Cc: xmlschema-dev@w3.org
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/
Received on Friday, 28 September 2001 08:24:40 UTC