You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Keiron Liddle <ke...@aftexsw.com> on 2002/12/12 16:54:03 UTC

Re: Ant-based local doc valiation

On Thu, 2002-12-12 at 16:16, Jeff Turner wrote:
> Yes.  There is nothing wrong with FOP grabbing the latest DTDs from
> Forrest and including them locally.  That is effectively what users of
> Forrest binary distributions do; they're using an old snapshot of the
> DTDs.

The problems at the moment I think are with versioning and what might
happen in the future. This would require updating with external changes
rather than relying on the external directly.

How stable etc. are things?

> 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.

What do others think?


I have a question. Why does the compliance.html work for the forrestbot
but not on my machine.
I get the error:
Failed to create InputSource:
file://<valid_path>/xml-fop/src/documentation/resources/schema/dtd/compliance-v10.dtd

The file exists in that location (yes I have checked). So why can it not
find the dtd. Is there a "/" missing or something like that. The
"file:/" prepends a valid unix path.



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Ant-based local doc valiation

Posted by Jeff Turner <je...@apache.org>.
On Thu, Dec 12, 2002 at 04:54:03PM +0100, Keiron Liddle wrote:
> On Thu, 2002-12-12 at 16:16, Jeff Turner wrote:
> > Yes.  There is nothing wrong with FOP grabbing the latest DTDs from
> > Forrest and including them locally.  That is effectively what users of
> > Forrest binary distributions do; they're using an old snapshot of the
> > DTDs.
> 
> The problems at the moment I think are with versioning and what might
> happen in the future. This would require updating with external changes
> rather than relying on the external directly.
>
> How stable etc. are things?

No DTD changes for the last 2 months.

AFAIK, forrest-dev is completely lacking in bearded SGML gurus.  So far,
we have treated DTD versioning like code versioning: increment the
version on large or backwards-incompatible changes.  I have no idea if
this is adequate in practice, or if we must create a new DTD with every
minor edit.

<snip: using Ant for validation>
> 
> I have a question. Why does the compliance.html work for the forrestbot
> but not on my machine.
> I get the error:
> Failed to create InputSource:
> file://<valid_path>/xml-fop/src/documentation/resources/schema/dtd/compliance-v10.dtd
> 
> The file exists in that location (yes I have checked). So why can it not
> find the dtd. Is there a "/" missing or something like that. The
> "file:/" prepends a valid unix path.

Hmm.  I get the same message, but build/site/compliance.html renders
fine.  I presume it does on your box too?

As for the forrestbot, possibly the script is only logging stdout, not
stderr.  I'll look into it.

--Jeff

Re: Ant-based local doc valiation

Posted by Jeff Turner <je...@apache.org>.
On Thu, Dec 12, 2002 at 04:54:03PM +0100, Keiron Liddle wrote:
> On Thu, 2002-12-12 at 16:16, Jeff Turner wrote:
> > Yes.  There is nothing wrong with FOP grabbing the latest DTDs from
> > Forrest and including them locally.  That is effectively what users of
> > Forrest binary distributions do; they're using an old snapshot of the
> > DTDs.
> 
> The problems at the moment I think are with versioning and what might
> happen in the future. This would require updating with external changes
> rather than relying on the external directly.
>
> How stable etc. are things?

No DTD changes for the last 2 months.

AFAIK, forrest-dev is completely lacking in bearded SGML gurus.  So far,
we have treated DTD versioning like code versioning: increment the
version on large or backwards-incompatible changes.  I have no idea if
this is adequate in practice, or if we must create a new DTD with every
minor edit.

<snip: using Ant for validation>
> 
> I have a question. Why does the compliance.html work for the forrestbot
> but not on my machine.
> I get the error:
> Failed to create InputSource:
> file://<valid_path>/xml-fop/src/documentation/resources/schema/dtd/compliance-v10.dtd
> 
> The file exists in that location (yes I have checked). So why can it not
> find the dtd. Is there a "/" missing or something like that. The
> "file:/" prepends a valid unix path.

Hmm.  I get the same message, but build/site/compliance.html renders
fine.  I presume it does on your box too?

As for the forrestbot, possibly the script is only logging stdout, not
stderr.  I'll look into it.

--Jeff

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Ant-based local doc valiation

Posted by Jeff Turner <je...@apache.org>.
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 <je...@apache.org>
                        ================================


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: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org