Probably a stupid question but i would really appreciate some help :-/

In my implementation of XMLReader, i fire events like 

contentHandler.startElement(namespaceURI, localName, "", null);

to the TransformerHandler used as ContentHandler obtained from the code at [1] 
with an empty string as the element name

< attribute1="value"...

I'm pretty sure i have to make the TransformerHandler instance namespace aware 
(i.e. use the namespace URI and local name params and ignore the empty QName) 
but cannot figure out how to do that. Here's how i get my TransformerHandler, 
i dont use an actual XSLT as i only want to serialize from SAX 2 events:

[1]

TransformerFactory transFact = TransformerFactory.newInstance();
SAXTransformerFactory tf = (SAXTransformerFactory) transFact;
TransformerHandler handlerhandler = tf.newTransformerHandler();
Transformer transformer = handler.getTransformer();
transformer.setOutputProperty(OutputKeys.ENCODING, encoding);
transformer.setOutputProperty(OutputKeys.INDENT, indent ? "yes" : "no");
handler.setResult(streamResult);


    

Reply via email to