You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Scott Yeadon <sc...@anu.edu.au> on 2006/01/20 06:16:08 UTC
configuring Xerces features in Cocoon
Hi,
Is there a way via cocoon configuration to set Xerces properties and
features? I have a DocBook document which has a DOCTYPE declaration
which I don't want to validate or refer in any way to the DTD. I can do
this by setting
http://apache.org/xml/features/nonvalidating/load-external-dtd to false
(validation is false by default) in Java but would prefer not to have to
add Java just to set a parser property. I changed the parser in Cocoon
to be Xerces and added the above property as a parameter, but Xerces
seems to ignore this.
i.e.
<xml-parser class="org.apache.excalibur.xml.impl.XercesParser" ...
<parameter name="
http://apache.org/xml/features/nonvalidating/load-external-dtd"
value="false"/>
</xml-parser>
Scott.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: configuring Xerces features in Cocoon
Posted by Scott Yeadon <sc...@anu.edu.au>.
Yes, a local copy is one of the alternatives but I'd rather not have to
hold a copy of all the DTDs I need, seems like unnecessary duplication.
The other thing I can do is make a custom generator so I can access the
parser but that seems a fairly clunky way to get control over the parser
parameters.
Scott.
Andrew Stevens wrote:
>> From: Scott Yeadon <sc...@anu.edu.au>
>> Date: Fri, 20 Jan 2006 16:16:08 +1100
>>
>> Hi,
>>
>> Is there a way via cocoon configuration to set Xerces properties and
>> features? I have a DocBook document which has a DOCTYPE declaration
>> which I don't want to validate or refer in any way to the DTD. I can
>> do this by setting
>> http://apache.org/xml/features/nonvalidating/load-external-dtd to
>> false (validation is false by default) in Java but would prefer not
>> to have to add Java just to set a parser property.
>
>
> I don't know whether that's possible, but as an alternative approach
> have you considered adding the DTD to the entity resolver's catalog
> (WEB-INF/entities/catalog*) so that it can use a local copy instead of
> trying to fetch it from a remote server?
>
>
> Andrew.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: configuring Xerces features in Cocoon
Posted by Andrew Stevens <at...@hotmail.com>.
>From: Scott Yeadon <sc...@anu.edu.au>
>Date: Fri, 20 Jan 2006 16:16:08 +1100
>
>Hi,
>
>Is there a way via cocoon configuration to set Xerces properties and
>features? I have a DocBook document which has a DOCTYPE declaration which I
>don't want to validate or refer in any way to the DTD. I can do this by
>setting http://apache.org/xml/features/nonvalidating/load-external-dtd to
>false (validation is false by default) in Java but would prefer not to have
>to add Java just to set a parser property.
I don't know whether that's possible, but as an alternative approach have
you considered adding the DTD to the entity resolver's catalog
(WEB-INF/entities/catalog*) so that it can use a local copy instead of
trying to fetch it from a remote server?
Andrew.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org