emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why XSLT in Emacs Lisp? (was Re: Changes to Texinfo DTD)


From: Nic Ferrier
Subject: Why XSLT in Emacs Lisp? (was Re: Changes to Texinfo DTD)
Date: 24 Nov 2003 09:25:18 +0000

Juri Linkov <address@hidden> writes:

> Nic Ferrier <address@hidden> writes:
> > Miles Bader <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]