W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2012

Re: Override a type in a schema

From: Michael Kay <mike@saxonica.com>
Date: Wed, 07 Mar 2012 17:29:45 +0000
Message-ID: <4F579B09.1010208@saxonica.com>
To: xmlschema-dev@w3.org
Given a suitable API, you can validate the element against any type you 
like.

One such suitable API is the XSLT instruction:

<xsl:copy-of select="theirs:foo" type="my:type"/>

Michael Kay
Saxonica


On 07/03/2012 17:10, Andrew Welch wrote:
> Given an element:
>
> <theirs:foo>
>
> and an XSD for the 'theirs' namespace defining foo as xs:string, how
> can I override that definition with my own type?  One way is:
>
> <theirs:foo xsi:type="my_type_for_foo">
>
> Is there a 1.0 way to do it without using xsi:type ?
>
>
> thanks
>
Received on Wednesday, 7 March 2012 17:30:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 March 2012 17:30:15 GMT