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]

Re: DocBook Extension syntax


> From: "M. Wroth" <mark@astrid.upland.ca.us>
> 
> 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?

The problem is that %para.char.mix; includes
%xref.char.class; which includes Xref.  Try 
removing the explicit Xref from your new content
model.

bobs
Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The Santa Cruz Operation, Inc.              fax:   (831) 429-1887
                                            email: bobs@sco.com

------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-request@lists.oasis-open.org


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