[ http://issues.apache.org/jira/browse/COCOON-1686?page=all ]
Jean-Baptiste Quenot reassigned COCOON-1686:
--------------------------------------------
Assign To: Jean-Baptiste Quenot
> [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: http://issues.apache.org/jira/browse/COCOON-1686
> Project: Cocoon
> Type: Bug
> Components: Blocks: Forms
> Versions: 2.1.8
> Reporter: Michael Schlotfeldt
> Assignee: Jean-Baptiste Quenot
> 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.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira