Re: redefinition of SimpleType in nested schemas

Hi George,

You are right. And Thankyou. I just found the same paragraph in the spec
(grrrr!). I am ow considering a solution with a specialized vocabulary in a
separate element, placed in substitution group with my <Subject> element as
it's head. If substitution groups can't be <redefined>d, I'll allow these
<specialized-subject>-elements in the most general schema - these elements
probably won't bother my authors as much as if I expanded the Simpletype in
it's original definition, forcing them to choose from a list of alternatives
that would be far too long for them.

Thanks again!

best regards,
Marie
2010/9/22 George Cristian Bina <george@oxygenxml.com>

> 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:30:06 UTC