- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 05 Mar 2001 16:19:28 +0000
- To: Don Mullen <donmullen@tibco.com>
- Cc: "'Michael Anderson'" <michael@research.canon.com.au>, xmlschema-dev@w3.org
Don Mullen <donmullen@tibco.com> writes: > > But what if the CardCatalogueEntry type was qualified using a > > prefix. Ie for the > > schema to be included ( myNoNamespaceSchema.xsd ) I have: > > <schema xmlns:my="http://myNS" > > xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"> > > ... > > <xsd:element name="Book" type="my:CardCatalogueEntry"/> > > This would not be schema valid. You are attempting to use a namespace > prefix for CardCatalogueEntry, when in fact it is a "noNamespace" schema, > with CardCatalogueEntry defined within the schema module. > > In order to reference schema components, you must either have <import>ed > them from a namespace (in your example "http://myNS") that also has a prefix > (via xmlns:prefix) or reference the current schema (with no namespace or a > targetNamespace). Just to explain how I came to give a different answer, I was assuming myNoNamespaceSchema.xsd above was valid, i.e. that there was an import for the 'http://myNS' namespace hidden behind the ellipsis. Don is correct that without such an import your schema document is broken. 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 Monday, 5 March 2001 11:19:35 UTC