all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* whats the Emacsy way to xsltish tasks?
@ 2011-05-19 23:01 joakim
  2011-05-20  9:28 ` Andy Wingo
  0 siblings, 1 reply; 2+ messages in thread
From: joakim @ 2011-05-19 23:01 UTC (permalink / raw)
  To: emacs-devel

I have an elisp prog that builds an SVG image by using macros to create
xslt that then transforms an SVG to create another SVG. The solution
works but feels a bit humiliating. Why fork out to xsltproc, when xml is
lisp with brackets?

Now I have a couple of similar projects, and I'd like to try some
different solution. Regexp matching is worse on these cases than forking
out to xsltproc, so the alternative is to parse the xml with the new
libxml wrapper, and transform it in Elisp. But since these are randomly
deep structures Elisp might die from stack asphyxiation during recursion.

So what to do then? Implement tail elimination? wrap libxslt? Some other
embarassingly obvious solution I've missed?


-- 
Joakim Verona



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: whats the Emacsy way to xsltish tasks?
  2011-05-19 23:01 whats the Emacsy way to xsltish tasks? joakim
@ 2011-05-20  9:28 ` Andy Wingo
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2011-05-20  9:28 UTC (permalink / raw)
  To: joakim; +Cc: emacs-devel

On Fri 20 May 2011 01:01, joakim@verona.se writes:

> I have an elisp prog that builds an SVG image by using macros to create
> xslt that then transforms an SVG to create another SVG. The solution
> works but feels a bit humiliating. Why fork out to xsltproc, when xml is
> lisp with brackets?
>
> Now I have a couple of similar projects, and I'd like to try some
> different solution. Regexp matching is worse on these cases than forking
> out to xsltproc, so the alternative is to parse the xml with the new
> libxml wrapper, and transform it in Elisp. But since these are randomly
> deep structures Elisp might die from stack asphyxiation during recursion.
>
> So what to do then? Implement tail elimination? wrap libxslt? Some other
> embarassingly obvious solution I've missed?

See Oleg Kiselyov's "pre-post-order" transformation combinator.  He
wrote a few papers on it.

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-20  9:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-19 23:01 whats the Emacsy way to xsltish tasks? joakim
2011-05-20  9:28 ` Andy Wingo

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.