You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Kazó Csaba <ka...@freemail.hu> on 2007/07/21 08:50:10 UTC

XML parser config in 2.2

Hi,

Is there an easy way to configure the xml parser in Cocoon 2.2? 2.1.X has a handy <xml-parser> block in cocoon.xconf, but I couldn't find anything similar in the latest version.

(I'm trying to activate namespace-prefixes for forms binding. While the developers are working on a proper solution to the namespace nightmare, this setting seems to solve some of the problems.)

Thank you in advance,

Csaba

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XML parser config in 2.2

Posted by Kazó Csaba <ka...@freemail.hu>.
Thank you, this ([2]) is indeed the config file I was looking for! And with the help of [4] I successfully set the property I wanted.

Two things I'd like to mention:

1) the cocoon/properties subdirectory you mentioned doesn't seem to work (and it's not listed on [4], so I guess no problem here), I put my properties file under cocoon/spring.

2) the format given at the bottom of [4] resulted in an exception (org.springframework.beans.factory.BeanInitializationException: Invalid key 'org.apache.cocoon.core.xml.SAXParser#nsPrefixes': expected 'beanName/property'); the suggested "my.special.beanName/property=somevalue" syntax does indeed work - maybe [4] needs to be updated?


Grzegorz Kossakowski wrote:

> Kazó Csaba pisze:
> > Hi,
> > 
> > Is there an easy way to configure the xml parser in Cocoon 2.2? 2.1.X has a handy <xml-parser> block in cocoon.xconf, but I couldn't find
> > anything similar in the latest version.
> 
> XML parsing functionality has been moved to a separate module[1] and Springified at the same time. I guess you are looking for this[2] bean 
> configuration file.
> 
> Now you may wonder how to change this configuration. You could change values in cocoon-xml-impl.xml file and rebuild that module. Rebuild 
> for configuration change? No, not in Cocoon 2.2, any more.
> 
> You should just create META-INF/cocoon/properties/xml-configuration.properties file in your block and take advantage of Spring 
> configurator[3], precisely, of this[4] functionality.
> 
> I hope that helps
> 
> [1] http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-xml/
> [2] http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-xml/cocoon-xml-impl/src/main/resources/META-INF/cocoon/spring/cocoon-xml-impl.xml
> [3] http://cocoon.zones.apache.org/daisy/cdocs-spring-configurator/g1/1304.html
> [4] http://cocoon.zones.apache.org/daisy/cdocs-spring-configurator/g1/1312.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XML parser config in 2.2

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Kazó Csaba pisze:
> Hi,
> 
> Is there an easy way to configure the xml parser in Cocoon 2.2? 2.1.X has a handy <xml-parser> block in cocoon.xconf, but I couldn't find
> anything similar in the latest version.

XML parsing functionality has been moved to a separate module[1] and Springified at the same time. I guess you are looking for this[2] bean 
configuration file.

Now you may wonder how to change this configuration. You could change values in cocoon-xml-impl.xml file and rebuild that module. Rebuild 
for configuration change? No, not in Cocoon 2.2, any more.

You should just create META-INF/cocoon/properties/xml-configuration.properties file in your block and take advantage of Spring 
configurator[3], precisely, of this[4] functionality.

I hope that helps

[1] http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-xml/
[2] http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-xml/cocoon-xml-impl/src/main/resources/META-INF/cocoon/spring/cocoon-xml-impl.xml
[3] http://cocoon.zones.apache.org/daisy/cdocs-spring-configurator/g1/1304.html
[4] http://cocoon.zones.apache.org/daisy/cdocs-spring-configurator/g1/1312.html

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org