XML Validation Facilities
http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Main
User Documentation

Concepts
Overview
Sitemap
Views
Caching
Actions
Matchers and Selectors
Entity Catalogs
MRUMemoryStore
Persistence
StoreJanitor
XMLSearching
XML Validation
Databases
Modules

NoteThis document is under development.

Goal

###

Overview

You really should validate documents in your editing environment. It is not the concern of Cocoon. However there are some facilities.

Warning: Validation facilities are under development

The validation facilities are under development in the head CVS. The RELAX NG grammars for each document type are basic (and some of them are just generated from old DTDs). The RNG with embedded Schematron rules (e.g. sitemap.rng) are minimal tests only and utilises Schematron Basic. Everything is experimental.

With that said, the validation system does work and is waiting for your help to extend it.

Operation

There are three validation targets in build.xml (see some internal notes). If you do not want validation to happen automatically during the build, then you can switch it off in ./properties.xml

Build target validate-config

2.1-dev and 2.0.5

./build.sh validate-config

Called automatically during the build (only 2.1) and can also be called from the command-line.

Validation of some core configuration files using RELAX NG. Currently doing: cocoon.roles, *.xsl, **/sitemap.xmap, and treeprocessor-builtins.xml (using DTD).

Build target validate-schematron

2.1-dev

./build.sh validate-schematron

Can only be called from the command-line.

Validation of all sitemap.xmap using Schematron rules embedded in RELAX NG grammars. (Very experimental.)

Build target validate-xdocs

2.1-dev

./build.sh validate-xdocs

Called automatically during the build, and can also be called from the command-line.

Validation of all core documentation/xdocs Currently doing: book.xml (using RELAX NG), *.xml (using DTD).

To Do
  • Is the validate-config stuff properly integrated in the build.xml ? Is it being called from all of the appropriate places? e.g. should it also be called from the default target "all"?
  • Integrate this build-time validation into 2.0.5 (currently standalone targets).
  • All of the RELAX NG grammars are basic and need enhancement.
  • The validate-schematron targets are particularly experimental.
  • After this build-time validation is settled, then perhaps we can also do run-time validation when sitemap changes are effected.
Stuff

See xml-forrest/src/resources/schema/relaxng/README.txt

See cocoon-2.0/tools/src/schematron/README.txt

See notes in the top of cocoon-2.0/src/webapp/WEB-INF/entities/sitemap-v06.rng

Further information
  • Organization for the Advancement of Structured Information Standards (OASIS)
  • Document Schema Definition Languages (DSDL) - ISO/IEC 19757 - DSDL
Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.