Re: Use of namespaces in an XML Schema

achille@us.ibm.com writes:

> Hi !
> 
> In the latest spec, all the examples which show how to create a schema by
> assembling components from multiple sources use global  namespace
> declarations (namespace declarations that appear at the level of the
> <schema> element  information item) . Since the namespace spec allows to
> declare namespace in each element information item, I wonder if  a schema
> with local scope namespace declarations is still a valid schema (provided
> that I add, for each namespace declaration,  the corresponding  import
> statement).
> Example :
> 
> <xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema">
>      <import namespace="http://www.w3.org/questions">
>      <xsd:element name="A" type="xsd:string">
>      <xsd:element name="B"  xmlns:localprefix="http://www.w3.org/questions"
> type="localprefix:typeA">
> <xsd:schema>
> 
> Thanks,

The short answer is 'yes'.  See the schema for datatypes for an
example.  For the long answer, see Noah's reply :-)

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 Tuesday, 21 March 2000 05:01:48 UTC