OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: XInclude vs. external entities (Re: DOCBOOK: The best way to 'include'parts...)

>From: Janning Vygen <vygen@gmx.de>
>To: Ljósálfr <fjolsvit@netscape.net>, docbook@lists.oasis-open.org
>Subject: Re: DOCBOOK: The best way to 'include' parts of a DocBook
>Date: Tue, 10 Sep 2002 17:52:02 +0200
>I use XInclude all the time and by now i see no disadvantage over external 

The advantages of entities derive from the fact that the mechanism provides 
a level of indirection - the name of a chunk is decoupled from its address.  
Indirection carries a fundamental tradeoff of locality vs. centralized 
management (e.g. you must define an entity, before you can use it, but the 
<!ENTITY ...> declaration has the advantage that by centralizing this 
mapping, the address of a chunk can be changed in a single place).  Also, 
indirection carries with it the potential to override the address (or even 
the value, in the case of entities), or for it to be externally specified.

One of my favorite techniques is for a document chunk (itself an entity) to 
reference entities it (i.e. its mating external parameter entity) doesn't 
define (or that it does define, but which the parent overrides).  This 
allows reusable content that is customizable by the parent, and can be used 
with entities as small as a term (e.g. a product name) to ones as large as 
figures, tables, paragraphs, whole document chunks, etc.

I don't mean to imply that XInclude is bad - it probably serves as a 
suitable replacement for external entities, most of the time.  The primary 
benefit is that it's conceptually and functionally simpler.  However, I 
wanted to cite some usage models you (and other XInclude advocates) may have 
been overlooking.

The external entity facility is a powerful tool in structuring modular 
documentation - one which I'd never willingly give up.

Matt Gruenke

Join the world’s largest e-mail service with MSN Hotmail. 

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC