On Thu, Dec 12, 2002 at 04:54:03PM +0100, Keiron Liddle wrote:
...
> > Including the DTDs would IMO be a good idea.  They are only 57k.  The
> > question is, what catalog-aware validation tool would you use?
> > 
> > I would suggest upgrading the version of Ant bundled with FOP to 1.6-dev
> > from CVS.  This includes <xmlcatalog> support for multiple external
> > catalogs.  So after editing xdocs, developers could type 'build
> > validate', and if everything passes, they can safely commit the xdocs.
> > Then check on http://forrestbot.cocoondev.org if the changes look okay..
> > and one day, trigger an xml-site commit from that site too.  Tada..
> > Forrest is no longer required for daily edits :)
> 
> That sounds like a good idea once things settle down. Especially for
> small patches.

If you decide that an Ant 'validate' target using built-in DTDs is a good
idea, I created a patch to add this to FOP:

http://cvs.apache.org/~jefft/tmp/fop-validate.zip

The patch adds about 900k to xml-fop.

Appended is the patch README.


--Jeff




                          FOP Validation Patch README

                         Jeff Turner <[EMAIL PROTECTED]>
                        ================================


Introduction
------------

This patch provides Ant-based validation of the various XML files used to
generate FOP's documentation.

The following files are validated:

src/documentation/content/xdocs/**/*.xml
src/documentation/sitemap.xmap
src/documentation/skinconf.xml
src/documentation/resources/stylesheets/**/*.xsl

The motivation is to prevent casual doc editors from having to download Forrest
to update content.  The whole point of XML documentation is to separate content
from presentation.  As long as the docs validate, it should be safe to check
them in, and then view the rendered website online at:

http://forrestbot.cocoondev.org/sites/xml-fop/

(updated every hour, or an update can be triggered)


Installation
------------

1) Copy everything in this directory (except this README) to the xml-fop/
directory.
2) In xml-fop, run 'patch -p0 < build.xml.diff', which adds a 'validate' target
to build.xml.
3) Delete lib/ant.jar, as it is no longer necessary.


Usage
-----

To validate XML files, run './build.sh validate' (Unix) or 'build validate'
(DOS).  For better feedback, add a '-v' option.  This should be done after an
XML edit, before checking into CVS.

If your editor supports catalogs, then it will be possible to validate docs as
you edit them.  Point your editor to the catalog files (either OASIS or XML
format) in tools/schema/


How it works
------------

- The current (2002-12-14) Forrest DTDs are installed in tools/schema/.
- A stripped-down Ant 1.6-dev is installed in tools/ant.
- The new build.{sh,bat} files (and unfortunately, appendcp.bat) will use the
  built-in Ant, which has external catalog support.
- The 'validate' target in build.xml will call tools/validate.xml, which
  contains <xmlvalidate> and <jing> validation tasks.  validate.xml is a
  stripped-down version of Forrest's forrest.build.xml, and so supports
  Forrest's fine-grained validation control properties specified in
  forrest.properties (see http://xml.apache.org/forrest/validation.html).


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to