xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lewis D." <sa...@ambisys.com>
Subject Namespace lost in output XML
Date Tue, 18 May 2004 04:39:30 GMT

	First of all, sorry for such a newbie question.  I'm still a bit
new to all this XML thing, so please bear with my lack of knowledge in
this area.
	I have a DOM object (that I created using Xerces), and I've used
the setNamespaceAware(true) to enable namespacing on the factory object.
I used the createElementNS() method to create a root element with a
given namespace.  When I output the element's namespace (using
getNamespaceURI() on the root element), I get the namespace written out
to System.out.  When I then use Xalan to transform my DOM to XML for
file output, the namespace tags aren't included.  This is what I'm using
to output my DOM to XML:

	TransformerFactory factory = TransformerFactory.newInstance();
	Transformer transformer = factory.newTransformer();
	DOMSource source = new DOMSource(this.userPrefsDocument);
	StreamResult sysOutResult = new StreamResult(System.out);
	transformer.transform(source, sysOutResult);

I pretty much went along with Sun's JAXP tutorial.  Is there something
I'm doing wrong on the Xerces side, am I doing something wrong on the
Xalan side?  I'd appreciate any help on this.  Thanks in advance!


View raw message