[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Rick Jelliffe quotable quote on the purpose of schemas

  • From: "Michael Kay" <mike@s...>
  • To: "'Philippe Poulard'" <Philippe.Poulard@s...>
  • Date: Wed, 13 Dec 2006 16:46:56 -0000

RE:  Rick Jelliffe quotable quote on the purpose of schemas
> so, new feature, new tag.

But one tag

<constraint test="(XQuery|XPath expression)"/>

should be enough - not 3000 tags.
> 
> > 
> > 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"/>

> 
> 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.

Michael Kay
 



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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.