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

Re: Schemas as Promises and Expectations


phase one p21 for sale
From: "Don Park" <donpark@d...>

> Having a schema representation of the parts the RSS reader is interested in
> will be pretty useful.  Unfortunately, I don't think current schema
> languages support this use-case well.

I think Schematron may.  It allows you to bundle constraints into phases, that
are useful at various stages during processing the document.

For example, one phase might reflect the RSS schema's standard constraints.
Another phase might reflect the promises of the system that generated the
data.  And a third phase might reflect the expectations of the system that
is receiving the data.

These kinds of overlaid promises/expectations are clumsy to represent with
conventional schema languages, in particular because they don't have mechanisms
to name them, nor to maintain variants within a single schema. 

In Schematron you do this by adding

  <phase name="Standard_RSS">
        <active pattern="p1" />
        <active pattern="p2" />
        ...
  </phase>
  <phase name="Ricks_Promises">
        <active pattern="p11" />
        <active pattern="p12" />
        ...
    </phase>
  <phase name="Dons_Expectations"> 
        <active pattern="p11" />
        <active pattern="p21" />
        <active pattern="p22" />
        ...
    </phase>

and you select the phase you want to run as an invocation parameter.

There is an interesting generalization of this, which came out at an ISO DSDL
meeting, that perhaps the result of validation should be the detection of the
state of a document (i.e. usable in some kind of state machine) rather than just
a boolean validity (and other outcomes). In other words, validation may not
only mean "The expected data was there and in the right places" but also
"the expected data was there and in the right places according to state X".
This would fit schemas into forms systems more. Not sure what the layering
should be.

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.