Validators |
||||
Below are some XSL FO (XSLFO) schemata and validation tools developed at RenderX. Some of these tools have been used over time to validate input in various version of RenderX XEP. |
||||
Document Type Definition (DTD) |
||||
DTD-based validation provides an easy way to check the structure of XSL FO (XSLFO) documents. You only need a validating XML parser to use it. DTDs are supported by a vast number of tools, and can be used both for input validation and schema-aided editing. However, there are several limitations of DTD-based based validation in the case of XSL FO (XSLFO):
An unofficial document type definition for XSL Formatting Objects was developed at RenderX in 1999-2000. To the best of our knowledge, it was the first practical formal description for XSL FO (XSLFO). It was used to validate input data in RenderX XEP versions 1 and 2. The DTD presented on this page is a slightly updated version that includes some recent RenderX extensions. XSL FO DTD: fo.dtd |
||||
XSLT Stylesheet |
||||
Another apppoach to validation is a use of rule-based language such as XSLT. This approach has been implemented as a dedicated XSLT stylesheet. XSLT is a powerful language and allows to create a validator as elaborate as necessary. Besides the detailed validation, it provides a means to classify validity violations by severity, guarantees improved readability of messages and proper namespace support. Unfortunately, the solution also has considerable drawbacks:
XEP version 3 uses the stylesheet below to validate input data. XSL FO DTD: folint.xsl |
||||
Relax NG Schema |
||||
The Relax NG schema language is superior to the DTD-based validation in every aspect. It combines expressive power to performance. In addition, it can be used by advanced XML editors for document building. Compared to XSLT stylesheet, Relax NG has less evolved error-reporting mechanisms but guarantees higher performance. Thus the XSLT approach is more appropriate for manual validation (where validation report will be consumed directly by user), while Relax NG is more suitable for batch validation or validation of automatically generated documents where speed is an issue. As a service to the XSL FO (XSLFO) community, RenderX developed a Relax NG schema for XSL FO (XSLFO). RelaxNG schema modules: Relax NG schema for XSL FO (XSLFO) was presented at XML Europe 2004 Conference in Amsterdam, Netherlands. A slightly revised conference paper as well as presentation slides are available. The official proceedings paper can be found at IDEAlliance website. |