Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 24879 invoked from network); 16 Nov 2004 13:29:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 16 Nov 2004 13:29:34 -0000 Received: (qmail 45191 invoked by uid 500); 16 Nov 2004 13:29:31 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 45133 invoked by uid 500); 16 Nov 2004 13:29:31 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 45118 invoked by uid 99); 16 Nov 2004 13:29:30 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [213.215.135.187] (HELO pro-netics.com) (213.215.135.187) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 16 Nov 2004 05:29:28 -0800 Received: from mail.pro-netics.com ([127.0.0.1]) by mail.pro-netics.com with esmtp; Tue, 16 Nov 2004 14:27:11 +0100 id 0039EB1D.419A002F.00000979 Received: from 212.102.67.12 (SquirrelMail authenticated user d.madama) by mail.pro-netics.com with HTTP; Tue, 16 Nov 2004 14:27:11 +0100 (CET) Message-ID: <25937.212.102.67.12.1100611631.squirrel@mail.pro-netics.com> Date: Tue, 16 Nov 2004 14:27:11 +0100 (CET) Subject: Problem with jxtg and sax From: "Daniele Madama" To: dev@cocoon.apache.org User-Agent: SquirrelMail/1.4.0 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi to all, I have a little problem (if it's a problem) with JXTG and Sax, I try to resume the behaviour. My transfomer build a Document with a structure like this: test XML xyz 06 XYZ_zyx modify ... ... this is well-formed and it's correct, but I need to validate it with a XSD Schema, so I must add a namespace declaration for prefix "puei" in or parent element otherwise It cannot *known* the prefix specified in "xsi:type" attribute. I add a namespace declaration with this code: Attr nameSpace = newDoc.createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:" + newPrefix); nameSpace.setValue(newNS); ((Element) root).setAttributeNode(nameSpace); where newPrefix's value is "puei" and "http://www.bar.com/" for newNS. If I serialize the document it seems ok, with namespace declared in the right way. The result of this transformer is taken from a flow, that call a match with sendPage(), this match has a jxtg with a jx:out dealing with a Document received from flow. But this generate an Exception: DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces. following the stacktrace it was throw when JXTG try to serialize it with DOMStreamer.stream(). Now I don't know if I missing something when add namespace declaration (is it the correct mode?) or if there is a problem in DOMStreamer. Any hint? TIA -- Daniele Madama Pro-netics s.r.l. Via Elio Lampridio Cerva 127/c Roma Tel. 0651530849 http://www.pro-netics.com