Re: Still serious problems with psgml 1.2.5

Joachim Ziegler <[email protected]>
Newsgroups gmane.emacs.psgml.user
Organization Max-Planck-Institut für Informatik
Message-ID <[email protected]>
My conjection is that it is the complexity of the DocBook DTD which causes
psgml to get confused.

I experimented with the following tinybook.dtd

<!ELEMENT book (title?,chapter+)>
<!ELEMENT chapter (title?,para+)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT para (#PCDATA)>

and the two split files

testbook.xml:

<?xml version="1.0" ?>
<!DOCTYPE book    SYSTEM "tinybook.dtd"
[
<!ENTITY chapter1 SYSTEM "chapter1.xml">
]>
<book>
   <title>To split or not to split</title>
   &chapter1;
</book>
<!-- Keep this comment at the end of the file
Local variables:
mode: xml
sgml-default-dtd-file:"testbook.ced"
End:
-->

and chapter1.xml:

<?xml version="1.0"?>
<chapter>
   <title>The first and glorious chapter</title>
   <para>A first and great paragraph</para>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: xml
sgml-parent-document:("testbook.xml" "book" "chapter")
End:
-->


Here, everything works fine. Loading chapter1.xml starts psgml and the
context-sensitive inserting mechanism works correctly right from the
beginning.


Well, nearly everything: There's something wrong with the setting of 
variables
by the user:
When clicking on "SGML" -> "File Options" -> "Parent Document" the user is
asked to
enter the value of the variable into the minibuffer. But whatever I 
enter, the
value always stays "nil".
I had to enter the corresp. value by hand into the comment at the end of 
the
file



I've also made some experiments with the original DocBook-DTD at home 
with my SuSE-Linux precompiled XEmacs
21.1 and the precompiled psgml 1.2.3, which is automaically loaded when I
load the following minimal chapter1.xml:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<chapter>
<title>A great title</title>
<para>A great paragraph.</para>
</chapter>
<!--
     Local Variables:
     mode: xml
     sgml-parent-document:("LEDATutorium.xml" "book" "chapter")
     End:
-->


Exactly the same problems arise:

1) Pressing C-c C-e and TAB after <chapter> gives

Possible completions are:
ABBREV			  GUIBUTTON		    REFERENCE
ABSTRACT		  GUIICON		    REFERENCEINFO
ACCEL			  GUILABEL		    REFMETA
ACKNO			  GUIMENU		    REFMISCINFO

and all the rest...

2) sgml-show-context at this position gives

Current element: chapter  [UNDEFINED]
Element content: mixed  [ANY]
Valid end-tags : </chapter>
Valid start-tags
In current element: (in ANY)

3) In the parent file "LEDATutorium.xml" however, everything works fine. 
I've
stripped down the master file to the following version:

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE book
     PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
            "dummy-URL"
[
<!ENTITY chapter1 SYSTEM "chapter1.xml">
]>

<book lang="de" status="draft">
&chapter1;
</book>

<!-- Keep this comment at the end of the file
Local variables:
mode: xml
sgml-omittag:t
sgml-shorttag:t
sgml-namecase-general:t
sgml-general-insert-case:lower
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:nil
sgml-parent-document:nil
sgml-default-dtd-file:"LEDATutorium.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->


So both my versions of Xemacs at home (everything precompiled by SuSE) and
Emacs and Xemacs at work (under Solaris) show this erroneous behaviour.

4) Now to go completely crazy: *sometimes* it works as it should in
chapter1.xml and *sometimes not* in the master file, but I cannot reproduce
this behaviour. The meaning of 'sometimes' is: 1 hour ago, everything 
worked
fine, now it does'nt work any more and I can't remember having changed
anything substantially.


Joachim



-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.