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] Suggestion needed...


Hmm.  So far, we have one vote for stylesheet customization (Patrick), and
one for DTD customization (Yann).  I think there's a little bit of confusion
on where exactly your problems are.  As Yann pointed out, using a stylesheet
to add large chunks of content is a bad idea.  Even if you won't be handing
your XML source off to anybody else, that's just breaking the
content/presentation separation from the reverse direction.  Legal notices
and copyright are part of the content of the book, so should be included
prior to rendering.

Your question seems to be focused around this issue, and including it in the
DTD is one solution.  Typically, when we think of a DTD, we think only of
the element and attribute definitions, but it's equally valid to include
entity declarations in a DTD.  This is probably the simplest way to include
several entities in all of your documents.

However, you can also use a document-level customization layer in each of
your documents:

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"; [
 <!ENTITY % l10n PUBLIC "-//AGAMURA//ENTITIES QuXo Localization V1.0//en-US"
   "http://www.agamura.com/xml/quxo/1.0/ent/l10n.ent";>
 <!ENTITY % copyright PUBLIC "-//AGAMURA//ENTITIES QuXo Copyright
V1.0//en-US"
   "http://www.agamura.com/xml/quxo/1.0/ent/copyright.ent";>
 <!ENTITY % corpdata PUBLIC "-//AGAMURA//ENTITIES QuXo Corporation Data
V1.0//en-US"
   "http://www.agamura.com/xml/quxo/1.0/ent/corpdata.ent";>
 %l10n;
 %copyright;
 %corpdata;
]>

This becomes a bit of a maintenance issue if you start adding additional
entity files to all of your documents, but you can get around that by
creating another entity file, like 'all_docs.ent' that points to the other
three entity files.  Then, you just have to modify all_docs.ent and all of
your documents will see the new entities.  For all intents and purposes,
doing it this way is identical to creating a single .dtd file that
references all of these entities and the DocBook DTD, but it allows you to
avoid the term 'DTD customization', which most people try to avoid.

Of course, none of this gets around the issues that Patrick points out.
Even if you are correctly including all of this content in your document,
Norm and Bob's XSLT stylesheets will not display it without some
customizations.  If that is your problem, that's a question for the
docbook-apps list.

I hope that helped more than it hindered,

Jeff Beal

> -----Original Message-----
> From: Patrick Eisenacher [mailto:eisenacher@fillmore-labs.com]
> Sent: Monday, May 12, 2003 10:45 AM
> To: Giuseppe Greco
> Cc: DocBook
> Subject: Re: [docbook] Suggestion needed...
> 
> 
> Giuseppe,
> 
> all this info is available already via the *info tags (articleinfo, 
> bookinfo, etc). By default, not all of that is displayed on the 
> titlepages. But you can either customize the titlepage template and 
> create a new titlepage stylesheet or do the customization in your 
> cutomization layer to fulfill your needs.
> 
> I recommend doing a stylesheet customization instead of doing a dtd 
> customization.
> 
> 
> Cheers,
> Patrick
> 
> Giuseppe Greco schrieb:
> > Hi all,
> > 
> > In our corporate documents, we need to automatically include
> > our standard legal notice, company info, logo etc.
> > 
> > I accomplished that by creating a new DTD file to be used instead
> > of the standard DocBook one. This new DTD file looks like this:
> > 
> > <!ENTITY % docbook PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
> >   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
> > <!ENTITY % l10n PUBLIC "-//AGAMURA//ENTITIES QuXo Localization
> > V1.0//en-US"
> >   "http://www.agamura.com/xml/quxo/1.0/ent/l10n.ent";>
> > <!ENTITY % copyright PUBLIC "-//AGAMURA//ENTITIES QuXo Copyright
> > V1.0//en-US"
> >   "http://www.agamura.com/xml/quxo/1.0/ent/copyright.ent";>
> > <!ENTITY % corpdata PUBLIC "-//AGAMURA//ENTITIES QuXo 
> Corporation Data
> > V1.0//en-US"
> >   "http://www.agamura.com/xml/quxo/1.0/ent/corpdata.ent";>
> > 
> > %docbook;
> > %l10n;
> > %copyright;
> > %corpdata;
> > 
> > As you can see, it just includes the standard DocBook DTD and then
> > adds some additional entities...
> > 
> > For example, %copyright; contains the legal notice and assert,
> > %corpdata; contains long and short company name, web site, etc...
> > 
> > Well, I think this is the wrong place where to place entities like
> > these. They should be placed somewhere else and then accessed by
> > our customized DocBook stylesheets.
> > 
> > What do you think about that? What do you suggest instead?
> > 
> > Thanks,
> > 
> 
> 
> ---------------------------------------------------------------------
> 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]