Return-Path: Delivered-To: apmail-xml-xalan-j-users-archive@www.apache.org Received: (qmail 67043 invoked from network); 18 May 2004 04:40:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 18 May 2004 04:40:20 -0000 Received: (qmail 84137 invoked by uid 500); 18 May 2004 04:40:46 -0000 Delivered-To: apmail-xml-xalan-j-users-archive@xml.apache.org Received: (qmail 84050 invoked by uid 500); 18 May 2004 04:40:45 -0000 Mailing-List: contact xalan-j-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list xalan-j-users@xml.apache.org Received: (qmail 83951 invoked by uid 98); 18 May 2004 04:40:44 -0000 Received: from sakai@ambisys.com by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(219.101.129.2):. Processed in 0.16899 secs); 18 May 2004 04:40:44 -0000 X-Qmail-Scanner-Mail-From: sakai@ambisys.com via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(219.101.129.2):. Processed in 0.16899 secs) Received: from unknown (HELO home.ambisys.com) (219.101.129.2) by hermes.apache.org with SMTP; 18 May 2004 04:40:43 -0000 Received: from pop by home.ambisys.com with scan (Ambisys 4.10) id 1BPwOW-0000gs-00 for xalan-j-users@xml.apache.org; Tue, 18 May 2004 13:40:00 +0900 Received: from [61.215.192.129] (helo=sakai) by home.ambisys.com with esmtp (Ambisys 4.10) id 1BPwOW-0000gn-00 for xalan-j-users@xml.apache.org; Tue, 18 May 2004 13:40:00 +0900 From: "Lewis D." To: Subject: Namespace lost in output XML Date: Tue, 18 May 2004 13:39:30 +0900 Message-ID: <000001c43c92$1c39ac50$9d65a8c0@sakai> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Virus-Scanner: VarioSecure SMTP 0.0-26: OK X-Ambisys-VC: 2656@faee57348ebed831997a510a1dd73685 X-Virus-Scanner: VarioSecure SMTP 0.0-26: OK X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, 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! Lewis