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

Re: Redeclaring attribute in derived type

From: Jesse McCarthy <mccarthy36@earthlink.net>
Date: Mon, 24 Dec 2001 18:48:06 -0500
To: jeni@jenitennison.com, xmlschema-dev@w3.org
Message-ID: <MWMail.bqdagamt@host.none>
Jeni Tennison <jeni@jenitennison.com> wrote on 12/22/01 3:38:03 AM:

>I assume that this element could appear just about anywhere (otherwise
>you could probably constrain it more easily using content models)?

I have an element X.  Within X there are several element types that can 
appear only once each, in any order, and an additional element type that may 
appear more than once. 

>Another approach that you could use would be to use a different type
>for the id attribute (e.g. xs:Name) and create an identity constraint
>with xs:key within the declaration for the document element, something
>  <xs:key name="uniqueElement">
>    <xs:selector xpath=".//elementName" />
>    <xs:field xpath="@id" />
>  </xs:key>
>(This says that within the document, every element called
>'elementName' has to have a unique value for its id attribute.)
>Since this doesn't use xs:ID as the attribute type, this would enable
>you to use 'fixed' to fix the value of the id attribute.

Yeah that sounds interesting, I'll have to look into it.

>Well, Xerces-C++ and now Xerces-J v2 claim to cover all of XML Schema
>now. I haven't tried Xerces-J yet, but I haven't yet come across
>anything that Xerces-C++ doesn't handle. Those are both from

Those don't sound like stand-alone, end user applications (?).

>There's also MSXML4 (although that implementation is still a bit
>dodgy, particularly with identity constraints) and MSV (multi-schema
>validator from
>I think it's a good idea at the moment to have a range of validators
>to try things out with.

Thanks for the suggestions, I'll check them out.

// Jesse
Received on Monday, 24 December 2001 18:57:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:56 UTC