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

Re: Constraints in XML Schema

From: Jan Mendling <mendling@web.de>
Date: Mon, 30 Dec 2002 17:16:21 +0100
Message-Id: <200212301616.gBUGGLO11970@mailgate5.cinetic.de>
To: "StefanWachter" <Stefan.Wachter@gmx.de>
Cc: xmlschema-dev@w3.org

Hallo Stefan,

thank you for your hint. Does your constraint-implementation prove me right that there is a need for such a facility in XML Schema in general, not only in my case? I am wondering why it is not integrated in the specification. Even the unique-constraints are just allowed on a subset of Xpath-expressions. 
A reason could be performance. But what experiences did you make with performance and overhead costs in validating such Xpath-constraints? It could not be too much, because you probably just have to consider a set of Xpath-expression to be true or not. That can even easily be done by XSLT. Thus, the performance reason cannot count, otherwise the hole Xpath und XSLT would have to be considered as too expensive.
Did you try to present your concept to spec people pf XML Schema?

Jan



Stefan Wachter <Stefan.Wachter@gmx.de> schrieb am 30.12.02 16:52:09:
> Hi Jan,
> 
> maybe you can express and validate your constraints using Schematron. If you
> do not care about conformance then you can also use JBind (www.jbind.org). I
> augmented the XML schemas with an XPath-Constraint facility.
> 
> --Stefan
> 
> 
> > 
> > Hello and merry christmas,
> > 
> > I have a design problem with XML Schema. I am in the situation that it
> > would be very appealing to use something like Constraints (beyond the
> > uniqueness-constraints XML Schema offers with Key, Keyref and Unique).
> > 
> > Therefore, I was wondering whether there are attempts being made to
> > integrate a Constraint-Concept into XML Schema (something that we know
> from SQL
> > in the database area). In my design situation it would be nice to have
> > something like Xpath-Constraints. I am thinking of an Xpath-Statement that
> must
> > evaluate TRUE in order to validate an instance document against that XML
> > Schema. With such a mechanism it would be easy to build structures and
> allow
> > only certain content constellations. 
> > 
> > By now, I will probably fix my problem by defining a bunch of simple types
> > which capture these constraints implicitly with the use of regular
> > expressions. A not very elegant solution.
> > 
> > Any hints on constraints in any schema-language will be appreciated. I am
> > looking forward on your commends.
> > 
> > Best regards, 
> > Jan Mendling
> > 
> >
> ______________________________________________________________________________
> > Kursiv, fett, bunt,... WEB.DE FreeMail kann alles - mit der HTML-Mail
> > http://freemail.web.de/features/?mc=021143
> > 
> 

-- 

~~~~~~~~~~~~~
~†††Jan†Mendling
~†††GŁterstr.53
~†††54295†Trier
~†††0175-1636958
~~~~~~~~~~~~~
______________________________________________________________________________
Wenn POP fur Sie mehr als nur Musik ist. Senden Sie Ihre SMS direkt aus
Outlook oder Netscape! http://freemail.web.de/features/?mc=021177
Received on Monday, 30 December 2002 11:16:53 GMT

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