Re: xsi:type + new namespace

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