cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: svn commit: r591496 - in /cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src: main/java/org/apache/cocoon/forms/datatype/ test/java/org/apache/cocoon/forms/datatype/ test/resources/org/apache/cocoon/forms/datatype/
Date Fri, 23 Nov 2007 03:57:12 GMT
On 02.11.2007 18:24 Uhr, gkossakowski@apache.org wrote:
> Author: gkossakowski
> Date: Fri Nov  2 15:24:41 2007
> New Revision: 591496
> 
> URL: http://svn.apache.org/viewvc?rev=591496&view=rev
> Log:
> Fixed FlowJXPathSelectionList test-case by:

>   * fixed generation of SAX stream so if it is serialized it contains namespace declaration
(I'm not sure if it's right fix)

> +        //FIXME: I added attribute for namespace declaration because it would not be
serialized otherwise
> +        //why it's not printed even if we specify necessary information in startElement()
method? (GK)
> +        AttributesImpl attrs = new AttributesImpl();
> +        attrs.addAttribute("", FormsConstants.INSTANCE_PREFIX, "xmlns:" + FormsConstants.INSTANCE_PREFIX,
AttributeTypes.CDATA, FormsConstants.INSTANCE_NS);
> +        contentHandler.startElement(FormsConstants.INSTANCE_NS, SELECTION_LIST_EL, FormsConstants.INSTANCE_PREFIX_COLON
+ SELECTION_LIST_EL, attrs);

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.

Joerg

Mime
View raw message