W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2001

Re: Different namspaces in one schema

From: Thilo <xml-dj@gmx.de>
Date: Fri, 7 Dec 2001 09:15:12 -0500 (EST)
Message-ID: <006e01c17f29$7dfc54c0$7505dc83@informatik.unibonn.de>
To: <xmlschema-dev@w3.org>
Hi Jeni!
Thank you. Refering to the example below, then is the local element "Abt" in
the complexType in no namespace and all others in the targetNamespace?

*greets*

Thilo

<schema xmlns="http://www.w3.org/2001/XMLSchema"
 targetNamespace="http://www.autos.de"
 xmlns:car="http://www.autos.de"
  elementFormDefault="qualified" >

 <element name="Auto" type="car:Auto"/>
 <element name="IdNr"  type="integer"/>

 <complexType name="Auto">
    <sequence>
       <element name="Fabrikat" type="car:Fabrikat"/>
       <element name="Abt" type="string"/>
    </sequence>
 </complexType>

<!-- etc. -->
</schema>



> Hi Thilo,
>
> > Is ist possible/valid to have in some way elements with different
> > namespaces in one schema, without using the <import> element?
>
> No. All the elements that are declared within a particular schema have
> the same namespace, the target namespace of the schema (aside from
> those that are declared locally and unqualified, which are in no
> namespace).
>
> Cheers,
>
> Jeni
>
> ---
> Jeni Tennison
> http://www.jenitennison.com/
>
Received on Saturday, 8 December 2001 15:33:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:25 GMT