cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Helma van der Linden <h.vanderlin...@mi.unimaas.nl>
Subject CForms binding with namespaces error - advice wanted
Date Tue, 22 May 2007 15:07:38 GMT
Guys,

once again I run into a problem with cforms binding with a namespaced 
source.

Turns out that the namespace is not passed on to the 
JXPathBindingManager. There are (at least?) 3 open JIRA issues on this 
topic:

https://issues.apache.org/jira/browse/COCOON-1595
https://issues.apache.org/jira/browse/COCOON-1671
https://issues.apache.org/jira/browse/COCOON-1686

The last one provides some patches that are reported to work.  It 
basically add the following to JXPathBindingManager.createBinding:

// Create the SAX parser and set the features so it creates the events 
we need
                SAXParser parser = 
(SAXParser)manager.lookup(SAXParser.ROLE);
                if( parser instanceof Parameterizable ) {
                    Parameters params = new Parameters();
                    params.setParameter("namespace-prefixes","true");
                    ((Parameterizable)parser).parameterize(params);
                }

but I'm wondering if that is the correct place to do that.

OTOH, if it's done at a more global scale, would that have unwanted 
side-effects?

Any ideas?

Bye, Helma


Mime
View raw message