From dev-return-97928-apmail-cocoon-dev-archive=cocoon.apache.org@cocoon.apache.org Fri Dec 28 01:29:20 2007 Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 66662 invoked from network); 28 Dec 2007 01:29:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Dec 2007 01:29:19 -0000 Received: (qmail 31243 invoked by uid 500); 28 Dec 2007 01:29:07 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 31163 invoked by uid 500); 28 Dec 2007 01:29:07 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 31152 invoked by uid 99); 28 Dec 2007 01:29:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Dec 2007 17:29:07 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Dec 2007 01:28:52 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D125B7141EB for ; Thu, 27 Dec 2007 17:28:43 -0800 (PST) Message-ID: <27900019.1198805323853.JavaMail.jira@brutus> Date: Thu, 27 Dec 2007 17:28:43 -0800 (PST) From: =?utf-8?Q?J=C3=B6rg_Heinicke_=28JIRA=29?= To: dev@cocoon.apache.org Subject: [jira] Commented: (COCOON-2155) Failing test cases due to additional attributes from namespace declarations in a DOM from parser, but not from serializer In-Reply-To: <254739.1198696723244.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COCOON-2155?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554637 ]=20 J=C3=B6rg Heinicke commented on COCOON-2155: --------------------------------------- Some c&p errors: Index: src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionLi= st.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.= java=09(revision 606943) +++ src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.= java=09(working copy) @@ -116,6 +116,7 @@ } =20 // 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 =3D new AttributesImpl( ); The second INSTANCE_PREFIX must be INSTANCE_NS. Index: src/main/java/org/apache/cocoon/forms/datatype/EnumSelectionList.jav= a =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- src/main/java/org/apache/cocoon/forms/datatype/EnumSelectionList.java= =09(revision 606943) +++ src/main/java/org/apache/cocoon/forms/datatype/EnumSelectionList.java= =09(working copy) @@ -96,6 +96,8 @@ Locale locale) throws SAXException { try { + contentHandler.startPrefixMapping(FormsConstants.INSTANCE_PREF= IX, FormsConstants.INSTANCE_NS); + contentHandler.startPrefixMapping(FormsConstants.I18N_PREFIX, = FormsConstants.INSTANCE_NS); contentHandler.startElement(FormsConstants.INSTANCE_NS, SELECT= ION_LIST_EL, FormsConstants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLU= tils.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 super= fluous. I know though that Cocoon leaves superfluous namespace declarations= in the documents. Instead of relying on the behavior that the actual Cocoo= n components always produce these superfluous namespace declarations it is = probably better to remove them. This should be possible using RedundantName= spacesFilter. > Failing test cases due to additional attributes from namespace declaratio= ns 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-fo= rms-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= =20 > if it looks so) and that's why it should not end as such. The DOM=20 > produced by Cocoon is absolutely correct, the one by parsing expected=20 > document in the test case is not since it has both the namespace=20 > 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 --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.