[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: Paul Tchistopolskii <paul@q...>
  • To: James Clark <jjc@j...>
  • Date: Thu, 01 Feb 2001 00:12:04 -0800

two layer grammars

To me this way is a bit different from what SQL does.

In SQL :

1. The second layer ( triggers ) is the 'slave', 
but the core layer ( create table ) is the 'owner' 

2. Not only layer 1 is using entities from layer 2, 
but layer 2 is also using entities from layer 1 - and 
the result is 'kinda elegant'.

In your design it looks like Schematron is the 'owner', 
and TREX is the 'slave' == library for regular expressions 
( because this is what TREX really is ). This gives  
us the "high-level language" == Schematron 
driving the show, and I don't like it.

Your design is very consistent. I just think it is 
not what happens in SQL.

Maybe it is also possible to attach 
the Schematron rules to TREX patterns ( like 
perl is attaching functions to the parts of 
regular expressions ) but I'm not sure that the 
resulting mix will be as good as it is in SQL.

I'm sorry - my English is not sufficient for explaining the 
subtile differences I'm trying to talk about.


----- Original Message ----- 
From: James Clark <jjc@j...>

> > I'd prefer it another way.
> > 
> > 1. Let's assume that I have some schema, expressed in terms of RELAX.
> > ( SQL 'core' == simple CREATE TABLE )
> > 
> > 2. Now I want to write some 'more complex' rules / constraints a-la Schematron
> > ( SQL 'layer 2' == constraints and / or  triggers ).
> > 
> > 3. I want to write 2 sometimes using the entities which I've defined at the step 1.
> For TREX, at least, I can think of several ways in which you could
> integrate it with something like Schematron. For example, you could add
> a <validate> element to Schematron that would occur as a child of <rule>
> just like <assert> and <report>.  The semantics would be an assertion
> that the tree rooted at the context node matched the TREX pattern in the
> <validate> element.  A more elaborate possibility would be to have a
> top-level element (ie child of the schema element) that defines named
> TREX patterns, then add an XPath extension function that tests whether
> the tree rooted at the current node matches a particular named pattern;
> you would probably also need some way to give a helpful message
> pinpointing how it failed to match.
> James


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.
First Name
Last Name
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.