PageSeeder has in-built document validation technology based on Schematron . Schematron is an ISO standard for processing XML documents and the screenshot below (Fig. 1) shows a PSML document validated using the Best Practice schema that comes with PageSeeder.
This schema demonstrates a small sample of Schematron capabilities and can be customized to suit more specific needs. When authoring documents, there are several advantages to Schematron when compared to conventional XML schemas (W3C *.xsd files), including:
- much better error and warning messages – instead of cryptic parser messages designed for programmers, Schematron messages are written for specific circumstances (
do not embed a photo without including a credit and copyright statement). This improves productivity and reduces training and author frustration
- ability to prioritize information – all information is not equal, so while all documents created in PageSeeder are always valid against the PSML schema. Schematron makes it easy to add extra checking to areas of specific importance such as complex references, metadata or detailed content such as addresses or part numbers.
Although different to the approach used by conventional XML editing tools Schematron allows developers to validate for more constructs than W3C XML schemas and requires less time to implement.
Single file validation
PageSeeder provides a validation tab for all PageSeeder documents. It will use the Schematron schema specific to the document if any and fallback on PageSeeder's best practice schema.
A more powerful feature of PageSeeder is the ability to validate a entire collection of documents. This can be done by selecting specific documents from search results or by validating a folder.
Batch validation is very useful for QA or when the structure or semantics of documents needs to evolve.
For example, batch validation can be used for:
- Checking that assets match specific constraints (e.g. their dimension, resolution etc.) before being published
- Ensuring all cross references are resolved
- Diagnosing any structural issue that may not be supported in a publish process
- Ensuring domain specific semantics
Configuring a Schematron schema
The easiest way to configure a Schematron for a specific document type is to use the Document Types page in the Developer Tools.
There are several examples of Schematron rules in the Schematron code samples.