W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2010

Re: redefinition of SimpleType in nested schemas

From: George Cristian Bina <george@oxygenxml.com>
Date: Wed, 22 Sep 2010 15:23:38 +0300
Message-ID: <4C99F54A.2060809@oxygenxml.com>
To: Marie Bilde Rasmussen <mariebilderas@gmail.com>
CC: xmlschema-dev@w3.org
Hi Marie,


 > Danish-English-technical.xsd builds on it's turn upon
 > Danish-English.xsd, but this time I have chosen to use <xs:redefine>,
 > because in these special dictionaries, I need to modify the SimpleType
 > "Subject" by extension.
------------^^^^^^^^^^^^^

The derivation methods for simple types are restriction, list and union, 
extension is for complex types. In case of redefinitions of simple types 
you can use only restriction, see
Schema Representation Constraint: Redefinition Constraints and Semantics
http://www.w3.org/TR/xmlschema-1/#src-redefine
***
5 Within the [children], each <simpleType> must have a <restriction> 
among its [children] and each <complexType> must have a restriction or 
extension among its grand-[children] the ·actual value· of whose base 
[attribute] must be the same as the ·actual value· of its own name 
attribute plus target namespace;
***

Best Regards,
George
-- 
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 9/22/10 2:23 PM, Marie Bilde Rasmussen wrote:
> Hello.
> I have an xml schema, let's call it dictionary.xsd, describing general
> structures and datatypes used in dictionaries. dictionary.xsd contains a
> definition of a SimpleType called Subjects. The SimpleType is a
> restriction of xs:string and it contains a long list of enumerations.
> Another - more specialized - schema, called Danish-English.xsd is built
> upon dictionary.xsd. This is done by using <xs:include>.
> A third - even more specialized - schema, called
> Danish-English-technical.xsd builds on it's turn upon
> Danish-English.xsd, but this time I have chosen to use <xs:redefine>,
> because in these special dictionaries, I need to modify the SimpleType
> "Subject" by extension.
> I cannot figure out how to do this. I am not allowed to do so.
> This has worked for me with only one level of inclusion. Could the fact
> that I want to redefine a schema on a level that is more than one
> nesting leve l"away" be the problem?
> below I have tried to illustrate the nesting and the Type Definitions:
> Danish-English-technical.xsd (redefines SimpleType "Subjects")
> ->
> redefines
> Danish-English.xsd
> ->
> includes
> dictionary.xsd (declares SimpleType "Subjects" as a restriction of
> xs:string by enumeration)
> I would be grateful for any input.
> Regards,
> Marie
Received on Wednesday, 22 September 2010 12:24:12 UTC

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