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

Jörg Heinicke commented on COCOON-2155:
---------------------------------------

Some c&p errors:

Index: 
src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.java
===================================================================
--- src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.java 
(revision 606943)
+++ src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.java 
(working copy)
@@ -116,6 +116,7 @@
         }
 
         // Start the selection-list
+        contentHandler.startPrefixMapping(FormsConstants.INSTANCE_PREFIX, 
FormsConstants.INSTANCE_PREFIX);
         contentHandler.startElement(FormsConstants.INSTANCE_NS, 
SELECTION_LIST_EL, FormsConstants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, 
XMLUtils.EMPTY_ATTRIBUTES);
         if( this.nullable ) {
             final AttributesImpl voidAttrs = new AttributesImpl(  );

The second INSTANCE_PREFIX must be INSTANCE_NS.

Index: src/main/java/org/apache/cocoon/forms/datatype/EnumSelectionList.java
===================================================================
--- src/main/java/org/apache/cocoon/forms/datatype/EnumSelectionList.java       
(revision 606943)
+++ src/main/java/org/apache/cocoon/forms/datatype/EnumSelectionList.java       
(working copy)
@@ -96,6 +96,8 @@
                                     Locale locale)
     throws SAXException {
         try {
+            contentHandler.startPrefixMapping(FormsConstants.INSTANCE_PREFIX, 
FormsConstants.INSTANCE_NS);
+            contentHandler.startPrefixMapping(FormsConstants.I18N_PREFIX, 
FormsConstants.INSTANCE_NS);
             contentHandler.startElement(FormsConstants.INSTANCE_NS, 
SELECTION_LIST_EL, FormsConstants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, 
XMLUtils.EMPTY_ATTRIBUTES);
             // Create void element
             if (nullable) {

The second INSTANCE_NS must be I18N_NS.

Regarding adding namespace declarations to the XML documents in cocoon-core and 
cocoon-template: This should not be necessary as they are really superfluous. I 
know though that Cocoon leaves superfluous namespace declarations in the 
documents. Instead of relying on the behavior that the actual Cocoon components 
always produce these superfluous namespace declarations it is probably better 
to remove them. This should be possible using RedundantNamespacesFilter.

> Failing test cases due to additional attributes from namespace declarations 
> in a DOM from parser, but not from serializer
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: COCOON-2155
>                 URL: https://issues.apache.org/jira/browse/COCOON-2155
>             Project: Cocoon
>          Issue Type: Bug
>          Components: * Cocoon Core
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Grzegorz Kossakowski
>         Attachments: COCOON-2155-cocoon-core.patch, 
> COCOON-2155-cocoon-forms-impl.patch, COCOON-2155-cocoon-template-impl.patch, 
> COCOON-2155-parent-pom.patch
>
>
> Quoting Joerg:
> "Just an explanation: A namespace declaration is not an attribute (even 
> if it looks so) and that's why it should not end as such. The DOM 
> produced by Cocoon is absolutely correct, the one by parsing expected 
> document in the test case is not since it has both the namespace 
> declaration AND an attribute xmlns:fi - which broke our test."
> (http://article.gmane.org/gmane.text.xml.cocoon.devel/75975)
> Also see this: http://article.gmane.org/gmane.text.xml.cocoon.devel/75974

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