cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Helma van der Linden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COCOON-1686) [PATCH] COCOON-1671 Form not binding when prefix in binding definition is unequal to that in the instance data for the same namespace.
Date Wed, 23 May 2007 13:58:16 GMT

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

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

The patch has the same effect as setting the parameter in cocoon.xconf:

  <xml-parser class="org.apache.excalibur.xml.impl.JaxpParser" logger="core.xml-parser"
pool-max="${xml-parser.pool-max}">
    <parameter name="validate" value="false"/>
    <parameter name="namespace-prefixes" value="true"/> <!-- set to true to fix namespacing
problems -->
    <parameter name="stop-on-warning" value="true"/>
    <parameter name="stop-on-recoverable-error" value="true"/>
    <parameter name="reuse-parsers" value="false"/>
    <parameter name="drop-dtd-comments" value="true"/>
  </xml-parser>


This is a more elegant solution.

> [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.


Mime
View raw message