On 13 Nov 2002 at 11:44, Oskar Casquero wrote:

> Hello,
> 
> I would like to know if it is posible to define two components that 
> implement parser role: one ofwould be the default parser of cocoon 
> (with its default configuration) and the other would use xerces 
> parser but with the validation feature turned on ...

Although this question better suits cocoon-user list... 

One may define its own components in cocoon.xconf like this:

<component 
    role="org.apache.avalon.excalibur.xml.Parser/Validating"
    class="org.apache.avalon.excalibur.xml.JaxpParser">
    <parameter name="validate" value="true"/>
    <parameter name="namespace-prefixes" value="false"/>
    <parameter name="stop-on-warning" value="true"/>
    <parameter name="stop-on-recoverable-error" value="true"/>
    <parameter name="reuse-parsers" value="false"/>            
</component>

Then lookup:

Parser parser = (Parser)manager.lookup(Parser.ROLE + "/Validating");

P.S.: This looks like good subject for FAQ/How-To/Snippet, isnt it?

Maciek Kaminski
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to