forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: [RT] Validation includes and excludes
Date Thu, 23 Oct 2003 11:33:10 GMT
On Thu, Oct 23, 2003 at 12:30:43PM +0200, Nicola Ken Barozzi wrote:
> Jeff Turner wrote:
> 
> >On Wed, Oct 22, 2003 at 07:26:24PM +0200, Nicola Ken Barozzi wrote:
> >
> ...
> >>I mean, why do we sometimes need to exclude validation? site.xml ... it 
> >>should validate ok, as it has no DTD and so it should check that it's 
> >>only well-formed...
> >
> ><xmlvalidate> asserts that files are *valid*.  site.xml isn't, so it
> >fails.
> 
> I read here: http://ant.apache.org/manual/OptionalTasks/xmlvalidate.html
> 
>  "This task checks xml files are valid (or only well formed)."
> 
> So I guessed that adding lenient would make it work in this case.
> The problem is that the lenient attribute does not use simple 
> well-formdness as a fallback in case of missing DTD but as a normal 
> procedure.
> 
> IMHO patching this task to make it check only if it's well formed if 
> there is not DTD info would solve the problem.

It would have to be a optional though, off by default in Ant.  Perhaps:

<xmlvalidate ...>
  <fallback>
    <xmlwellformed ...>
      <fallback>
        <fail message="XML not wellformed or valid"/>
      </fallback>
  </fallback>
</xmlvalidate>

> >>I'd really like to make this simpler... maybe checking for .valignore 
> >>files as we have .cvsignore files? Maybe putting a meta tag or a comment 
> >>tag in the xml pages to prevent validation on them?
> >>
> >>Till I don't see the need of these excludes I fail to decide on the 
> >>solution... help!
> >
> >What's the problem?  Almost all .xml files in content/xdocs ought to
> >validate, so having to exclude some files shouldn't be a major issue.
> 
> IIUC you mean that changing from the current multi-line validation 
> settings to a single exclude property should do it?

No, I mean I have no idea what you're on about :)  The exclude is
specified as one comma-separated value in forrest.properties:

forrest.validate.xdocs.excludes=site.xml,*.dtdx.xml

I don't see what's wrong with this existing mechanism.

> I tend to agree, what got me thinking was the fact that there are so
> many in place now. I always use the one exclude line, but I'm just one
> user.
> 
> >The real problem seems to be that Cocoon has bugger-all validation
> >capabilities.  Validation would ideally be done in the pipeline, with a
> ><map:validate type="..."/> component.
> 
> Not really... Cocoon traverses the site, but I want to validate all xml 
> artifacts in a project and in Forrest that are not source files.

Yes, there's config files 'n things, but they have a well-defined
location and should never be excluded.

> Besides validation a sdone now is *much* faster than anything done by
> Cocoon.

Cocoon does have a magical ability to slow things down, but in theory,
validation in a pipeline on preparsed XML should be faster..


--Jeff

> I'm just trying to do one step at a time and keep changes simple, so 
> IMHO keeping external validation but with new include/exclude rules is 
> what we need ATM.
> 
> -- 
> Nicola Ken Barozzi                   nicolaken@apache.org
>             - verba volant, scripta manent -
>    (discussions get forgotten, just code remains)
> ---------------------------------------------------------------------

Mime
View raw message