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/02 11:39:10 UTC
Re: XML validation
Jeff Turner wrote:
> David Crossley wrote:
> > Excellent work Jeff. I am itching to try it out.
> >
> > I do not know if you are on cocoon-dev, but we have
> > been experimenting with RELAX NG validation (via Ant
> > at build-time) of the main config files, and perhaps
> > later with xdocs.
> >
> > We have often discussed RNG here on forrest-dev. Should we
> > have multiple validation systems in Forrest? I think so.
>
> Definitely. Switching on validation is likely to highlight the drawbacks
> of using DTDs. For instance, I found that half my docs don't validate
> because I'm using XInclude <xi:include> tags. I'm highly in favour of
> adding RNG schema tests, since we can do much stricter validation.
I commenced the RELAX NG validation stuff. For starters
it is doing skinconf.xml
I am not sure where to put it in the build. At the moment
it is in target "init-props". Later we will probably want to
validate other things, so somewhere different may be better.
Also i was not sure whether to put the Jing jar into
lib/optional or lib/core, so i opted for the latter.
Anyway it works.
--David
Re: XML validation
Posted by Peter Donald <pe...@apache.org>.
On Mon, 4 Nov 2002 15:39, David Crossley wrote:
> Try deliberately breaking your project's skinconf.xml
Or try using an alternate skinconf.xml schema/dtd :)
I use a slight variation and it would be great if there was property that
could be set in forrest.properties to turn off skinconf validation.
--
Cheers,
Peter Donald
*---------------------------------------------------------*
| Contrary to popular belief, UNIX is user-friendly. It |
| just happens to be selective on who it makes friendship |
| with. |
| - Richard Cook |
*---------------------------------------------------------*
Re: XML validation
Posted by Jeff Turner <je...@apache.org>.
On Mon, Nov 04, 2002 at 03:39:06PM +1100, David Crossley wrote:
> Jeff Turner wrote:
> > David Crossley wrote:
> > > Jeff Turner wrote:
> > > > David Crossley wrote:
> > > <snip>
> > > > > I commenced the RELAX NG validation stuff. For starters
> > > > > it is doing skinconf.xml
> > > >
> > > > Good stuff.. I'll write a tabs.xml validator too, since I had to loosen
> > > > the DTD contract to support @href.
> > > >
> > > > > I am not sure where to put it in the build. At the moment
> > > > > it is in target "init-props". Later we will probably want to
> > > > > validate other things, so somewhere different may be better.
> > > >
> > > > 'validate' target perhaps? :)
> > >
> > > I tried there, but i think that i found that it needed
> > > to happen earlier in the build.
> >
> > I've changed forrest.build.xml so 'validate' is called earlier, and then
> > moved the RNG stuff into it. Seems to work okay..
>
> No it doesn't. It was better where i had it.
>
> Try deliberately breaking your project's skinconf.xml then 'forrest'
> command reports some un-intelligible errors at 'load-project-props'
> target. The conf file gets validated by RELAX NG later on. Too late.
> That is why it was at 'init-props' target.
Oh okay. Should be fixed now. I've broken the skinconf validation into
a 'validate-skinconf' target, which is depended on by the <xmlproperty>
task.
--Jeff
> --David
>
Re: XML validation
Posted by David Crossley <cr...@indexgeo.com.au>.
Jeff Turner wrote:
> David Crossley wrote:
> > Jeff Turner wrote:
> > > David Crossley wrote:
> > <snip>
> > > > I commenced the RELAX NG validation stuff. For starters
> > > > it is doing skinconf.xml
> > >
> > > Good stuff.. I'll write a tabs.xml validator too, since I had to loosen
> > > the DTD contract to support @href.
> > >
> > > > I am not sure where to put it in the build. At the moment
> > > > it is in target "init-props". Later we will probably want to
> > > > validate other things, so somewhere different may be better.
> > >
> > > 'validate' target perhaps? :)
> >
> > I tried there, but i think that i found that it needed
> > to happen earlier in the build.
>
> I've changed forrest.build.xml so 'validate' is called earlier, and then
> moved the RNG stuff into it. Seems to work okay..
No it doesn't. It was better where i had it.
Try deliberately breaking your project's skinconf.xml
then 'forrest' command reports some un-intelligible errors
at 'load-project-props' target. The conf file gets validated
by RELAX NG later on. Too late. That is why it was at
'init-props' target.
--David
Re: XML validation
Posted by Jeff Turner <je...@apache.org>.
On Sat, Nov 02, 2002 at 10:51:47PM +1100, David Crossley wrote:
> Jeff Turner wrote:
> > David Crossley wrote:
> <snip>
> > > I commenced the RELAX NG validation stuff. For starters
> > > it is doing skinconf.xml
> >
> > Good stuff.. I'll write a tabs.xml validator too, since I had to loosen
> > the DTD contract to support @href.
> >
> > > I am not sure where to put it in the build. At the moment
> > > it is in target "init-props". Later we will probably want to
> > > validate other things, so somewhere different may be better.
> >
> > 'validate' target perhaps? :)
>
> I tried there, but i think that i found that it needed
> to happen earlier in the build.
I've changed forrest.build.xml so 'validate' is called earlier, and then
moved the RNG stuff into it. Seems to work okay..
--Jeff
> --David
>
Re: XML validation
Posted by David Crossley <cr...@indexgeo.com.au>.
Jeff Turner wrote:
> David Crossley wrote:
<snip>
> > I commenced the RELAX NG validation stuff. For starters
> > it is doing skinconf.xml
>
> Good stuff.. I'll write a tabs.xml validator too, since I had to loosen
> the DTD contract to support @href.
>
> > I am not sure where to put it in the build. At the moment
> > it is in target "init-props". Later we will probably want to
> > validate other things, so somewhere different may be better.
>
> 'validate' target perhaps? :)
I tried there, but i think that i found that it needed
to happen earlier in the build.
--David
Re: XML validation
Posted by Jeff Turner <je...@apache.org>.
On Sat, Nov 02, 2002 at 09:39:10PM +1100, David Crossley wrote:
> Jeff Turner wrote:
> > David Crossley wrote:
...
> > Definitely. Switching on validation is likely to highlight the drawbacks
> > of using DTDs. For instance, I found that half my docs don't validate
> > because I'm using XInclude <xi:include> tags. I'm highly in favour of
> > adding RNG schema tests, since we can do much stricter validation.
>
> I commenced the RELAX NG validation stuff. For starters
> it is doing skinconf.xml
Good stuff.. I'll write a tabs.xml validator too, since I had to loosen
the DTD contract to support @href.
> I am not sure where to put it in the build. At the moment
> it is in target "init-props". Later we will probably want to
> validate other things, so somewhere different may be better.
'validate' target perhaps? :)
> Also i was not sure whether to put the Jing jar into lib/optional or
> lib/core, so i opted for the latter.
I think lib/optional was a Centipede requirement.. I'll remove the
placeholder file.
--Jeff
> Anyway it works.
>
> --David
>
>