[ 
https://issues.apache.org/jira/browse/COCOON-1686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498183
 ] 

Helma van der Linden commented on COCOON-1686:
----------------------------------------------

Apart from the fact that these patches are outdated now, they should not be 
applied since they can cause unwanted side effects. See the discussion:

http://www.mail-archive.com/[email protected]/msg51943.html


> [PATCH] COCOON-1671 Form not binding when prefix in binding definition is 
> unequal to that in the instance data for the same namespace.
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: COCOON-1686
>                 URL: https://issues.apache.org/jira/browse/COCOON-1686
>             Project: Cocoon
>          Issue Type: Bug
>          Components: Blocks: Forms
>    Affects Versions: 2.1.8
>            Reporter: Michael Schlotfeldt
>         Attachments: DomHelper.txt, JXPathBindingManager.txt
>
>
> This is a patch to solve bug entry COCOON-1671.
> The problem was the SAX parser used in createBinding(Source) of 
> JXPathBindingManager did not have the 
> "http://xml.org/sax/features/namespace-prefixes"; set to true. This ment the 
> namespaces could not be extracted from the DOM when calling 
> getInheritedNSDeclarations(Element). Therefore the JXPathContext was never 
> having namespaces registered.
> Enabling the features solves these problems. The patch (which is against the 
> SVN as of today) that are being submit changes 2 files: (1) DomHelper.java 
> (2)JXPathBindingMangager
> In DomHelper I added an additional parse method that takes a SAXParser in 
> place of the servicemanager. This way you can set features on the SAXParser 
> before the parsing to dom is done. The parse method that existed before still 
> does but i modified that as well so it uses the new method so we do not 
> duplicate code.
> Three more things:
> 1. My experinece with Excalibur is not complete. I am unsure if i can lookup 
> the SAXParser and then parametize it. Or if it should be done another way. 
> The patch looks it up and then parametizes this. I believe this is the 
> correct way, but if it is not please let me know.
> 2. The SAXParser used by JXPathBindingMangager no turns on the feature we 
> want. But the JaxpParser class from Excalibur (which is what is returned) has 
> a system print out in it if you enable the feature we are now.  So everytime 
> a binding occurs it says: "NAMESPACE PREFIX!!!!!!!!!!!!!!!!!!!!!!!!!!". If 
> anybody has acces to the repository for that class PLEASE remove that line. 
> It shoudl not be there.
> 3. There is another bug report for the form samples (#6) that uses namespace 
> binding. I need somebody to confirm this but it appears that this patch also 
> fixes that bug report. The number for that report is:   COCOON-1595

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to