This file is indexed.

/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">&lt;&lt; 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>&nbsp;<SPAN class="variablename">load-path</SPAN>&nbsp;(cons&nbsp;<SPAN class="string">&quot;</SPAN></CODE><I>PSGML_DIR</I><CODE><SPAN class="string">&quot;</SPAN>&nbsp;load-path))<BR>(autoload&nbsp;'sgml-mode&nbsp;<SPAN class="string">&quot;psgml&quot;</SPAN>&nbsp;&quot;Major&nbsp;mode&nbsp;to&nbsp;edit&nbsp;SGML&nbsp;files.&quot;&nbsp;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>&nbsp;<SPAN class="variablename">sgml-set-face</SPAN>&nbsp;'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>&nbsp;<SPAN class="variablename">sgml-markup-faces</SPAN>&nbsp;<BR>&nbsp;&nbsp;'((start-tag&nbsp;.&nbsp;font-lock-reference-face)<BR>&nbsp;&nbsp;&nbsp;&nbsp;(end-tag&nbsp;&nbsp;&nbsp;.&nbsp;font-lock-reference-face)<BR>&nbsp;&nbsp;&nbsp;&nbsp;(comment&nbsp;&nbsp;&nbsp;.&nbsp;font-lock-comment-face&nbsp;&nbsp;)<BR>&nbsp;&nbsp;&nbsp;&nbsp;(pi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;font-lock-keyword-face&nbsp;&nbsp;)<BR>&nbsp;&nbsp;&nbsp;&nbsp;(sgml&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;font-lock-type-face&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<BR>&nbsp;&nbsp;&nbsp;&nbsp;(doctype&nbsp;&nbsp;&nbsp;.&nbsp;font-lock-type-face&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<BR>&nbsp;&nbsp;&nbsp;&nbsp;(entity&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;font-lock-keyword-face&nbsp;&nbsp;)<BR>&nbsp;&nbsp;&nbsp;&nbsp;(shortref&nbsp;&nbsp;.&nbsp;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>&lt;<SPAN class="keyword">!DOCTYPE</SPAN>&nbsp;...&gt;</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>&lt;<SPAN class="keyword">!DOCTYPE</SPAN>&nbsp;</CODE><I>ELEM</I><CODE>&nbsp;SYSTEM&nbsp;<SPAN class="string">&quot;</SPAN></CODE><I>DTD</I><CODE><SPAN class="string">&quot;</SPAN>&gt;</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>&lt;!--<BR>Local&nbsp;Variables:<BR>mode:&nbsp;sgml<BR>mode:&nbsp;auto-fill<BR>adaptive-fill-mode:&nbsp;nil<BR>End:<BR>--&gt;</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">&lt;&lt; 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&nbsp;Duchier</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>