This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


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

DocBook Extension syntax


I'm not totally sure if this question should be asked here or on the docbook-apps list, but it seems more related to the DTD, so I'll try here.

I'm trying to write an extension to DocBook that adds several attributes to programlisting and extends its content model slightly.  So far, I have been unable to generate a DTD that parses correctly; what follows is my current attempt:
<!--
  DBLP.DTD; a literate programming DTD based on DocBook
  PUBLIC "-//Mark Wroth//DTD DocBook V4.1 Literate Programming Extension 1.0//EN"
-->
<!ENTITY % programlisting.element "IGNORE">
<!ENTITY % local.programlisting.attrib "
 file          CDATA  #IMPLIED -- file name for output file --
 continuedfrom IDREF  #IMPLIED
 continuedin   IDREF  #IMPLIED ">
<!ENTITY % docbook PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
%docbook;

<!ELEMENT ProgramListing - -
  ((CO | LineAnnotation | XRef | %para.char.mix; )+) >

The basic intention is to add xref to the content model, and the three attributes file, continuedin, and continuedfrom.  Looking at dbpool.mod, I would have predicted that this dtd would cause the original definition of programlisting to be ignored, substituting the new one, while adding the attributes.  However, neither onsgmls nor openjade believe this is a syntactically correct DTD.

What am I doing wrong?

Mark B. Wroth
<mark@astrid.upland.ca.us>


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