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

Re: ANN: XML Schema Compilation Project on SourceForge

  • From: Rick JELLIFFE <ricko@g...>
  • To: ",'xml-dev@x...'" <xml-dev@x...>
  • Date: Sat, 22 Apr 2000 01:00:55 +0800

compilation xml
 
"Arnold, Curt" wrote:
> 
> You are invited to join a project to an open-source XSLT-based compiler for XML Schema.

I welcome Curt's initiative. From his careful comments on the XML Schema
drafts, he seems a person with the technical awareness to keep something
like this on track.

And the news on the RELAX mailing list is also very heartening.

On the issue of XML Schemas being compiled into Schematron, I am
interested in knowing if anyone can come up with content models that
could not be validated by a Schematron schema automatically generated
from an XML Schema so that, for every unique particle in an element
complex type:
	1) an assertion statement is created for all the allowed successors of
that particle within that parent
	2) an assertion statement is created for all the allowed predecessors
of that particle within that parent
	3) an assertion statement is created giving the effective minOccurs of
that element within the whole type
	4) an assertion statement is created giving the effective maxOccurs of
that element within the whole type.

These simply derivable rules seem to validate most of the constraints in
most content models. But I can see a family of cases where these don't
capture everything: that is the case of particles repeated in different
contexts.  For example, a content model like
	( a{3-4}, b, a{5-6} ) 
would by the above translation rules have the assertions
 <rule context="x/a">
  <assert 
   test="following-sibling::b or following-sibling::a or
position()=count(parent::*/*)"
  >Allowed successors...</assert>
  <assert 
   test="previous-sibling::b or previous-sibling::a or position()=1"
  >Allowed predecessors...</assert>
 </rule>
  <rule context="x/b">
  <assert 
   test="following-sibling::a"
  >Allowed successors...</assert>
  <assert 
   test="previous-sibling::a"
  >Allowed predecessors...</assert>
 </rule>
  <rule context="x">
   <assert test="count(a) &gt; 7 and count(a) &lt; 11"
   >(max and min on a)</assert>
   <assert text="count(b) =1 "
   >(max and min on b)</assert>
but that corresponds to a slightly weaker content model:
   ( a,  (( b, a{7-10}) 
     ( a,  (( b, a{6-9}) 
      | ( a,  (( b, a{5-8}) 
       | ( a,  (( b, a{4-7}) 
        |( a,  (( b, a{3-6}) 
          |( a,  (( b, a{2-5}) 
            |( a,   b, a{1-4}) 
      ))))))))))))
i.e. 
	( a{1-7}, b, a{1-9} ) where a>7 and a<11

If we can find any convenient way to represent these kind of grouping
constraints (and other similar ones) then it is possible that the
approach based on assertions on two-step path models is more powerful
that grammars (for modeling constraints, which is only one of the things
that a schema language can be for: a schema language can also allow
naming of structures present according to some analytical paradigm such
as "type" or "pattern"). (Of course, if allowed an infinite number of
subcontexts within an assert, that would give us a better purchase (in
the mountaineering sense) but I am trying to resist that if possible.

If anyone has any ideas or inspiration on this (especially formal
approaches) then please feel free to email me or to continue this
discussion on Curt's mail list  XSDComp (where is seems to fit in).

Thanks
Rick Jelliffe

***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

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.