cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <...@outerthought.org>
Subject Re: [cforms] add lenient setting to context binding
Date Sat, 20 Dec 2003 14:50:25 GMT


Timothy Larson wrote:
> In JXPathBindingBase.java, was this line removed on purpose:
>     jxpc.setFactory(new DOMFactory());
> 

nope, that's me being a bit clumsy :-(

> Perhaps this is the cause of this users's continuing problems:
>   http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=107176523405519&w=2
> 

I think so too, thx for pointing out


fixing now...
-marc=

> Should it be added to makeJXPathContext() like this:
>     private JXPathContext makeJXPathContext(Object objModel) {
>         JXPathContext jxpc;
>         if (!(objModel instanceof JXPathContext)) {
>             jxpc = JXPathContext.newContext(objModel);
>             jxpc.setLenient(true);
>             //-- Add the following two lines ---
>             if (objModel instanceof Node)
>               jxpc.setFactory(new DOMFactory());
>             //----------------------------------
>         } else {
>             jxpc = (JXPathContext) objModel;            
>         }
>         return jxpc;
>     }
> 
> For reference, this snippet in revision 1.5:
>     JXPathContext jxpc; 
>     if (!(objModel instanceof JXPathContext)) {
>         jxpc = JXPathContext.newContext(objModel);
> 
>         if (objModel instanceof Node) {
>             jxpc.setFactory(new DOMFactory());
>         }
>     } else {
>         jxpc = (JXPathContext) objModel;
>     }
> 
> was changed to this in revision 1.6:
>     JXPathContext jxpc = makeJXPathContext(objModel);
> 
> WDTY?
> 
> --Tim Larson
> 
> 
> __________________________________
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing.
> http://photos.yahoo.com/
> 

-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/
mpo@outerthought.org                              mpo@apache.org


Mime
View raw message