[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: Rick Jelliffe <ricko@a...>
  • To: xml-dev@l...
  • Date: Thu, 01 Feb 2001 22:58:36 +0800

schematron 1.6
From: Paul Tchistopolskii <paul@q...>

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

Or really it is saying that the context selection mechanism mechanism (like
the left-hand side of a production) can be considered separate from the
right-hand side which makes certain assertions?   In other words, that
XPaths are very nice for the selector, but it would be useful to have a
richer selections of possible assertions.  That is very interesting to me: I
have been whinging that we need a schema framework language (where the
selection mechanism is independent of the typing from the assertion
languages) to support extensible schema languages, and perhaps Schematron
already provides such a thing under my nose!

From: James Clark <jjc@j...>

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

Actually, I have been considering something like this, for Schematron 1.6,
but
I have not wanted to do anything until Schematron 1.5 was birthed and
weaned.

{By the way, as a secret pre-announcement before tommorrow, the new
implementation of Schematron 1.5 is finally available, supporting phases
(i.e. command line selection of bundles of patterns to be validated, allows
workflow and different effective schemas during a documents lifetime),
better error handling, better message support, a pink bilby/bandicoot, and
merging the namespace/non-namespace branches, still very small code for what
it can do:
   http://www.ascc.net/xml/resource/schematron/index.html#news   }

What I was considering was simple picture datatypes along the lines of this
   <rule context="x/y/z">
        <picture variables="YYYY MM DD" mask="YYYY-MM-DD">
            <assert test="($YYYY) > 2000" >Year must be in new </assert>
            <assert test="($MM) = 11 or ($MM) = 12"
                    >Month must be November or December</assert>
        </picture>
    </rule>
which I believe could (changing as needed) be compiled into XSLT string
operations without tears.  Some people prefer picture masks to regular
expressions (and, in any case, I would prefer to provide complementarity to
existing schema languages, even though obviously I think the rules-based
approach has the most potential.)

So James' <validate> idea would fit into that quite suitably (probably
<assert foreign="..."> and <report foreign="">... would be better tagnames
to keep the names used to the absolute minimum, since we still would be
making assertions).  Sorry to discuss this on XML-DEV; I had better switch
to the Schematon mail list to persue this further.

Thanks for the ideas James and Paul!

Cheers
Rick Jelliffe




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.