You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by David Crossley <cr...@indexgeo.com.au> on 2002/11/08 05:34:34 UTC

Re: Skin validation

Jeff Turner wrote:
> David Crossley wrote:
<snip/>

> > Ah i see. I am not using a project-specific skin.
> > 
> > I was wanting it to do validation of the main
> > forrest-site skin, etc. both during 'build.sh docs'
> > and the 'forrest' build ... i was trying some mods to
> > the "forrest-site" and "basic" skins.
> > 
> > I will keep looking. It must be a strange setting of
> > the forrest.validate.* properties.
> 
> Oh.. no, it deliberately doesn't validate those, on the assumption that
> Forrest wouldn't distribute broken stylesheets, and having every user
> validate them would slow things down.  If you think it's a good idea, we
> can add a forrest.validate.internal.skins (or something) property.

I was wondering if that might be the issue.
Yes, i think that it is vitally important to validate
the "internal" skins, as well as all config files,
and xdocs, and sitemaps, and stuff. Otherwise how do
we *know* that we are not distributing broken stuff.

I presumed that during "build docs" Forrest is treating
itself as yet another project. So i presumed that it would
therefore validate its own stuff (the targets do get called).
I now gather that this is not so.

Yes, i agree that every user should not need to do this
every time. However, if they are working on core Forrest
stuff (i.e. a developer) then we want them to validate
before sending patches.

Should i add a general validation target into the top-level
xml-forrest/build.xml that does various validation of
Forrest's core stylesheets and config files? It may better
belong at that level - forrest-shbat/forrest.build.xml
is getting quite full.

--David



Re: Skin validation

Posted by Jeff Turner <je...@apache.org>.
On Fri, Nov 08, 2002 at 05:53:14PM +1100, David Crossley wrote:
> Jeff, where did you get the brilliant
> src/resources/schema/relaxng/xslt.rng

It's James Clark's:

http://thaiopensource.com/relaxng/

linked to from the RNG home page.

> I would like to use it elsewhere, but not
> sure of its origin. Do we need to credit
> anyone with developing it?

I'll add a README to the directory.


--Jeff

> --David
> 
> 

Re: build-time validation of core config

Posted by Jeff Turner <je...@apache.org>.
On Mon, Nov 11, 2002 at 01:37:20PM +1100, David Crossley wrote:
> Recent changes now provide for build-time validation of
> the core Forrest configuration files.
> * all skinconf.xml
> * all sitemap.xmap
> * all XSL stylesheets

Good stuff, thanks.  I copied the sitemap validation into
forrest.build.xml as well, so all projects have their sitemaps validated:

validate-sitemap:
Error at URL "file:/tmp/testsite/src/documentation/sitemap.xmap", line
number 104, column number 46: attribute "cheesy" not allowed at this
point; ignored
BUILD FAILED
file:/home/jeff/apache/xml/xml-forrest/build/dist/shbat/bin/../forrest.build.xml:742:
Validation failed, messages should have been provided.

--Jeff

> 
> --David

Re: Skin validation

Posted by David Crossley <cr...@indexgeo.com.au>.
Jeff, where did you get the brilliant
src/resources/schema/relaxng/xslt.rng

I would like to use it elsewhere, but not
sure of its origin. Do we need to credit
anyone with developing it?
--David



build-time validation of core config

Posted by David Crossley <cr...@indexgeo.com.au>.
Recent changes now provide for build-time validation of
the core Forrest configuration files.
* all skinconf.xml
* all sitemap.xmap
* all XSL stylesheets

This shows up an error with the new editor sitemap, so
this is commented-out for now.
 src/resources/editor/editor.xmap
It uses an attribute for its map:pipeline called cacheable="true"
However, according to Cocoon there is no such attribute.
Rather it uses named pipelines. Does anyone know how to
properly express that? Then we can switch on validation of
all sitemaps.

--David




Re: Skin validation

Posted by David Crossley <cr...@indexgeo.com.au>.
Jeff Turner wrote:
> David Crossley wrote:
<snip/>
>
> > We are working on the same sort of thing at cocoon-dev, build-time
> > validation of core config files.
> 
> Oh yes.. currently, forrest.build.xml doesn't validate user sitemaps.  Is
> the cocoon RNG sitemap schema in a decent state?

