Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 69877 invoked from network); 16 Jan 2006 09:22:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Jan 2006 09:22:20 -0000 Received: (qmail 11935 invoked by uid 500); 16 Jan 2006 09:22:14 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 11782 invoked by uid 500); 16 Jan 2006 09:22:13 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 11767 invoked by uid 99); 16 Jan 2006 09:22:13 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2006 01:22:13 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [68.142.207.143] (HELO web32212.mail.mud.yahoo.com) (68.142.207.143) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 16 Jan 2006 01:22:12 -0800 Received: (qmail 82297 invoked by uid 60001); 16 Jan 2006 09:21:51 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=OSXxZxTC9y0tZPTjWUx2FsBePma+majYOvEbv5I8ZdGBNl/grHdzmPLWvT7fzvZnCfOIPgW5pcVR1FlI/vLSlwoTv8icLD2LlNMywQkIdUU+dCBfFWbgrpkFjqS0VB/6VoNRM+p6l9JBJgTpnyyFk79N6P0ZVM7j2vaX5gd3aP0= ; Message-ID: <20060116092151.82295.qmail@web32212.mail.mud.yahoo.com> Received: from [199.203.68.19] by web32212.mail.mud.yahoo.com via HTTP; Mon, 16 Jan 2006 01:21:51 PST Date: Mon, 16 Jan 2006 01:21:51 -0800 (PST) From: sol myr Subject: Betwixt : writing namespace for every element ? To: commons-user@jakarta.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1921939775-1137403311=:75240" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-1921939775-1137403311=:75240 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I'm using betwixt (BeanWriter) to print out some simple beans. All my xml tags belong to the same (single) namespace. The twist is, I need the namespace prefix to be *explicitly* printed out, for the top element as well as for all its nested tags (that's for compatibility with an old system). Example: < reading:Book xmlns:reading="myuri/read" > < reading:author >SomeAuthor < / reading:author > < reading:title > SomeTitle < / reading:title > < / reading:Book > It has to be < reading:author > and not just < author > . Now, I know how to do this the ugly way: use a "Book.betwixt" file and mention the uri for each and every property: < info primitiveTypes="element" > < element name='Book' uri='myuri/read" > < element name='title' property='title' uri='myuri/read' / > < element name='author' property='author' uri='myrui/read' / > < / element > < / info > But is there a more elegant way to do it, without having to copy the same 'uri' attribute for each and every property ? I would just like to tell betwixt "assign this uri on Book, *and* to all its properties"... Thanx :) --------------------------------- Yahoo! Photos Got holiday prints? See all the ways to get quality prints in your hands ASAP. --0-1921939775-1137403311=:75240--