From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.xemacs.design,gmane.emacs.devel Subject: Re: INFO on add-ons Date: Thu, 05 Sep 2002 11:53:02 +0900 Organization: The XEmacs Project Sender: xemacs-design-admin@xemacs.org Message-ID: <8765xlrvu9.fsf@tleepslib.sk.tsukuba.ac.jp> References: <3D728E82.8000808@cox.net> <87ptvxxkoj.fsf@tleepslib.sk.tsukuba.ac.jp> <87fzwtxad9.fsf@tleepslib.sk.tsukuba.ac.jp> <3D73F6D1.7010002@cox.net> <874rd7wuos.fsf@tleepslib.sk.tsukuba.ac.jp> <3D74D797.7000707@cox.net> <87bs7etocv.fsf@tleepslib.sk.tsukuba.ac.jp> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031194406 21883 127.0.0.1 (5 Sep 2002 02:53:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 5 Sep 2002 02:53:26 +0000 (UTC) Cc: emacs-devel@gnu.org, xemacs-design@xemacs.org Return-path: Original-Received: from gwyn.tux.org ([207.96.1.200]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17mmlp-0005gp-00 for ; Thu, 05 Sep 2002 04:53:25 +0200 Original-Received: from gwyn.tux.org (localhost.localdomain [127.0.0.1]) by gwyn.tux.org (8.9.3/8.9.1) with ESMTP id WAA22640; Wed, 4 Sep 2002 22:55:02 -0400 Original-Received: (from turnbull@localhost) by gwyn.tux.org (8.9.3/8.9.1) id WAA22540 for xemacs-design-mailman@xemacs.org; Wed, 4 Sep 2002 22:54:08 -0400 Original-Received: (from mail@localhost) by gwyn.tux.org (8.9.3/8.9.1) id WAA22535 for turnbull@tux.org; Wed, 4 Sep 2002 22:54:08 -0400 Original-Received: from tleepslib.sk.tsukuba.ac.jp (tleepslib.sk.tsukuba.ac.jp [130.158.98.109]) by gwyn.tux.org (8.9.3/8.9.1) with ESMTP id WAA22531 for ; Wed, 4 Sep 2002 22:54:07 -0400 Original-Received: from localhost ([127.0.0.1] helo=tleepslib.sk.tsukuba.ac.jp ident=steve) by tleepslib.sk.tsukuba.ac.jp with esmtp (Exim 3.36 #1 (Debian)) id 17mmlW-00064g-00 for ; Thu, 05 Sep 2002 11:53:06 +0900 Original-To: bob@rattlesnake.com In-Reply-To: ("Robert J. Chassell"'s message of "Wed, 4 Sep 2002 14:38:56 +0000 (UTC)") Original-Lines: 108 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) XEmacs/21.4 (Informed Management, i686-pc-linux) X-Delivery-Agent: TMDA/0.61 X-XEmacs-List: design Errors-To: xemacs-design-admin@xemacs.org X-BeenThere: xemacs-design@xemacs.org X-Mailman-Version: 2.0.1 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Discussion of design and features for XEmacs. List-Unsubscribe: , Xref: main.gmane.org gmane.emacs.xemacs.design:1404 gmane.emacs.devel:7504 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7504 >>>>> "Robert" == Robert J Chassell 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