This is the mail archive of the sgml-tools@via.ecp.fr mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A little to make separate document with psgml


Dominique MOREAU writes in message
<200002282014.VAA11363@fwm1.matra-ms2i.fr>:

> The parent file name's who's take the doc type declaration :
> mucomplet.sgm
> It's an 'set' entity.
> My spliting document name's : tome1.sgm.
> It's an 'book' entity.
[...]
> <!--
>   Local Variables:
>   sgml-doctype: "mucomplet.sgm"
>   sgml-parent-document: ("mucomplet.sgm" "" "set" "book")
>   End:
>   -->

The double quotes immediately after the parent-file should not be 
there. Your line should probably read: ("mucomplet.sgm" "set" "book").


> In fact, i have some problem to understand the signification of
> - CONTEXT-ELEMENT
> - TOP-ELEMENT
> - HAS-SEEN-ELEMENT
> 
> Can you give me a help (with a little exemple), or have you a new
> documentation which can help me.

I will try to give an example. HAS-SEEN-ELEMENT is not needed for your 
case.


CONTEXT-ELEMENT is the name of an SGML element that is open in mucomplet.sgm at the time tome1.sgm is inserted. For example, if mucomplet.sgm reads:

<!DOCTYPE Set PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
<!ENTITY tome1.sgm system "tome1.sgm">
<!ENTITY tome2.sgm system "tome2.sgm">
]>
<set>
<title>The Collected Works of Charles S. Peirce</title>
<setinfo>
<edition>2</edition>
[...]
</setinfo>
&tome1.sgm;
&tome2.sgm;
<setindex></setindex>
</set>

Then, at the time tome1.sgm is inserted, the initial <set> element is still open. So CONTEXT-ELEMENT is "set".


TOP-ELEMENT is the (one) element that is fully contained in tome1.sgm. In your case, tome1.sgm contains something like

<book>
<bookinfo>
<title>1872 &ndash; 1878</title>
[...]
</bookinfo>
<toc></toc> <lot></lot>
[...]
</book>

Here, tome1.sgm includes everything for one <book> element. That means TOP-ELEMENT should be "book".


If the parent document opens several elements, you can simply repeat CONTEXT-ELEMENT. If mucomplet.sgm read
	<set> [...]
	 <book> [...] &chap1.sgm; &chap2.sgm; </book>
	 <book> [...] </book>
	</set>
and chap1.sgm was
	<chapter> [...] </chapter>
then you could set sgml-parent-document in chap1.sgm to
	("mucomplet.sgm" "set" "book" "chapter")


You can get around this issue completely by using precompiled DTDs to load DTD information. Once, in your master document, use M-x sgml-save-dtd to save the DTD for example to /tmp/docbook.ced. Then include
	sgml-default-dtd-file:"/tmp/docbook.ced"
in your local variables.


I hope this is of some help,

cu
   Marc André Selig

-- 
mas@seligma.com (Marc Andre Selig)
I prefer PGP-encrypted mail.  1024-bit key, ID 598342D9,
Key fingerprint = F5 98 23 AD 20 51 72 58  DF 69 B9 BC 9B CD 14 D2





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]