From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Nic Ferrier Newsgroups: gmane.emacs.devel Subject: Why XSLT in Emacs Lisp? (was Re: Changes to Texinfo DTD) Date: 24 Nov 2003 09:25:18 +0000 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <8765hadsox.fsf_-_@kanga.tapsellferrier.co.uk> References: <8765heixvu.fsf@kanga.tapsellferrier.co.uk> <87ptfkdqss.fsf@kanga.tapsellferrier.co.uk> <20031122214251.GA14680@fencepost> <87k75sdq3k.fsf@kanga.tapsellferrier.co.uk> <873cceqjy2.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1069675131 9551 80.91.224.253 (24 Nov 2003 11:58:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 Nov 2003 11:58:51 +0000 (UTC) Cc: epameinondas@gmx.de, bob@rattlesnake.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Nov 24 12:58:46 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AOFMc-0004Xy-00 for ; Mon, 24 Nov 2003 12:58:46 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AOFMc-0001G9-00 for ; Mon, 24 Nov 2003 12:58:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AOGFJ-0006wH-P8 for emacs-devel@quimby.gnus.org; Mon, 24 Nov 2003 07:55:17 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AOG2L-00075I-5S for emacs-devel@gnu.org; Mon, 24 Nov 2003 07:41:53 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AOG0o-0006g5-Ez for emacs-devel@gnu.org; Mon, 24 Nov 2003 07:40:49 -0500 Original-Received: from [217.34.135.17] (helo=tf1.tapsellferrier.co.uk) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AOFx4-0005lx-B1 for emacs-devel@gnu.org; Mon, 24 Nov 2003 07:36:26 -0500 Original-Received: from [194.74.202.254] (helo=kanga.tapsellferrier.co.uk) by tf1.tapsellferrier.co.uk with esmtp (Exim 3.35 #1 (Debian)) id 1AOEzf-0002d1-00; Mon, 24 Nov 2003 11:35:03 +0000 Original-Received: from localhost ([127.0.0.1] helo=kanga.tapsellferrier.co.uk ident=nferrier) by kanga.tapsellferrier.co.uk with esmtp (Exim 3.35 #1 (Debian)) id 1AOCyk-0005IT-00; Mon, 24 Nov 2003 09:25:58 +0000 Original-To: Juri Linkov In-Reply-To: <873cceqjy2.fsf@mail.jurta.org> Original-Lines: 56 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:18077 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18077 Juri Linkov writes: > Nic Ferrier writes: > > Miles Bader writes: > >> On Sat, Nov 22, 2003 at 09:41:39PM +0000, Nic Ferrier wrote: > >> > 2. write an XSLT processor in Emacs Lisp. This wouldn't be as > >> > difficult as it sounds and I'm not sure it isn't done already (by > >> > one of the various XML/Emacs projects going on). > >> > >> The main question in my mind is whether this would be fast enough -- the > >> current info mechanism, though it has its problems, can display info pages > >> very quickly. As a point of contrast, W3 is _very_ slow (I think it would be > >> completely unsuitable for use in displaying info files). > > > > In this response to rms I was not suggesting W3. I was talking about > > writing an XSLT processor in emacs lisp. XSLT is pretty quick unless > > memory is very limited or the transformation it is given is > > particularly complex. > > Why do you want to write an XSLT processor in emacs lisp? > The XSL is a poor and ugly copy of Lisp. I once was enthusiastic > about XSL too, but soon I realized that it's simply a parody of Lisp. > Much better alternative for XML transformation and style formatting > could be the DSSSL, but unfortunately it is not popular now. > So, if you are going to do something in Emacs, please, do it > in Emacs Lisp, not in XSL or JavaScript. Yes, XML syntax is clearly derived from s-expressions. But this is not the same as saying that XSLT is a parody of Lisp. The reason I might consider writing an XSLT processor in Emacs Lisp is that W3 will need one in the future. Modern web browsers (such as Mozilla) allow you to render XML inside the browser, but they only do that using XSLT. Emacs/W3 could easily use an external program for doing such a transformation, but that would complicate it's instal by making it dependant on such an external XSLT. Therefore an XSLT engine written in Emacs Lisp would be beneficial. As an aside, because XML is basically s-expressions then an XSLT wouldn't be _that_ difficult to write in Emacs Lisp. As I said in my original email, I think it may already have been done. DSSL would be much more work because it is, essentially, Scheme. All the problems associated with integrating Scheme into Emacs would rear their heads, how to do lexical scoping for example. And anyway, there isn't a standard for transforming XML in a web browser with DSSL. Nic