Return-Path: Delivered-To: apmail-xml-xindice-dev-archive@www.apache.org Received: (qmail 99355 invoked from network); 26 Sep 2003 23:06:40 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 26 Sep 2003 23:06:40 -0000 Received: (qmail 17418 invoked by uid 500); 26 Sep 2003 23:06:24 -0000 Delivered-To: apmail-xml-xindice-dev-archive@xml.apache.org Received: (qmail 17394 invoked by uid 500); 26 Sep 2003 23:06:23 -0000 Mailing-List: contact xindice-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: xindice-dev@xml.apache.org Delivered-To: mailing list xindice-dev@xml.apache.org Received: (qmail 17382 invoked from network); 26 Sep 2003 23:06:22 -0000 Received: from unknown (HELO rocketred.net) (203.23.158.232) by daedalus.apache.org with SMTP; 26 Sep 2003 23:06:22 -0000 Received: (qmail 28662 invoked from network); 26 Sep 2003 23:06:28 -0000 Received: from pc-00011.rocketred.net (HELO titus.rocketred.net) (192.168.27.11) by harry.rocketred.net (192.168.27.1) with ESMTP; 26 Sep 2003 23:06:28 -0000 Received: from titus.rocketred.net (titus.rocketred.net [127.0.0.1]) by titus.rocketred.net (Postfix) with SMTP id 6FDF3CA024 for ; Sat, 27 Sep 2003 09:02:51 +1000 (EST) From: Kevin O'Neill Subject: Re: [PATCH] BUG 22122 (src prefix added to search...) REOPENED Date: Sat, 27 Sep 2003 09:02:51 +1000 User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-Id: References: <3F7326B0.5070308@amicas.com> To: xindice-dev@xml.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Thu, 25 Sep 2003 13:32:32 -0400, Terry Rosenbaum wrote: > Hi, > > Re: BUG 22122 (src prefix added to search results overwrites existing src > prefix) > > I've reopened this bug and attached a patch. Could someone review/commit > please? > > The descriptive comment I made in bugzilla follows: > > The fix for this bug can produce undesirable results. Sometimes the "src" > prefix could be defined with the exact same namespace value. sourcePrefix > should check to see if the namespace value is the same when trying to make > the "src" prefix unique. Sometimes can get result like: > > xmlns:src1064505904532="http://xml.apache.org/xindice/Query" > src1064505904532:col="/db/testing/current" src1064505904532:key="doc3" > xmlns:src="http://xml.apache.org/xindice/Query"/> > > When expecting: > > src:col="/db/testing/current" src:key="doc3" > xmlns:src="http://xml.apache.org/xindice/Query"/> > > Patch attached above requires that the namespace as well as the prefix be > passed to ElementImpl.sourcePrefix. Before trying to make a unique name > for the prefix, it checks to see if the namespace of the existing prefix > matches the namespace of the proposed prefix. If it does, it returns the > prefix unaltered. -Terry One question. As the documents the differences are in text as opposed to xml structure (they compare as the same) why is changing the prefix a problem. If the app calling the xml is sensitive to the prefix change then I think it has a problem. It also may be the case that xindice does not use the same prefixes used in the query as are present in the resulting document. -k.