Proposal for improvements in the next version of xml schema

1. Allow to define keyref identity constraints on types. Restricting 
key and unique identity constraints to elements is understandable, 
but doing the same for the keyref is very bothersome. I believe it 
would not put strain on validators to validate the keyref if it is on 
the type, and it would simplify the design of schemata tremendously. 
Currently it is quite difficult to search for any use of a type and 
then verify that the necessary keyref constraint has indeed been 
defined there.

2. In key and unique identity constraints, allow XPath expressions of 

the kind: X/Y/CharacterTree//Node
i.e. with a single // in the middle rather than only:
//Node or //X/Y

The current solution FORCES artificial design on naming elements. For 
example, you can not have two trees, largely identically structured 
(perhaps with nodes that are derived types) that use the same element 
names within, but are differentiated by differently named starting 
points. Another way to express this: although you could reuse the 
node type fully or perhaps with an abstract base type and two 
different extensions, this is prevented by the constraint on the 
xpath. The xpath will force the recursive node elements to have 
different names if attributes/elements used as key values exist on 
the nodes to which a keyref shall refer. If the type is reused, it 
will cause that both derived key types will end up in the same unique 
or key value space. 

Thanks a lot for all the work!

Gregor Hagedorn (
Institute for Plant Virology, Microbiology, and Biosafety
Federal Research Center for Agriculture and Forestry (BBA)
Koenigin-Luise-Str. 19          Tel: +49-30-8304-2220
14195 Berlin, Germany           Fax: +49-30-8304-2203

Often wrong but never in doubt!

Received on Friday, 28 November 2003 08:48:53 UTC