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

Re: XML Schema 1.0 and Relax NG Only Partially SupportContext-

  • From: Rick Jelliffe <rjelliffe@allette.com.au>
  • To: "Roger L. Costello" <costello@mitre.org>
  • Date: Thu, 2 Jan 2014 11:03:33 +1100

Re:  XML Schema 1.0 and Relax NG Only Partially SupportContext-

I dont think the heading is a useful conclusion.  You usually only refer to a grammar by the class that parses all the members, not by a sub or superset.

Say you had a schema language, and it only allowed one element. It too would 'only partially support context free grammars'.  But that is like saying that the sound 'a' partially supports all the world's speech. The exceptions are more than the correspondences.

I have a new puppy: do i partially support all pets? Well, yes but really no: if i support only a small clear distinct well-recognised subset (ie 1) then it is misleading to say i partially support all pets. It muddies the waters that the classes are supposed to clarify.

Rick

PS I think there is also a useful distinction to be made between power and expressiveness: some "simple" constraints need great power, and some complex constraints need (a grammar type allowing) great expressiveness: regular expressions are not powerful but they are expressive. Xpaths are powerfull but not so expresive: an xpath that acted like a regular expression with axes and predicates would be best:  e.g.  a, child::b*, child::c

PPS Btw. Combining two threads, what about this: matching plus intersectability/openness?
<assert test='count(a) = count(b)  and not(a/preceding-sibling::b)'>
a^n,b^n  ignoring other elements
</assert>
It would be ok to say that schematron partially supports CFGs. Indeed, it may fully support them for all i know (eg if used with xslt2, and making use of function definitions).

On 02/01/2014 4:39 AM, "Costello, Roger L." <costello@mitre.org> wrote:
Hi Folks,

Did you know that neither XML Schema 1.0 nor Relax NG has the power to express this very simple grammar:

        The content of BookStore shall be N Book elements
        followed by N Magazine elements.

That is, BookStore must contain an equal number of Book and Magazine elements.

It's true.

Neither XML Schema 1.0 nor Relax NG can express that basic context-free grammar.

That's sad.

More ... http://xfront.com/XML-Schema-1-0-and-Relax-NG-Partially-Support-Context-Free-Grammars.pdf

/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


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