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] XML Schema 1.0 and Relax NG Only Partially SupportContext-Free Grammars

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]


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