Re: Constraints in XML Schema - Formal Language Background?

Hi Noah and the others,
I do not think that W3C XML Schema needs something like tree grammar too much, although a relaxation of the Unique Particle Attribution Rule forbidding nondeterministic content models would be a plus.
Currently I have a problem, which I do not know how to express with any sort of tree grammar. Consider the following:
...
<Arc FromId="1" ToId="2"/>
<Arc FromId="2" ToId="1"/>
<Arc FromId="1" ToId="2"/>
...

I want to detect whether (1) there are other Arc elements with the @FromId (Arc1) being equal to their @ToId (ArcX) and their @FromId (ArcX) being equal to the @ToId (Arc1). 
This can be expressed with Schematron's XPath Assertions. You could argue that I could model my content structure in a different way, so that grammars might capture these properties. But this is often counterproductive in terms of readability. Therefore, I think a flexible and user-friendly solution would be to have something like Schematron assertions in W3C XML Schema. And as XPath as a W3C standard is involved, I cannot imagine that there will be too much overhead in calculation. 
Or am I wrong? It would be nice to have some ideas here from a formal language point of view!
Greets, Jan



noah_mendelsohn@us.ibm.com schrieb am 07.01.03 00:24:27:
> >> you are absolutely right that the expressiveness of XML
> >> schema constraints should be improved
> 
> I agree.
> 
> >>  and XPath seems to be a natural option.
> 
> Yes, though certainly other options (Relax-like tree
> automata, something else grammar-based, etc.) should at
> least be considered before a decision is made.  I agree
> that XPath is a likely good choice.
> 
> > About performance: I think performance matters should
> > not guide the decision about wheter XPath-Constraints
> > should be added to the schema specification or not. If
> > performance is a matter then people can switch of
> > validation (or use only simple constraints).
> 
> Here I respectfully but strongly disagree.  It's
> essentially that my customers and those with whom they
> do business get consistent results when they validate a
> given document with a given schema.  If they say "Well,
> it was valid with XYZ-Corp.'s high performanc processor
> but not ABC's" we've got a mess.  The main reason to
> use XML is universal consistency and interop.  High
> performance schema processing is very, very important
> to IBM's customers, as is consistency of semantics.  I
> think we can get better co-occurrence constraints
> without sacrificing performance.
> 
> ------------------------------------------------------------------
> Noah Mendelsohn                              Voice: 1-617-693-4036
> IBM Corporation                                Fax: 1-617-693-8676
> One Rogers Street
> Cambridge, MA 02142
> ------------------------------------------------------------------
> 
> 

-- 

~~~~~~~~~~~~~
~   Jan Mendling
~   Güterstr.53
~   54295 Trier
~   0175-1636958
~~~~~~~~~~~~~
______________________________________________________________________________
Die vCard -  Ihr neues Kennzeichen  -  bei WEB.DE FreeMail!
http://freemail.web.de/features/?mc=021156

Received on Monday, 6 January 2003 20:25:07 UTC