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: DTD Customization


/ Guillaume Rouchy <rouchyg@gatwick.geco-prakla.slb.com> was heard to say:
| I built a small application that allow the user to author a docbook
| document by filling a template. In order to mark the data written by the
| user into the document, I was thinking about using a new tag, <user> for
| instance.
| This tag can only contain CDATA but may appear in ANY context (<title>,
| <para>, <email>, etc...).

I'm not sure I quite follow what you have in mind, but I assume
you mean PCDATA not CDATA. If this marker has to be able to
appear absolutely anywhere, you might consider using a
processing instruction instead.

| How can I modify the DTD to reflect that ? I hope there is another way
| than changing every element declaration to include the new tag...

Well, complete ubiquity might require a fair bit of work, but this
should get you most of the way there:

<!ENTITY % local.other.char.class "|user">
<!ENTITY % docbook PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
%docbook;
<!ELEMENT user (#PCDATA)>

                                        Cheers,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com>      | DNA neither cares nor knows. DNA
http://www.oasis-open.org/docbook/ | just is. And we dance to its
Member, DocBook Editorial Board    | music.--Richard Dawkins


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