It is at a basic state, and yes, working. The rules
needed to be simplified to get things started. Now they
can be tightened. I will bring that to Forrest soon.

--David



Re: Skin validation

Posted by Jeff Turner <je...@apache.org>.
On Fri, Nov 08, 2002 at 04:59:56PM +1100, David Crossley wrote:
> Jeff Turner wrote:
> > David Crossley wrote:
> <snip/>
> >
> > > Should i add a general validation target into the top-level
> > > xml-forrest/build.xml that does various validation of Forrest's core
> > > stylesheets and config files? It may better belong at that level -
> > > forrest-shbat/forrest.build.xml is getting quite full.
> > 
> > Yes, that's probably the best solution..
> > Only, because validation requires Ant 1.6, one couldn't build Forrest
> > with 'ant' anymore.  Everyone would need to use build.{sh,bat}.
> > 
> > +1 despite that.. it can always be fixed later.
> 
> The RELAX NG validation with Jing would work. That is what i intended
> to use. Great, i will proceed.

Good, thanks

> We are working on the same sort of thing at cocoon-dev, build-time
> validation of core config files.

Oh yes.. currently, forrest.build.xml doesn't validate user sitemaps.  Is
the cocoon RNG sitemap schema in a decent state?


--Jeff

> --David
> 
> 

Re: Skin validation

Posted by David Crossley <cr...@indexgeo.com.au>.
Jeff Turner wrote:
> David Crossley wrote:
<snip/>
>
> > Should i add a general validation target into the top-level
> > xml-forrest/build.xml that does various validation of Forrest's core
> > stylesheets and config files? It may better belong at that level -
> > forrest-shbat/forrest.build.xml is getting quite full.
> 
> Yes, that's probably the best solution..
> Only, because validation requires Ant 1.6, one couldn't build Forrest
> with 'ant' anymore.  Everyone would need to use build.{sh,bat}.
> 
> +1 despite that.. it can always be fixed later.

The RELAX NG validation with Jing would work. That
is what i intended to use. Great, i will proceed.
We are working on the same sort of thing at cocoon-dev,
build-time validation of core config files.
--David



Re: Skin validation

Posted by Jeff Turner <je...@apache.org>.
On Fri, Nov 08, 2002 at 03:34:34PM +1100, David Crossley wrote:
> Jeff Turner wrote:
> > David Crossley wrote:
> <snip/>
> 
> > > Ah i see. I am not using a project-specific skin.
> > > 
> > > I was wanting it to do validation of the main
> > > forrest-site skin, etc. both during 'build.sh docs'
> > > and the 'forrest' build ... i was trying some mods to
> > > the "forrest-site" and "basic" skins.
> > > 
> > > I will keep looking. It must be a strange setting of
> > > the forrest.validate.* properties.
> > 
> > Oh.. no, it deliberately doesn't validate those, on the assumption that
> > Forrest wouldn't distribute broken stylesheets, and having every user
> > validate them would slow things down.  If you think it's a good idea, we
> > can add a forrest.validate.internal.skins (or something) property.
> 
> I was wondering if that might be the issue.
> Yes, i think that it is vitally important to validate
> the "internal" skins, as well as all config files,
> and xdocs, and sitemaps, and stuff. Otherwise how do
> we *know* that we are not distributing broken stuff.

We Forrest committers are immune to the stupid mistakes that users make!
;)

> I presumed that during "build docs" Forrest is treating
> itself as yet another project. So i presumed that it would
> therefore validate its own stuff (the targets do get called).
> I now gather that this is not so.

If Forrest had a custom skin in src/documentation/skins, it would get
validated.

> Yes, i agree that every user should not need to do this every time.
> However, if they are working on core Forrest stuff (i.e. a developer)
> then we want them to validate before sending patches.
> 
> Should i add a general validation target into the top-level
> xml-forrest/build.xml that does various validation of Forrest's core
> stylesheets and config files? It may better belong at that level -
> forrest-shbat/forrest.build.xml is getting quite full.

Yes, that's probably the best solution..
Only, because validation requires Ant 1.6, one couldn't build Forrest
with 'ant' anymore.  Everyone would need to use build.{sh,bat}.

+1 despite that.. it can always be fixed later.


--Jeff

> --David
> 
>