cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <>
Subject Re: xconf tool, entity resolver, and new build options
Date Fri, 23 May 2003 03:55:34 GMT
Marc Portier wrote:
> David,
> dear friend and colleague Bruno was actually suggesting to have 
> the parser not taking the DTD into account at all

The trouble is that if a DTD is declared in the input file,
then the parser has to resolve it, whether or not validation
is happening.

> underlaying question being if we really do want to maintain local 
> copies of all involved DTD's? (even apart from the licensing 
> issues surrounding it, this could become a management issue?)

That is right - we definitely do not want to keep copies of
these DTDs unless we must.

> and while typing this I start to realize there are even more 
> reasons on a technical level NOT to consider the DTD in this 
> patch-process:
> 1. the DTD will not be applied to ensure valid output (the 
> serializer doesn't do that)
> 2. the DTD will only be applied to confirm validity of the input 
> which in this case might very well incomplete since we want to 
> patch it anyway?

We are not attempting any validation of input or output.
Just trying to parse an xml file.

> 3. introducing the DTD might lead to introduction of the default 
> attribute setting (which isn't wrong, but a bit more then we want 
> to achieve, and getting maybe confusing for end-users)

Is this really a problem? Would users be looking at the
final xpatched web.xml file?

> so if we want valid docs in our proces we should have a 
> <validate> after the <xpatch> anyway

Forget xml validation - it is not the concern of XConfToolTask.

> to get there: not looking at the DTD could be done with
> builder.setFeature("", false)

> builder.setFeature("",

> false)
> allthough the last one might be only supported by Xerces.
> (see 

Am i right that xerces is not the parser being used in ? Anyway, i tried to add these "setFeatures"
but got compilation errors.

By the way, i now have the entity resolver working properly
with XConfToolTask, so if we need to then we can implement that.

> being really pragmatic: just dropping the DOCTYPE line in the 
> input docs should achieve the same :-/

That sounds like a good approach. However, Geoff mentioned
that the document type declaration might be required in web.xml
If it is not, then your suggestion might be the way to go.

In the back of my mind i keep thinking about Jeff Turner's
DoctypeChanger, which may be useful if we need to automatically
remove the declaration.


View raw message