API for Schematron 1.5 Skeleton
Rick Jelliffe, 20001/02/02 draft only
This document provides documentatin on the XSLT API available in the
Schematron 1.5 implementation called skeleton1-5.xsl. This is an
updated version of the new architecture contributed by Oliver Becker
for Schematron 1.3.
The skeleton is an XSLT script which provides all the basic parsing and validating routines
for compiling a Schematron 1.5 schema into XSLT. Schematron was designed to
allow many different uses, and the skeleton gives you a headstart in creating
a customized implementation. You just need to write XSLT templates to override the
default ones. (The program you write is sometimes called a meta-stylesheet.)
Phases and error reporting are handled by the skeleton with no interaction
with a metastylesheet.
process-prolog
The process-prolog template gets called at the start of the validation
session. It has no parameters. The default implementation is no action.
process-root
The process-root template processes the root element of the
schema (which is not the same thing as the root of the document /
and need not be the document element /*) .
- node-list $contents
- XML SystemId $icon
- The URI of an icon
- XML ID $id
- The unique identifier with the schema for the schema element.
- SGML FPI $fpi
- The Formal Public Identifier for this schema.
- IETF language $lang
- The human language used in this schema
- string $schemaVersion
- The version of the schema, perhaps a datestamp.
- string $title
- The title of this schema
- "1.5" $version
- The version of Schematron being used
process-assert
The process-assert template handles asserts whose
test has failed.
- XML IDREFS $diagnostics
- A list of the diagnostic elements related to the current assertion
- XML ID $id
- The unique identifier with the schema for the assert element.
- XML SystemId $icon
- The URI of an icon
- XML NMTOKEN $role
- A name for the generic role of this assertion. The schema creator
would have their own vocabulary.
- XPath $subject
- A path relative to the current context to some interesting node
considered the subject.
- node-list? $text
- (to write)
process-diagnostic
The process-diagnostic template handles diagnostic
messages for assert statements that have failed and
report statements that have succeeded.
- XML ID $id
- The unique identifier with the schema for the diagnostic element.
- node-list? $text
- (to write)
process-dir
The process-dir template handles bi-directionality markup,
which is only needed by certain human scripts such as Arabic.
- "ltr" or "rtl" or "" $value
- Left-to-right or right-to-left or unspecified
process-emph
The process-emph template handles the markup of
emphasized text in paragraphs, assertions and diagnostics.
It has no parameters.
process-message
The process-message handles default outputing of text.
- string $pattern
- Some text that may be some kind of pattern
- string $role
- Some text that may be some kind of role
process-name
The process-name templates handle
name strings that can be used in assertions.
asssert and report only provide
name subelements rather than the more general
value-of elements to encourage plain language
and generic descriptions rather than specific diagnostics,
for which purpose the diagnostics elements are
used.
- string $name
- The name of the current element, or of the node specified
by a name element
process-ns
The process-ns template reports on ns declarations,
which are used to transmit on namespace information by the skeleton.
- Namespace NCName $prefix
- The prefix of a namespace
- XML SystemId $uri
- The (internationalized) URI Reference of a namespace
process-p
The process-p template handles paragraphs.
- XML NMTOKEN $class
- An attribute that can be used for stylesheet style
- XML ID $id
- The unique identifier with the schema for the p element.
- XML SystemId $icon
- The URI of an icon
- IETF Language $lang
- The human language used in this paragraph
process-pattern
The process-pattern reports on the start of evaluation
of a pattern element.
- XML SystemId $icon
- The URI of an icon
- XML ID $id
- The unique identifier with the schema for the pattern element.
- string $name
- The title of the current pattern
- XML SystemId $see
- A (internationalized) URI reference to some supporting or defining documentation
process-report
The process-report template handles report whose
test has succeeded.
- XML IDREFS $diagnostics
- A list of the diagnostic elements related to the current assertion
- XML ID $id
- The unique identifier with the schema for the report element.
- XML SystemId $icon
- The URI of an icon
- XML NMTOKEN $role
- A name for the generic role of this assertion. The schema creator
would have their own vocabulary.
- XPath $subject
- A path relative to the current context to some interesting node
considered the subject.
- node-list? $text
- (to write)
process-rule
The process-rule reports that a rule element has fired: its
context attribute matched some nodes. .
- XSLT expression $context
- The expression that gives the context of the current
- XML ID $id
- The unique identifier with the schema for the rule element.
- XML NMTOKEN $role
- A name for the generic role of this rule. The schema creator
would have their own vocabulary.
process-span
The process-span handles span elements, which are generic
elements for styling, like HTML's .
- XML NMTOKEN $class
- An attribute that can be used for stylesheet style
process-value-of
The process-value-of template handles value-of
elements, which are used in diagnostic messages to allow very specific
hinting .
- XPath $select
- The path of some node that will be evaluated and printed.