Re: writing a DTD with TDTD and using it with psgml

Jochen Hayek <[email protected]> Fri, 06 Feb 2004 12:52:03 +0100
Newsgroups gmane.emacs.psgml.user
Organization Hayek@Berlin
Message-ID <[email protected]>
>>>>> Peter Flynn writes:

> On Thu, 2004-02-05 at 23:46, Jochen Hayek wrote:

    [...]

    PF> There isn't anything to set up...
    PF> TDTD-mode won't write a DTD for you,

I feared so ;-)
But I attached the DTD from the TDTD tutorial.

    PF> [...]

    >> Does anybody also use TDTD and psgml together?

    PF> Yes, all day.

    [...]

    PF> You should also be able to just open a new file in psgml-mode,
    PF> which references the DTD,

That's the issue!
I am not successful at writing the correct DOCTYPE line for that new file,
at least not with a "... system ..." id.
(And just for the experiments I don't want to extend the catalogue.)
psgml will just not parse the right DTD for me.

    PF> and just use Element Insert to see what is needed.

If I only where there ...

    PF> ///Peter

J
tutorial.dtd (text/xml, 1.4 KB)
<?xml version="1.0"?>
<!-- ============================================================= -->
<!--                    dtd-mode tutorial DTD                      -->
<!-- ============================================================= -->

<!--                    Paragraph Content                          -->
<!--                    Content allowed inside paragraphs          -->
<!ENTITY % paracon     "#PCDATA | list"                              >

<!--                    Book                                       -->
<!ELEMENT  book         (para | list)+                               >

<!--                    Paragraph                                  -->
<!ELEMENT  para         (%paracon;)*                                 >

<!--                    List                                       -->
<!ELEMENT  list         item+                                        >
<!--         type       Specifies the formatting applied to the list
                        items
             id         Unique identifier                          -->
<!ATTLIST  list
             type       (ordered | unordered)              #REQUIRED
             id         ID                                 #IMPLIED  >

<!--                    List Item                                  -->
<!ELEMENT  item         (para | list)+                               >

<!--                    End of dtd-mode tutorial DTD               -->