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: Re: XInclude vs. external entities (Re: DOCBOOK: The best way to'include' parts...)

Am Mittwoch, 11. September 2002 05:30 schrieb Matt G.:
> From: Janning Vygen <vygen@gmx.de>
> >To: Ljósálfr <fjolsvit@netscape.net>, docbook@lists.oasis-open.org
> >
> >I use XInclude all the time and by now i see no disadvantage over
> > external entities.
> 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.

ok, you are right in this point. If i include a fiel a lots of time 
with XInclude and ichange its location i have to change the url in 
every href attribute of XInclude.

Question: Can I use XMLCatalog with XInclude. Dont know much about 
XMLCatalogs but i think you can do a url to filename mapping with it. 
If xou could use it together with XInclude then you get back the 
"level of indirection"

Another important advantage of XInclude is the possibility to put 
doctype declaration in the modular doc to validate it seperatly from 
the main document AND you can use entites in each file which is not 
possible within external entities. 

And take a look at the powerful combination to use XInclude together 
with XPath to include just parts which match the XPath expression.

kind regards,

> 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

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

Powered by eList eXpress LLC