unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: emacs-devel@gnu.org, xemacs-design@xemacs.org
Subject: Re: INFO on add-ons
Date: Thu, 05 Sep 2002 11:53:02 +0900	[thread overview]
Message-ID: <8765xlrvu9.fsf@tleepslib.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <m17mbJ2-000IeGC@localhost> ("Robert J. Chassell"'s message of "Wed, 4 Sep 2002 14:38:56 +0000 (UTC)")

>>>>> "Robert" == Robert J Chassell <bob@rattlesnake.com> writes:

    Robert> Please write a short, introductory document explaining how
    Robert> to convert a document written with XML markup to good,
    Robert> readable Texinfo automatically,

It wouldn't be hard to write such a backend.  But we must agree on a
DTD first.

    Robert> A great XML documentation format has to be constrained in
    Robert> the same way as Texinfo

I would probably investigate a restriction of the DocbookXML DTD to
something isomorphic to Texinfo.

However, I would also want other constraints, constraints that would
make docstring-to-XML/Info conversion easy, and possibly additional
structure that would make it easier to create a structure editor that
moves nodes around.  In particular, nodes would be textually nested in
the markup, rather than implicitly via linking commands such as @menu
and the optional arguments of @node.

I also would like the various link formats (*ref, url, htmlurl) to be
unified in a single element that permits all of them simultaneously.
Designing this will take a fair amount of thought, though.  Eg, if
you're currently using an Info browser, you probably like Info.  So
first the browser tries to follow an Info link; if that fails, an HTML
URL, etc.

    Robert> Also, please explain how to output a document written in
    Robert> an XML format to Info

I don't currently know how to do that, because there is not yet a
suitable DTD.

    Robert> I keep saying `good, readable Texinfo' because I have been
    Robert> told that sometimes, XML sources are harder to read than
    Robert> Texinfo sources;

It shouldn't be hard to fix this.  It would be fairly easy to add a
feature to PSGML (if it isn't there already) to suppress uninteresting
attributes and tags, making _any_ XML more readable in PSGML.  More
important, the restricted Docbook (or whatever) would _have_ to have
fewer "uninteresting" attributes and tags, as they are generally
presentation features which should be excluded from the XML/Info DTD.

    Robert> I can never remember quite how to describe how XML works.

Here's your blurb.  Material in square brackets is rationale that
wouldn't actually appear in the blurb.  Comments welcome.

WHAT IS XML?

An XML processor reads several sets of rules.  The ruleset called the
"DTD" is concerned with the structure of a document.  Basically, XML
says "a document is a single sexp with colored parentheses," and the
DTD describes what colors are permitted, and the nesting rules among
colors.  The ruleset called the "style sheet" is concerned with
presentation of elements, such as logical faces like "emphasis,"
indentation, link coloring or underlining, and so on.

DTDs are written in a language defined by the SGML standard.  Style
sheets have a couple of alternative languages, such as the cascading
style sheet (CSS) specification and XML schemas.  Many processors
support both.  In general, to use XML/Info you will rarely need to
read, much less write, DTDs or style sheets.  But it may be comforting
to know a little about the structure of the process.  And it's
possible that you'll want to read the DTD to understand why the PSGML
mode or the XML processor doesn't like your documents, or the style
sheet to understand the formatting you see on output.

The presentation itself might be quite abstract.  For example, it
would be straightforward to create an XMLlikeTeXInfo DTD that simply
implements Texinfo @ macros as XML elements of the same name.  The
style sheet would simply be the inverse mapping back to Texinfo.  [For
a number of reasons, I would prefer to derive an XMLInfo DTD from
something like DocbookXML, but that's not the users' problem.]

Once set up in this way, you feed the document to the XML processor,
optionally specifying a target format (such as PDF, XHTML, or even
Texinfo as in the example of the preceding paragraph).  Then you
publish the output in the ways usual for the target format.

HOW DO I USE XML/Info?

In order to create an XML Info document source, you first put an XML
declaration at the top of the file, followed by a document type
declaration.  For normal use, these are boilerplate (which would be
automatically inserted by an xmlinfo-mode derived from PSGML).  Then
you use a structure-based editor such as PSGML, along with the style
rules in the Creating a Texinfo File node of Info (suitably translated
to treat XML rather than Texinfo markup) to edit the text and markup.

Finally, you run the XML processor on the document.  There are any
number of XML processors which are suitable for implementing this
process.  [to be filled in with names and URLs, and sample commands]
Most allow you to specify the target.  XML/Info also provides
xml2texi.el, a mode for converting a buffer from XML/Info to Texinfo,
for those who prefer that format for proofreading.  [Hypothetically it
does ;]  xmlinfo-mode would also probably provide C-c C-c bindings for
commands to run the XML processor and produce output.


-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
 My nostalgia for Icon makes me forget about any of the bad things.  I don't
have much nostalgia for Perl, so its faults I remember.  Scott Gilbert c.l.py



  parent reply	other threads:[~2002-09-05  2:53 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3D728E82.8000808@cox.net>
2002-09-01 22:16 ` INFO on add-ons Alex Schroeder
2002-09-02 23:49   ` David A. Cobb
     [not found]   ` <3D73F919.5010706@cox.net>
2002-09-03 22:56     ` Alex Schroeder
2002-09-04  0:48       ` Alex Schroeder
2002-09-04  1:39         ` Miles Bader
2002-09-04  4:47           ` Eli Zaretskii
2002-09-04  5:02             ` Miles Bader
2002-09-04  5:06               ` Eli Zaretskii
2002-09-04  5:14                 ` Miles Bader
2002-09-04 13:20                   ` Eli Zaretskii
2002-09-04 13:34                     ` Miles Bader
2002-09-05  4:46                       ` Eli Zaretskii
2002-09-05 12:09                         ` Valdis.Kletnieks
2002-09-05 14:52                         ` Robert J. Chassell
2002-09-04 22:40           ` Alex Schroeder
2002-09-05  2:46           ` Richard Stallman
2002-09-07  7:44           ` Pavel Janík
2002-09-04  4:44         ` Eli Zaretskii
2002-09-04 12:13         ` Robert J. Chassell
2002-09-04  4:42       ` Eli Zaretskii
2002-09-02  1:08 ` Stephen J. Turnbull
2002-09-02 14:53 ` Richard Stallman
2002-09-02 23:59   ` David A. Cobb
     [not found] ` <87ptvxxkoj.fsf@tleepslib.sk.tsukuba.ac.jp>
2002-09-02  1:36   ` Miles Bader
     [not found]   ` <buok7m5jhpm.fsf@mcspd15.ucom.lsi.nec.co.jp>
2002-09-02  4:51     ` Stephen J. Turnbull
     [not found]     ` <87fzwtxad9.fsf@tleepslib.sk.tsukuba.ac.jp>
2002-09-02  5:04       ` Miles Bader
     [not found]       ` <buoelcdj82q.fsf@mcspd15.ucom.lsi.nec.co.jp>
2002-09-02  6:03         ` Stephen J. Turnbull
2002-09-02 23:47           ` David A. Cobb
     [not found]           ` <3D73F89D.2070106@cox.net>
2002-09-03  4:16             ` "Extreme Documentation" [was: INFO on add-ons] Stephen J. Turnbull
2002-09-03 15:49               ` David A. Cobb
2002-09-03 19:05               ` Thien-Thi Nguyen
2002-09-04  3:51                 ` Stephen J. Turnbull
2002-09-04  5:58                   ` Thien-Thi Nguyen
2002-09-03 13:26           ` INFO on add-ons Richard Stallman
2002-09-03 15:43             ` Stephen J. Turnbull
2002-09-03 16:30               ` Robert J. Chassell
2002-09-03 17:33                 ` Henrik Enberg
2002-09-03 17:58                   ` Miles Bader
2002-09-03 20:54                     ` Kai Großjohann
2002-09-03 20:54                   ` Kai Großjohann
2002-09-02 23:40       ` David A. Cobb
     [not found]       ` <3D73F6D1.7010002@cox.net>
2002-09-03  4:42         ` Stephen J. Turnbull
2002-09-03 15:39           ` David A. Cobb
2002-09-03 16:23             ` Robert J. Chassell
2002-09-03 22:23               ` David A. Cobb
2002-09-04  1:18               ` Miles Bader
2002-09-04  3:39                 ` Stephen J. Turnbull
2002-09-04  3:46                   ` Miles Bader
2002-09-04  7:23                     ` Stephen J. Turnbull
2002-09-05  2:17                       ` Karl Eichwalder
2002-09-04 14:38                   ` Robert J. Chassell
2002-09-04 17:42                     ` Ville Skyttä
2002-09-04 22:14                       ` Robert J. Chassell
2002-09-05  2:53                     ` Stephen J. Turnbull [this message]
2002-09-05 13:37                       ` Robert J. Chassell
2002-09-06  2:40                         ` Stephen J. Turnbull
2002-09-06 12:18                           ` Robert J. Chassell
2002-09-06 13:30                             ` Miles Bader
2002-09-06 20:03                           ` Richard Stallman
2002-09-05 13:54                       ` Robert J. Chassell
2002-09-05 20:16                         ` Ville Skyttä
2002-09-04 15:49                   ` Stefan Monnier
2002-09-04 17:12                     ` Robert J. Chassell
2002-09-04 18:22                     ` Ville Skyttä
2002-09-05  1:48                       ` Miles Bader
2002-09-05  2:32                         ` Karl Eichwalder
2002-09-05  4:51                           ` Eli Zaretskii
2002-09-05  6:00                             ` Karl Eichwalder
2002-09-05 13:25                           ` Robert J. Chassell
2002-09-05  4:48                         ` Eli Zaretskii
2002-09-05  4:22                     ` Stephen J. Turnbull
2002-09-05 18:02                     ` Richard Stallman
2002-09-06  1:19                       ` Miles Bader
2002-09-06 20:03                         ` Richard Stallman
2002-09-04  4:44                 ` Eli Zaretskii
2002-09-04 12:29                 ` Robert J. Chassell
2002-09-05  2:46                 ` Richard Stallman
2002-09-02 23:22   ` David A. Cobb
2002-09-01 22:02 David A. Cobb

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=8765xlrvu9.fsf@tleepslib.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=emacs-devel@gnu.org \
    --cc=xemacs-design@xemacs.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).