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: XML and emacs (was Re: A new online publishing tool for Texinfo documents.) Date: 24 Nov 2003 09:43:17 +0000 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87znemcdai.fsf_-_@kanga.tapsellferrier.co.uk> References: <200311222118.hAMLI3v07843@f7.net> <87r800dr09.fsf@kanga.tapsellferrier.co.uk> <87znemp5a0.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 1069674680 8804 80.91.224.253 (24 Nov 2003 11:51:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 Nov 2003 11:51:20 +0000 (UTC) Cc: epameinondas@gmx.de, bob@rattlesnake.com, karl@freefriends.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Nov 24 12:51:16 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 1AOFFM-0004FG-00 for ; Mon, 24 Nov 2003 12:51:16 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AOFFM-0001DO-00 for ; Mon, 24 Nov 2003 12:51:16 +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 1AOGCf-0005nJ-4m for emacs-devel@quimby.gnus.org; Mon, 24 Nov 2003 07:52:33 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AOG09-0006Sp-Ts for emacs-devel@gnu.org; Mon, 24 Nov 2003 07:39:37 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AOFzd-0006Iy-CN for emacs-devel@gnu.org; Mon, 24 Nov 2003 07:39:06 -0500 Original-Received: from [217.34.135.17] (helo=tf1.tapsellferrier.co.uk) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AOFwY-0005g5-H0 for emacs-devel@gnu.org; Mon, 24 Nov 2003 07:35:54 -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 1AOEz3-0002cv-00; Mon, 24 Nov 2003 11:34:26 +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 1AODFV-0005KB-00; Mon, 24 Nov 2003 09:43:17 +0000 Original-To: Juri Linkov In-Reply-To: <87znemp5a0.fsf@mail.jurta.org> Original-Lines: 38 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:18075 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18075 Juri Linkov writes: > Making some XML library available as part of Emacs might be useful. > Current XML parsing implemented in Emacs Lisp is too slow on large > XML files. But maybe building a DOM tree from makeinfo XML output > is not needed at all. This might be needed for XML transformation, > e.g. for reordering the Info nodes. But for simple text formatting > a simple sequential SAX-like processor should be enough. It could > provide, for instance, the following hooks: > > (defun xml-start-element (name atts)) > > (defun xml-characters (str) > (insert str)) > > (defun xml-end-element (name from to) > ;; this could be used to format the inserted text > (cond ((equal name "para")) > (fill-region-as-paragraph from to))) Yes. Or STaX which is a new API available only for Java right now and looks like it's a bit easier to deal with than SAX. libxml2 does have a SAX implementation so if I make it part of Emacs then that would be available. James Clark and I have already had a discussion about this on the emacs-devel list. James is writing an XML parser in Emacs Lisp and his view was that native Elisp is always going to be better than a foreign library. I take his point. But there are other reasons why I'd like libxml2 integrated into Emacs (because I use it everywhere else other than Emacs) so I might do it anyway. Nic