[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|