Next in thread → Next in month →

Re: [xml-dev] having problems with the "|" in field's element in the xs:key el ement

From
Bob Foster <>
To
Jeff Lowery <>, 'xml-dev' <>
Date
2003-05-23T01:15:29Z
ID
<044c01c320c8$cde4ae50$1401a8c0@snobird>
Thread
Re: [xml-dev] having problems with the "|" in field's element in the xs:key el ement
From: "Jeff Lowery" <>
> > I'm trying to understand why this is so:

You mean, why is this a hard problem? See
http://www.dcs.bbk.ac.uk/~ptw/icdt-talk.pdf.

> > If a document validator can know if a field occurrence is
> > optional in an instance's corresponding content model, then
> > how is it that a schema validator cannot know that a declared
> > key field is optional in its corresponding content model?
>>
> > The only thing I can think of that's different is that the
> > document validator may be able to narrow down the applicable
> > content models based on components that've already be read
> > from the document.

A document validator only has to check whether a given instance satisfies
the constraints in the schema. The other question requires the processor to
consider all possible instances.

A development tool might offer additional checking like this (though it is
kind of a rathole), since the answers are primarily useful for debugging
schemas, but such checks don't make validation more powerful and probably
shouldn't be required by a schema language. There is ample precedent, e.g.,

<!ELEMENT foo (foo)>

Bob
Next in thread → Next in month →