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

Re: Are we losing out because of grammars?

  • From: Joe English <jenglish@f...>
  • To: xml-dev@l...
  • Date: Sat, 27 Jan 2001 13:18:57 -0800

grammar because

Rick Jelliffe wrote:

> I believe propronents of various schema paradigms (grammars and rule-based
> systems) need to justify that their paradigm is useful. When we only had
> grammars, it was a moot point. Now we have Schematron and other rule-based
> systems, there I think we can be bold enough to start to critique
> grammars-as-schemas.  (Of course, this is a two-way street.)

I think the utility of grammar-based schemas has been well established.
Just because there are some things they can't do doesn't mean the
things they *can* do aren't useful.

One of the biggest benefits of grammar-based schemata is that
they are generative: there is an enumeration procedure as well
as a decision procedure.  This makes things like syntax-directed
editors possible ("show me a list of all the elements that
I can insert at this point in the document"), and makes it
easier to verify transformations ("will this XSLT transform
always produce a valid HTML document when fed an input document
conforming to the specified source DTD?").

> Might we get
> to higher-level schema languages faster by completely ditching the grammar
> paradigm and treating schemas as systems of logical assertions which can be
> queried?

Well, yes; the existence of Schematron aptly demonstrates this point.
But it's not an either-or proposition: grammar-based and rule-based
schemas can work together quite nicely.


[ ... earlier ...]

> Lets contrast the grammar approach to a rule/path based approach (as in
> Schematron). In Schematron we don't have any ambiguity problem, because we
> don't have alternate paths for any location expression in the same way.

But there *is* an ambiguity issue in Schematron -- the requirement
that a node can match the context of at most one <rule>  in
a given <pattern>.  As you mentioned, this doesn't cause
a problem when trying to merge two schemas (just include all
the <pattern>s from both schemas), but the question of whether
all the <rules> within each of the original <pattern>s match
disjoint node-sets remains.


> XML does not have SGML's short refs and delimiter maps, so why does it now
> need grammar-based content-modeling?

XML doesn't need *any* kind of schema language, but lots
of XML applications benefit greatly from them.  Different
kinds of applications call for different kinds of schemas;
those based on tree-local and tree-regular grammars are still
very useful for "document-centric" applications (HTML, DocBook,
TEI, etc.).


--Joe English

  jenglish@f...

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.