[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

PSGML parent-document



Hi!

Sorry for this newbie question but I have some trouble
to set the sgml-parent-document of subdocument so that
psgml will indent correctly (I mean in a constant manner).
The document is a DocBook sgml and the DTD contains two
entities:

<ENTITY mysect "mysect.sgml">
<ENTITY myapp  "myapp.sgml">

The content of mysect.sgml is

<sect1>
  <title>My Section</title>
  <para> </para>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-parent-document:("arpeges.sgml" "preface" "sect1")
End:
-->

and the content of myapp.sgml is
(take note of the supplementary two spaces at the beginning
 of the lines)

  <appendix>
    <title>My Appendix</title>
    <para> </para>
  </appendix>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-parent-document:("arpeges.sgml" "book" "appendix")
End:
-->

and the document is something like

<!DOCTYPE book SYSTEM "document.dtd">
<book>
  <preface>
    &mysect;
  </preface>
  &myapp;
</book>

What happens? Which one is the right one? All lines are
indented usign the TAB key which call sgml-indent-line.
The myapp indention seems the right behavior for the code
but I would prefer to have something like mysect (the first
tag of the file not indent at all) instead. How could I
do this?

The reason I use CVS and I can't find a good way to have
always the same indentation and well format sgml without
moving everything around each time I transform a sect2
in a sect1, creating bigger diffs than necessary.

I know we can put a filter into cvs for checkin but I can't
get it work reliably, and I don't know any good beautifer
for sub-doc sgml (nsgml can't handle them).

Thanks in advance,

-- 
-------------------------------*  *-------------------------
Fabien Ninoles                /  /             fab@tzone.org
Chevalier Servant de Sa Dame /  /   C15D FE9E BB35 F596 127F
Veneur Gris par la Reve     /  /    BF7D 8F1F DFC9 BCE0 9436
Idealiste pour Debian      /  / http://www.tzone.org/~fabien
--------------------------*  *------------------------------


Reply to: