cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Ratcliffe" <>
Subject RE: Custom Transformer: attributes lost when serialized XML recording
Date Tue, 15 Jun 2004 02:59:58 GMT
Some further investigation shows that this is the default behaviour of
the SAX parser to not pass in the
namespace attribute with the rest of the element attributes in

I set the parser namespace-prefixes feature property to 'true' in
cocoon.xconf to allow the namespace
attribute to be passed through.

I'm still not seeing the namespace attribute when I output the document
fragment from endSerializedXMLRecording().

Any ideas?


-----Original Message-----
From: Adam Ratcliffe [] 
Sent: Tuesday, 15 June 2004 11:03 a.m.
Subject: Custom Transformer: attributes lost when serialized XML

I have a custom transformer that extends AbstractSaxTransformer for
making XML-RPC calls.  It extracts a method call element from an input
document and sends this to the remote service for processing.

My problem is that when I use the startSerializedXMLRecording() method
from AbstractSaxTransformer to collect the method call fragment it
records elements only and the namespace attribute on the top-level
element is lost.

This isn't a problem with the generator that creates the input document
as I can see the attributes if I serialize the document after

Is there a configuration step that I'm missing?

public void startElement(String uri, String name, String raw, Attributes
 throws SAXException {
 if (name.equals(XMLRPC_REQUEST_ELEMENT)) {
 } else if (name.equals(XMLRPC_SERVICE_ELEMENT)){
 } else if (name.equals(XMLRPC_METHOD_CALL_ELEMENT)) {
 } else {
            super.startElement(uri, name, raw, attr);

View raw message