Taking Schematron QuickFix To The Next Level

Octavian Nadolu

Oxygen XML Editor

Abstract

The Schematron QuickFix (SQF) language can be used to improve efficiency and quality when editing XML documents. You can define actions that will add complex XML structure in your documents, make modifications in multiple places, or actions that will convert an XML structure into another. These changes are made by keeping the document structure valid and conforming to your project specification, and will help the content writer add content more easily and without making mistakes.

To build complex actions, you can mix the Schematron QuickFix language with ISO Schematron, or with different versions of XSLT and XPath, or you can define your own extensions using programming languages such as Java. This means that you can perform modifications in multiple external documents, or display dialog boxes to get input from your users, or use complex algorithms for processing the content of the documents.

The Schematron QuickFix is a modular language. Even though it is simple (it only has four types of operations that can be performed: add, delete, replace, and string replace), new types of operations can be created (such as wrap, unwrap, rename, or join). This can be implemented by using abstract quick fixes and by creating libraries of quick fixes that can be reused for various different XML vocabularies (such as DITA, DocBook. TEI). By using a library of quick fixes, it will help the Schematron QuickFix developers to create the actions more easily and reuse the quick fixes created by others.

This presentation will focus on some interesting use-cases and Schematron QuickFix examples that can be easily adapted to your projects. The examples will include both abstract quick fixes and complex quick fixes that use XSLT and Java.


Table of Contents

Introduction
Schematron QuickFix Language
Use Cases
Type of Users
Generate Content Using XPath
Change Text Using Regular Expressions
Using XSLT to Generate Content
Ignore Schematron Checks
SQF User Input Dialog
Abstract Quick Fixes
Multilingual Support in SQF
Generate Quick Fixes Dynamically
Conclusion
Bibliography