XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Rick Jelliffe quotable quote on the purpose of schemas

Michael Kay wrote:
>>so, new feature, new tag.
> 
> 
> But one tag
> 
> <constraint test="(XQuery|XPath expression)"/>
> 
> should be enough - not 3000 tags.

Because you focus on schema languages. As I said previously, Schematron, 
XQuery, XSLT, or this single tag maybe enough to express constraints. 
But they doesn't act at the component level, and they can be irrelevant 
in others operating and declarative markup languages.

> 
>>>Can you give me an example of a constraint which is difficult, or 
>>>verbose, to express in a declarative language such as XQuery?
>>
>>Here is one that you can't express in W3C XML Schema :
>>-the number of cells must be the same in all columns of the 
>>table http://reflex.gforge.inria.fr/tutorial/active-schema/datas.xml
> 
> 
> Yes, but it's still easy to express declaratively:
> 
> <constraint test="count(distinct-values(table/count(column)) = 1"/>

And it's no more difficult to define 2 content models with a switch.

> 
>>If this discussion were reduced to schemata, a language such 
>>as XQuery could be used to express additional constraints 
>>that you can't express with your favorite schema language ; 
>>this is the same as using Schematron, or by using XSLT for 
>>further validation. However, none of them act at the 
>>component level, that is to say at the content model level : 
>>an editor would propose you to insert an element which would 
>>be rejected by XQuery/Schematron/XSLT.
> 
> 
> Yes, grammars are good for that; it's hard to reproduce that in a
> predicate-based constraint language.

This is why I think that a dynamic approach can help to fill the gap.

> 
> Michael Kay
>  

-- 
Cordialement,

               ///
              (. .)
  --------ooO--(_)--Ooo--------
|      Philippe Poulard       |
  -----------------------------
  http://reflex.gforge.inria.fr/
        Have the RefleX !


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS