unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: ttn@gnuvola.org
Cc: karl@gnu.org, emacs-devel@gnu.org
Subject: Re: Texinfo XML support in Emacs Info browser
Date: Sun, 03 Jun 2007 12:59:36 +0300	[thread overview]
Message-ID: <87odjxmk8n.fsf@jurta.org> (raw)
In-Reply-To: <87vee51imv.fsf@ambire.localdomain> (Thien-Thi Nguyen's message of "Sun\, 03 Jun 2007 11\:39\:52 +0200")

> () Juri Linkov <juri@jurta.org>
> () Sun, 03 Jun 2007 02:03:03 +0300
>
>    [info-xml.el]
>
> interesting.  i had to modify `Info-xml-select-node' like so:
>
> 	;; Add a new unique history item to full history list
> 	(let ((new-history (list Info-current-file Info-current-node)))
> 	  (setq Info-history-list
> 		(cons new-history (delete new-history Info-history-list)))
> 	  (setq Info-history-forward nil))

Sorry, this part contained function calls for speed optimization of
displaying large index nodes.  I'll post a separate patch for info.el.

> i think ad-hoc regexp-based approach is likely to be troublesome in the long
> run.  so, question: since we have xml.el, why not build a tree immediately?
> one answer is that: well, makeinfo --xml output is not always valid.  :-(
>
> e.g.: makeinfo --xml -o edb.info.xml edb.texi
>       (xml-parse-file "edb.info.xml")
>       => error
>
> (in edb.info.xml, element `detailedmenu' is not properly nested.  this is
> seen using "makeinfo (GNU texinfo) 4.8".)

This is the exact reason why I leaned toward using regexps instead of
xml-parse-file.  In my first attempt to use xml-parse-file I discovered
that `makeinfo --xml' sometimes produces non-wellformed XML, so we can't
parse it with xml-parse-file.  Even if this will be fixed in the future
releases of makeinfo, old versions still produce invalid XML output.

With regexp-based approach, the Info browser would be more permissive to
invalid XML, in the same way as most HTML browsers are permissive to invalid
markup on HTML pages.  It can simply ignore invalid elements, either
removing them or leaving on display which doesn't make much harm.

-- 
Juri Linkov
http://www.jurta.org/emacs/

  reply	other threads:[~2007-06-03  9:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-02 23:03 Texinfo XML support in Emacs Info browser Juri Linkov
2007-06-03  9:39 ` Thien-Thi Nguyen
2007-06-03  9:59   ` Juri Linkov [this message]
2007-06-03 21:23     ` Karl Berry
2007-06-03 22:47       ` Juri Linkov
2007-06-03 23:45         ` Drew Adams
2007-06-06  0:43           ` Stefan Monnier
2007-06-03 23:26       ` Thien-Thi Nguyen
2007-06-03 21:27     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87odjxmk8n.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=karl@gnu.org \
    --cc=ttn@gnuvola.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).