Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 35874 invoked from network); 17 Jun 2010 17:08:17 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Jun 2010 17:08:17 -0000 Received: (qmail 37089 invoked by uid 500); 17 Jun 2010 17:08:15 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 37038 invoked by uid 500); 17 Jun 2010 17:08:15 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 37026 invoked by uid 99); 17 Jun 2010 17:08:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jun 2010 17:08:15 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.69.42.181] (HELO radix.cryptio.net) (208.69.42.181) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jun 2010 17:08:07 +0000 Received: by radix.cryptio.net (Postfix, from userid 1007) id E0D8371C0A6; Thu, 17 Jun 2010 10:07:45 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by radix.cryptio.net (Postfix) with ESMTP id D4F8171C020 for ; Thu, 17 Jun 2010 10:07:45 -0700 (PDT) Date: Thu, 17 Jun 2010 10:07:45 -0700 (PDT) From: Chris Hostetter To: dev@lucene.apache.org Subject: Re: velocity response writer breaks portability In-Reply-To: <8850A2A2-00E6-4FF7-B180-A71EFEBABCDA@gmail.com> Message-ID: References: <27C7F30D-EA8F-4F9F-85F6-8E048FC35C0C@gmail.com> <780F6E34-D6D9-40A9-8982-60F341B59C8D@gmail.com> <8850A2A2-00E6-4FF7-B180-A71EFEBABCDA@gmail.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org : I'm confused by that comment about XSLT. How would using XSLT client-side be : any more sure that the handlers are exposing everything? All ya gotta do : when using VrW is flip to wt=xml and you can then see everything used to I'm horribly un-informed about Velocity and the VrW, but my recollection from a previous discussion about this idea (i thought it was on list, but it might have been an offline discussion at apachecon or a meetup) was that since the Velocity engine runs in the ServletContext, a template could use direct object refrences to access data that wouldn't be available to remote clients parsing the xml or json output -- ie: a well intentioned but lazily written patch might get committed that uses a refrence to the SolrCore to get access to some data directly in a velocity template, rather then the more general solution of updating hte appropriate request handler to add that data to the SolrQueryResponse so that all response writers return that data. : generate the view. The same HTML would come out either way. With XSLT, a : plugin couldn't bring in it's own .xsl file for the client to use (at least : not currently, no way to serve a file from a JAR). With Velocity, .vm files i'm pretty sure that ResourceLoader will fall back to the ClassLoader when trying to access files not found in the conf directory -- which means plugins should be able to include XSLT files in their jars, and stylesheet urls like "/admin/file?custom-plugin-a.xsl" would work (we just need to fix some foolish assumptions in the XmlResponseWriter's usage of the stylesheet param so it's more generally useful) : And besides, poking a stick in one's eye is a fair bit more pleasant than : writing/maintaining XSLT. ick! (and yes, I've done so professionally for a : couple of jobs so I'm speaking from my experiences) no disagreement -- but i actually find that to be a plus from an "ensure data accessibility" standpoint: if you can craft and XSLT for your XML that displays the data effectively w/o hanging yourself first, then you definitely have an XML structure that *anybody* can use effectively. but all of this is just my opinion, and it's been my opinion for a long time, but i haven't gotten arround to doing anything about it -- you're actively pursuing a solution that's differnet then mine but still 10x better then what we've got, so more power to you. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org