W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2003

Re: xsi:type + new namespace

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: Sun, 16 Nov 2003 08:37:06 +0000
To: Dean Hiller <dhiller@avaya.com>
Cc: xmlschema-dev@w3.org
Message-ID: <f5bekw8vhe5.fsf@erasmus.inf.ed.ac.uk>

Dean Hiller <dhiller@avaya.com> writes:

> I have the following small XML document
>
> <ns1:Root xmlns:xsi="http://..../XMLSchema-instance"
>                  xsi:schemaLocation="http://originalschema schema.xsd"
>                  xmlns:ns1="http://originalschema">
>   <ns1:Element xsi:type="ExtendedElement">
>      <data1>some data</data1>
>      <ns2:data2 xmlns:ns2="http://www.avaya.com/schema">more
>      data</ns2:data2>
>   </ns1:Element>
> </ns1:Root>

Move your namespace binding, and arrange for ExtendedElement to be in
that namespace, e.g.

<ns1:Root xmlns:xsi="http://..../XMLSchema-instance"
                 xsi:schemaLocation="http://originalschema schema.xsd"
                 xmlns:ns1="http://originalschema"
                 xmlns:ns2="http://www.avaya.com/schema">
  <ns1:Element xsi:type="ns2:ExtendedElement">
     <data1>some data</data1>
     <ns2:data2>more data</ns2:data2>
  </ns1:Element>
</ns1:Root>

-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-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/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Sunday, 16 November 2003 03:37:09 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:03 UTC