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

Re: Is XML Schema a constraint language or a specification lan

  • From: "G. Ken Holman" <gkholman@CraneSoftwrights.com>
  • To: Roger L Costello <costello@mitre.org>,"xml-dev@l..." <xml-dev@l...>
  • Date: Wed, 21 Apr 2021 09:14:10 -0400

Re:  Is XML Schema a constraint language or a specification lan
My perspective is that any schema language is a constraint language.

When you say "Determining if an instance is valid is a matter of checking that the instance adheres to the specification." I would say "Determining if an instance is valid is a matter of checking that the instance does not violate any of the schema's constraints."

And one can say "An authoring tool directs the creation of content that does not violate any of the schema's constraints".

Different uses put different spins on the activity, but at the core is the activity is guided by sets of constraints.

That way you can have many sets of constraints using different technologies (W3C XML Schema, Schematron, etc.), and then selectively decide if an instance is valid against any or all sets of constraints.

RELAX-NG and DTDs define constraints as pattern grammars, W3C XML Schema defines constraints as type hierarchies, and Schematron defines constraints as content assertions.

Horses for courses.

I hope this helps.

. . . . . . Ken

At 2021-04-21 12:23 +0000, Roger L Costello wrote:
Hi Folks,

Is an XML Schema a constraint language? An XML Schema states constraints that must be satisfied by instances for them to be "valid". Determining if an instance is valid is a constraint satisfaction problem.

Or, is an XML Schema a specification language? An XML Schema is a specification that informs instance document authors how to construct instances. Determining if an instance is valid is a matter of checking that the instance adheres to the specification.

/Roger

_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php

--
Contact info, blog, articles, etc. http://www.CraneSoftwrights.com/x/ |
Check our site for free XML, XSLT, XSL-FO and UBL developer resources |
Streaming hands-on XSLT/XPath 2 training class @US$125 (5 hours free) |
Essays (UBL, XML, etc.) http://www.linkedin.com/today/author/gkholman |



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