Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@minotaur.apache.org Received: (qmail 20668 invoked from network); 23 Nov 2009 04:39:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Nov 2009 04:39:06 -0000 Received: (qmail 78730 invoked by uid 500); 23 Nov 2009 04:39:05 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 78534 invoked by uid 500); 23 Nov 2009 04:39:03 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 78520 invoked by uid 99); 23 Nov 2009 04:39:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Nov 2009 04:39:03 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Nov 2009 04:39:00 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 97DFC234C04C for ; Sun, 22 Nov 2009 20:38:39 -0800 (PST) Message-ID: <2021261841.1258951119593.JavaMail.jira@brutus> Date: Mon, 23 Nov 2009 04:38:39 +0000 (UTC) From: "Chris A. Mattmann (JIRA)" To: solr-dev@lucene.apache.org Subject: [jira] Updated: (SOLR-1592) Refactor XMLWriter startTag to allow arbitrary attributes to be written In-Reply-To: <1704644525.1258950159678.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SOLR-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris A. Mattmann updated SOLR-1592: ------------------------------------ Attachment: SOLR-1592.Mattmann.112209_02.patch.txt here's a cleaner version of the patch with a few more methods. I can add javadocs to them to explain them better, but I think this is a lot more flexible than the current methods that exist (see the patch I'm about to attach to SOLR-1586 as evidence). > Refactor XMLWriter startTag to allow arbitrary attributes to be written > ----------------------------------------------------------------------- > > Key: SOLR-1592 > URL: https://issues.apache.org/jira/browse/SOLR-1592 > Project: Solr > Issue Type: Improvement > Affects Versions: 1.4 > Environment: My MacBook laptop. > Reporter: Chris A. Mattmann > Fix For: 1.5 > > Attachments: SOLR-1592.Mattmann.112209.patch.txt, SOLR-1592.Mattmann.112209_02.patch.txt > > > There are certain cases in which a user would like to write arbitrary attributes as part of the XML output for a field tag. Case in point: I'd like to declare tags in the SOLR output that are e.g., georss namespace, like georss:point. Other users may want to declare myns:mytag tags, which should be perfectly legal as SOLR goes. This isn't currently possible with the XMLWriter implementation, which curiously only allows the attribute "name" to be included in the XML tags. > Coincidentally, users of XMLWriter aren't allowed to modify the I've developed a workaround, and in doing so, allowed something that should have probably been allowed in the first place: allow a user to write arbitrary attributes (including xmlns:myns="myuri") as part of the XMLWriter#startTag function. I've kept the existing #startTag, but replaced its innards with versions of startTag that include startTagWithNamespaces, and startTagNoAttrs. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.