DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17527>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17527

XMLUtils.serializeNodeToXML adds XML declaration.

           Summary: XMLUtils.serializeNodeToXML adds XML declaration.
           Product: Cocoon 2
           Version: Current CVS
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I'm having the following problem while using the XMLFormTransformer: when the
form contains an <xf:itemset> element, the output form the transformer contains
an XML declaration inside every <xf:item> element generated:

<xf:item ref="/[EMAIL PROTECTED] = 'possibiliEnti'][1]"><?xml version="1.0" 
encoding="UTF-8"?>
><xf:value ...

I think I have traced the origin of this to this call in
AbstractSAXTransformer.java (line 496):

serializedXML = (recordedDocFrag == null ? "null" :
XMLUtils.serializeNodeToXML(recordedDocFrag));

Indeed, from the logs, I can see that the serialized fragment has an XML
declaration:

DEBUG   (2003-02-28) 14:28.05:822   [xmlform.sitemap.transformer]
(/cupweb/new-presidio) Thread-9/AbstractSAXTransformer: END endRecording
fragment=<?xml version="1.0" encoding="ISO-8859-1"?>
<xf:value ref="id" xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002"/>

Therefore, I think the bug is in XMLUtils.serializeNodeToXML, which recently
started adding an XML declaration.

Reply via email to