/usr/share/mozart/doc/ozdoc/node7.html is in mozart-doc 1.4.0-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>7 Editing SGML Documents</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node6.html#chapter.extending"><< Prev</A></TD><TD><A href="index.html">- Up -</A></TD></TR></TABLE><DIV id="chapter.editing"><H1><A name="chapter.editing">7 Editing SGML Documents</A></H1><P>The <SPAN class="TOOL">PSGML</SPAN> package for <SPAN class="TOOL">emacs</SPAN> provides a very nice editing environment for SGML documents. You might put the following in your <CODE>~/.emacs</CODE> file: </P><BLOCKQUOTE class="code"><CODE>(<SPAN class="keyword">setq</SPAN> <SPAN class="variablename">load-path</SPAN> (cons <SPAN class="string">"</SPAN></CODE><I>PSGML_DIR</I><CODE><SPAN class="string">"</SPAN> load-path))<BR>(autoload 'sgml-mode <SPAN class="string">"psgml"</SPAN> "Major mode to edit SGML files." t)</CODE></BLOCKQUOTE><P> where <I>PSGML_DIR</I> is the directory in which <SPAN class="TOOL">PSGML</SPAN> is installed. At our lab, this directory is: <CODE>/project/ps/emacs/lisp/psgml</CODE></P><P>To turn on fontification of SGML document, also add the following: </P><BLOCKQUOTE class="code"><CODE>(<SPAN class="keyword">setq</SPAN> <SPAN class="variablename">sgml-set-face</SPAN> 't)</CODE></BLOCKQUOTE><P> You may also specify what font faces to use for highlighting. Here is what I (Denys) am using today: </P><BLOCKQUOTE class="code"><CODE>(<SPAN class="keyword">setq</SPAN> <SPAN class="variablename">sgml-markup-faces</SPAN> <BR> '((start-tag . font-lock-reference-face)<BR> (end-tag . font-lock-reference-face)<BR> (comment . font-lock-comment-face )<BR> (pi . font-lock-keyword-face )<BR> (sgml . font-lock-type-face )<BR> (doctype . font-lock-type-face )<BR> (entity . font-lock-keyword-face )<BR> (shortref . font-lock-reference-face)))</CODE></BLOCKQUOTE><P> Strangely enough, when you open an SGML file for editing, the fontification process always waits for 6 seconds of idleness before it actually gets going. This is annoying, but hard coded.</P><P>For each document, <CODE>psgml-mode</CODE> parses the DTD and uses this information to help editing (it knows what is legal, where). Normally it uses the <CODE><<SPAN class="keyword">!DOCTYPE</SPAN> ...></CODE> declaration at the top of the document to find theDTD. There are 2 common cases where that doesn't work well: when the DTD is in a location that <SPAN class="TOOL">PSGML</SPAN> cannot find and when editing part of a document in a separate file that doesn't have the <CODE>DOCTYPE</CODE> declaration.</P><P>In such cases it is easier to load a ``parsed DTD''; it is also much faster. The easiest way to save a parsed DTD is to create, in the directory where the DTD is located, a file containing the following line: </P><BLOCKQUOTE class="code"><CODE><<SPAN class="keyword">!DOCTYPE</SPAN> </CODE><I>ELEM</I><CODE> SYSTEM <SPAN class="string">"</SPAN></CODE><I>DTD</I><CODE><SPAN class="string">"</SPAN>></CODE></BLOCKQUOTE><P> and to invoke ``Parse DTD'' and then ``Save Parsed DTD'' from the DTD menu. Then, when editing a partial document, you can manually invoke ``Load Parsed DTD'' from that same menu.</P><P><CODE>fill-mode</CODE> is also nice to get automatic line breaking, but, in my experience, it is better to turn <CODE>adaptive-fill-mode</CODE> off, otherwise, due to the indentation of nested element, you'll soon be writing in a very narrow column at the right of the page. For example, you might add the following code at the end of and SGML document: </P><BLOCKQUOTE class="code"><CODE><!--<BR>Local Variables:<BR>mode: sgml<BR>mode: auto-fill<BR>adaptive-fill-mode: nil<BR>End:<BR>--></CODE></BLOCKQUOTE><P> as far as SGML is concerned, this is a comment, but is meaningful to <SPAN class="TOOL">emacs</SPAN>.</P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node6.html#chapter.extending"><< Prev</A></TD><TD><A href="index.html">- Up -</A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~duchier/">Denys Duchier</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>
|