Focheck
XSL-FO validation using RELAX NG and Schematron.
Install / Use
/learn @AntennaHouse/FocheckREADME
<a name="en"></a>focheck – Validate XSL-FO and Antenna House extensions in oXygen or standalone
focheck bundles a Relax NG schema and a Schematron grammar in an oXygen framework for detailed validation of XSL-FO – including FOs and properties added in XSL 1.1 – within oXygen XML Editor. focheck also validates the extension FOs and properties that Antenna House Formatter provides for improved formatted output. You can enable additional Schematron checks of some of the requirements of PDF/UA.
You can, of course, also use the focheck Relax NG (or equivalent W3C XSD) and Schematron outside of oXygen, either together or separately.

The Relax NG handles structural validation and the Schematron handles the additional constraints that cannot be expressed in Relax NG. The Schematron parses property value expressions using an XSLT-based parser generated by the REx parser generator plus an XSLT library for reducing the parse tree to XSL-FO datatypes.
focheck version numbers correspond to the version.xml values of the Antenna House Formatter version current at the time of the release.
Disclaimer
focheck is a work in progress. It does not (yet) handle every XSL-FO property or every requirement in the XSL-FO spec, nor does it evaluate either functions or relative lengths.
Pull requests and new issues are welcome.
Installing
- If you want to keep up-to-date with focheck releases, then you can install focheck as an add-on oXygen framework.
- Versions of focheck have been bundled with oXygen since Oxygen 17.1.
- If you want to use the current focheck version with an older oXygen version, then you can install focheck as an add-on oXygen framework.
- Alternatively, you can download a static copy of the oXygen framework from GitHub.
- If you want to easily keep up-to-date with changes, then you can clone this repository and 'pull' the latest version whenever you want.
- If you want to hack on focheck or submit pull requests, then you can fork this repository and clone that onto your local machine.
Installing as add-on oXygen framework
Follow the instructions in the oXygen manual at https://www.oxygenxml.com/doc/ug-editor/topics/installing-and-updating-add-ons.html
The focheck update site URL is https://raw.githubusercontent.com/AntennaHouse/focheck/master/add-on.xml
Note that oXygen will require you to restart the editor after installing the add-on framework.
Installing a ZIP archive to oXygen frameworks directory
- Download the ZIP archive from the latest release on the 'Releases' page.
- Extract the folder in the ZIP archive to the oXygen
frameworksdirectory.
- On Windows, this is
C:\Program Files\Oxygen XML Editor 24.1\frameworks, or something similar. - If you don't have permission to copy the folder to the
frameworksdirectory, then you can use an alternative location as described below.
- Restart oXygen.
Installing a ZIP archive to an alternative frameworks location
If you don't have permission to modify the oXygen installation – for example, if oXygen is installed on Windows under C:\Program Files\ and you are not an Administrator – you can set oXygen to also use an alternative frameworks location.
- Click on the "Download ZIP" button on this project's main page to download the files.
- Extract the folder in the ZIP archive to a folder where you can create the new folder.
- In your oXygen preferences, add the focheck folder as an alternative frameworks location.
- See https://www.oxygenxml.com/doc/ug-editor/topics/framework-location.html
- Restart oXygen.
Installing a repository clone
- Clone the repository into either the oXygen
frameworksdirectory or another directory.
- focheck incorporates stf as a submodule. There are two ways to also check out stf:
- Pass
--recursivetogit clonewhen you check out focheck - If you've already checked out focheck, you can run
git submodule initgit submodule update
- Pass
- If necessary, add the focheck folder as an alternative frameworks location.
- Restart oXygen.
Using focheck
oXygen XML Editor
When you open an XSL-FO document – where the document element is root in the XSL-FO namespace – oXygen will automatically validate the document against both the Relax NG schema and the Schematron grammar.
'Antenna House' external FO processor
The transformation scenario expects Oxygen to have an 'Antenna House' FO processor configuration that runs the Antenna House command-line formatter.
If your Oxygen is not already configured:
- Oxygen will overwrite every current FO processor configuration in the following steps, so if desired, backup your current Oxygen global options by exporting them to a file.
- Install Antenna House Formatter V7.4 (64-bit version) then restart Oxygen.
- Download https://github.com/AntennaHouse/focheck/raw/master/resources/formatter-options/formatter-options.xml
- In Oxygen, under the Options menu, select Import Global Options....
- Select the
formatter-options.xmlfile that you downloaded then click on Open. - When the Import Global Options dialog box is displayed, click on Open.
- Oxygen will advise that a restart is required, but the FO processor configuration has been made already.
If you are using a different Antenna House Formatter version (for example, if these instructions have not been updated to refer to the current version), you can follow these instructions to add the FO processor configurations then edit the processor entries in the 'XML / PDF Output / FO Processors' preferences.
PDF/UA checks
Enable the 'PDF/UA Accessibility' validation scenario to enable additional Schematron checks of some of the requirements of PDF/UA.

