Skip to content
David Maus edited this page Apr 14, 2019 · 5 revisions

Callback API

SchXslt follows the footsteps of the Skeleton implementation and lets you customize the reporting output. The callback API defines named templates that are called to create the parts of the validation stylesheet that report on active patterns, fired rules, failed asserts and successful asserts. The names of these templates live in the dedicated namespace which is conventionally bound to the prefix schxslt-api.

As of version 1.1 of SchXslt the API defines the following named templates:


Create part of the validation stylesheet that creates the report. This template is called after the report has been gathered.

<xsl:template name="schxslt-api:report">
  <xsl:param name="schema" as="element(sch:schema)" required="yes"/>
  <xsl:param name="phase" as="xs:string" required="yes"/>

The content of the report is available in the variable schxslt:report.


Create part of the validation stylesheet that reports an active pattern.

<xsl:template name="schxslt-api:active-pattern">
  <xsl:param name="pattern" as="element(sch:pattern)" required="yes"/>


Create part of the validation stylesheet that reports a fired rule.

<xsl:template name="schxslt-api:fired-rule">
  <xsl:param name="rule" as="element(sch:rule)" required="yes"/>


Create part of the validation stylesheet that reports a failed assert.

  <xsl:template name="schxslt-api:failed-assert">
    <xsl:param name="assert" as="element(sch:assert)" required="yes"/>


Create part of the validation stylesheet that reports a successful report.

  <xsl:template name="schxslt-api:successful-report">
    <xsl:param name="report" as="element(sch:report)" required="yes"/>

Maven artifact and Java classes

To ease integration in Java-based projects SchXslt is published as a Maven artifact name.dmaus.schxslt.schxslt. The artifact also provides Java classes implementing Schematron validation based on JAXP.


How to I pronounce SchXslt?

I didn't think about it when naming the project. I use to pronounce it [ʃˈɛksl̩t].

Is SchXslt open source?

Yes, SchXslt is released under the terms of the MIT license.

Clone this wiki locally
You can’t perform that action at this time.