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]
Other format: [Raw text]

RE: [docbook] Creating a New Element


The '%' sign in a DTD refers to a parameter entity.  Parameter entities are
just like regular entities, but they have to be declared as parameter
entities and can only be used within the DTD.  The parameter entities in
DocBook are documented in "DocBook: The Definitive Guide"
(http://docbook.org/tdg/en/html/ref-paraments.html).

In your case, the %smallcptr.char.mix; parameter entity expands to:
  "#PCDATA|replaceable|inlinegraphic|inlinemediaobject|indexterm|beginpage"

If you want footer to have the same content model as a para you can use

<!ELEMENT footer - - ((%para.char.mix;|%para.mix;)+)>

%para.char.mix; includes the inline elements valid in a <para/>, and
%para.mix includes the block elements.

Jeff Beal

> -----Original Message-----
> From: JABakken@dstsystems.com [mailto:JABakken@dstsystems.com]
> Sent: Tuesday, August 19, 2003 10:51 AM
> To: docbook@lists.oasis-open.org
> Subject: [docbook] Creating a New Element
> 
> 
> 
> 
> 
> 
> I am in the process of creating a new element (called footer 
> - which is my
> first attempt at trying this) that I want to add using a 
> custom layer. I
> have created the custom layer which I named mydocbk.dtd. All 
> I have so far
> are the first couple of lines, and I'm a bit confused on how 
> to finish.
> 
> Here is what I have so far:
> 
> <!ENTITY %local.tech.char.class "footer">
> <!ENTITY % DocBookDTD PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
> %DocBookDTD;
> 
> 
> I am trying to follow an example that looks as follows:
> 
> <!ENTITY % local.tech.char.class "|MethodName">
> 
> <!-- load DocBook -->
> <!ENTITY % DocBookDTD PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
> %DocBookDTD;
> 
> <!ELEMENT MethodName - - ((%smallcptr.char.mix;)+) >
> <!ATTLIST MethodName
>         %common.attrib;
>         %classname.role.attrib;
>         %local.classname.attrib;
> >
> 
> The line that reads
> <!ELEMENT MethodName - - ((%smallcptr.char.mix;)+)>
> 
> is very confusing. I have no idea what 
> ((%smallcptr.char.mix;)+) means.
> 
> In my instance, I am wanting to base footer on the para 
> element, but am not
> quite sure how to finish it up.
> 
> Thanks in advance for any help on this.
> 
> -JB
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-help@lists.oasis-open.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org


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