Schematron severity levels
oXygen uses the Schematron role attribute to determine the severity level of a failed assert or report. See https://www.oxygenxml.com/doc/ug-editor/topics/validate-xml-with-sch.html
focheck maps the RFC 2119 keywords that are used in the XSL 1.1 Recommendation to oXygen severity levels as follows:
| RFC 2119 Keyword | oXygen severity level | | ---------------- | --------------------- | | MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT | Error | | SHOULD, SHOULD NOT, RECOMMENDED, MAY, OPTIONAL | Warning |
Transformation scenarios
As well as providing validation, focheck defines two validation scenarios for processing your FO file with Antenna House Formatter. See https://github.com/AntennaHouse/focheck/wiki/focheck
Ant
Use the build-focheck.xml Ant build file and the validate.single target to validate a file using both Relax NG and Schematron. Alternatively, use the schematron.single or schematron.dir target to run Schematron on one or multiple files.
Emacs mode
focheck.el associates the RELAX NG schema with .fo files. The fo-format command runs Antenna House Formatter (or any command-line formatter) on the current file.
If you have the lorem-ipsum package installed, you can generate Lorem Ipsum paragraphs and lists in FO markup (as well as sentences without markup).
Add this to your .emacs file.
(setq load-path
(append
(list
"/path/to/focheck/emacs"
)
load-path))
;; XSL-FO mode
(autoload 'fo-mode "focheck" "Major mode for editing XSL-FO." t)
(setq auto-mode-alist
(append
(list
'("\\.fo$" . fo-mode))
auto-mode-alist))
;; Uncomment if you have the `lorem-ipsum` package installed:
;(add-hook 'fo-mode-hook #'lorem-ipsum-fo-mode-hook)
Standalone
You can use the Relax NG schema in the schema folder and the Schematron files in the schematron folder outside of oXygen and Ant. However:
- The Relax NG schema works with Jing and with Emacs
nxml-modebut not withxmllint. - The Schematron requires an XSLT 2.0 binding and a Schematron implementation that will both match on attributes as contexts as well as import and use external XSLT 2.0 stylesheets.
- Use
focheck.schfor XSL-FO and Antenna House Formatter checks, and usepdf-ua.schfor checking some of the requirements of PDF/UA.
Standalone checking requires Saxon 9 and Jing. You can get Jing from https://github.com/relaxng/jing-trang/releases.
Building
oXygen XML Editor
- Open
build.xmlin oXygen. - Run the default "ANT" transformation scenario.
Standalone
- If the properties in
build.propertiesare not correct for your system, then copybuild.propertiestobuild.local.propertiesin the same directory and set the correct values there.
- You can delete or comment out any properties in
build.local.propertiesthat you don't need to change.
- Run Ant.
Other Ant targets
run.parser
Runs the parser on ${input}.
framework.zip
Makes a Zip archive of just the oXygen framework.
License
Copyright 2015-2025 Antenna House, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Emacs mode license
Copyright (C) 2016-2025 Antenna House
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the Licen
