W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2004

RE: not a complete functional mapping - help

From: Lars Geldner <geldner.list.reg@gmx.net>
Date: Wed, 29 Dec 2004 18:50:17 +0100 (MET)
To: "Xan Gregg" <Xan.Gregg@jmp.com>
Cc: xmlschema-dev@w3.org
Message-ID: <5987.1104342617@www2.gmx.net>

Hello Xan, thanks for your reply.

Until now I have not found a solution. The goal is to define I complex type
(in my XSD: CurrType) that acts like a meta-type. This meta-type should
describe all possible types that child elements of that type can have. The
child elements could have any order in the meta-level.
The extension of that type is blocked, the restriction is allowed.

KURSType is a restriction of that meta-type. The child elements have to
appear in a special order. These child elements must have types which are
derived from the types described in CurrType.

You are right, XSV reports no errors. But my authoring system uses Xerces.
Is there any workaround to this problem?

Best regards,

Lars Geldner



> 
> I believe your example is valid per the spirit of the spec, but not the
> letter of the spec, 
> which is what Xerces enforces.  XSV reports the schema as valid (after
> filling in MODULType).
> 
> This a case that is covered by the note in the relevant section of the
> spec:
> 
>     Note: This clause is in principle more restrictive than absolutely
> necessary,
>     but in practice will cover all the likely cases, and is much easier to
> specify
>     than the fully general version.
> 
> I tried a few variations of your schema without any luck. Wrapping the
> choice in a 
> sequence seemed promising, but XML Schema doesn't even allow 
> 
>     <xsd:sequence maxOccurs="unbounded">
>       <xsd:element ref="A"/>
>     </xsd:sequence>
> 
> to be restricted by:
> 
>      <xsd:sequence>
>       <xsd:element ref="A"/>
>       <xsd:element ref="A"/>
>     </xsd:sequence>
> 
> xan
> 
> 

-- 
+++ Sparen Sie mit GMX DSL +++ http://www.gmx.net/de/go/dsl
AKTION für Wechsler: DSL-Tarife ab 3,99 EUR/Monat + Startguthaben
Received on Wednesday, 29 December 2004 17:50:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:48 GMT