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

Re: ISO Schematron beginners question: including multiple pat

  • From: rjelliffe@allette.com.au
  • To: xml-dev@lists.xml.org
  • Date: Tue, 15 Jun 2010 13:36:42 +1000

Re:  ISO Schematron beginners question: including  multiple pat
In the recent versions of the ISO Schematron distributions it implements
the extension proposed for the new revision of ISO Schematron.

This is that the <sch:extends> element can be used anywhere. (It was
initially just for abstract rules.)

So the difference is that <sch:include> includes the XML resource being
referenced. <sch:extends> includes the children of the (top-level element)
of the resource being referenced.

For example

<sch:schema ...>

  <sch:title>An example of extends</sch:title>

  <sch:extends href="schema-module-1.sch" />

  ...
</sch:schema>

where file schema-module-1.sch might be

<sch:schema ...>

  <sch:title>Schema Module 1</sch:title>

  <sch:ns prefix="abc" url="http://www.eg.com/ns/abc" />

  <sch:pattern id="p1">
     <sch:title>One interesting pattern</sch:title>
     ...
  <sch:pattern>

  <sch:pattern id="p2">
     <sch:title>Another interesting pattern</sch:title>
     ...
  <sch:pattern>


</sch:schema>

The inclusion is implemented in the iso-dsdl-include.xslt preprocessor
IIRC. I don't recall that the skeleton needed any changes to support it,
since the ordering of top-level elements in schematron is aimed at
sectioning the document for human readability rather than any processing
semantics.

So this gives three mechanism for modularity: <include> is only useful for
fine-grain fragments; <extends> is useful for any grouped elements and is
more "semantic"y in connotation; and @is-a operates at what XSD would call
the component level (but is only defined for patterns at the moment.)

Please let me know if it doesn't work, if it doesn't meet requirements, or
if you have any recommendations for a better and easier to
understand/explain/implement approach.

Cheers
Rick Jelliffe



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.