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


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-apps] Alternative to internal entities?


Hi Chris,

Wouldn't using a PI such as the following achieve the same effect --
without requiring any DTD customization?

  <?entity name='wrkngName'?>

Or better yet, so that you didn't need to hard-code your variablerefence
content into your stylesheets, something like the following -

  <?entity name='wrkngName' uri='http://foo.com/entities.xml'?>

...where the content at http://foo.com/entities.xml is whatever you
otherwise would have hard-coded into your stylesheet.

Is there an advantage to using an element for this instead of a PI?

Also, as far as DocBook not really be intended to be used as-is, but
intended to be customized for specific purposes: that may be the reality
for commercial organizations using DocBook, but I don't think it holds
true for the open-source doc authoring community (FreeBSD doc project,
LDP, KDE doc people, etc.), which (for a lot of reasons) needs a common,
stable, "unextended" DocBook that's supported by the standard
off-the-shelf DocBook XSLT stylesheets (and other processing apps; for
example, Steve Cheng's docbook2X).

I don't think it's practical or advisable for individual open-source doc
authoring groups to unilaterally extend the DocBook schema to add
elements for purposes like this (that is, DOCTYPE-less entity/variable
references). Of course, if we could all get together and develop and
agree on a standard way to do it, whether it meant adding a new element
to the DocBook schema, or coming up with solution that wasn't tied to a
specific DTD/schema, we'd all be better off.

It seems like we wouldn't need to come up with something completely new --
we've already got the PI mechanism and support for it in XSLT. It'd
basically just amount to agreeing on what names to use in the PI (for
example, "variablereference" or "entity").

  --Mike

"Christopher R. Maden" <crism@maden.org> writes:

> At 15:50 29/4/04, Paul Heinlein wrote:
> >If you use a tag like <variablereference/>, don't you lose the ability
> >to validate your documents? Am I missing or misunderstanding
> >something?
> 
> Sort of, and yes.
> 
> DocBook is really not intended to be used as-is; it's intended to be 
> customized for your specific purposes.  That's why (in the DTD version) 
> there are all those parameter entities.  With the XSDL version, it's a 
> little trickier; you basically have to comment out or modify the 
> definitions in the original DocBook schemas, and replace them with your own 
> definitions, but the principle is the same.
> 
> In this case, for my clients, I've substantially modified the DocBook 
> schema, so the use of this element is valid just about anywhere character 
> data is allowed.  The front matter (basically bookinfo) has a few 
> additional elements to allow storing the values of some of those variables 
> (product version, etc.).
> 
> ~Chris

Attachment: pgp00000.pgp
Description: PGP signature


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