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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: [docbook-apps] OLINKDB.XML why are enitties needed?


Hi Sebastian,
The difference is between a general entity:

<!ENTITY sf "somefile.tdb">

and an external parsed general entity, often referred to as a system
entitiy:

<!ENTITY sf SYSTEM "somefile.tdb">

The parser replaces a general entity reference with the text in quotes, but
it replaces a system entity reference by opening the file in quotes and
reading in the content of the file.

The olink database is not built by the stylesheet, it is just opened and
read passively.  The parser assembles it using the system entities (or
XInclude if you go that route).  So the olink database must use system
entities to load the content of the data files.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Sebastian Fey" <fey@parsytec.de>
To: <docbook-apps@lists.oasis-open.org>
Sent: Friday, February 25, 2005 3:34 AM
Subject: [docbook-apps] OLINKDB.XML why are enitties needed?


Hi,

I just made our CHMs cross-linkable (olinks) - _really_ a nice job, I
had lots of fun =)

Well it works, but there is something I don't understand:

The olinkdb.xml file references the single target database files with an
entity.

(...)
<!ENTITY sf SYSTEM "somefile.tdb">
(...)
<document targetdoc="BOOK_SOMEFILE">&sf;</document>

i wrote a script to output olinkdb.xml and put the filenames directly in
the document element instead of declaring an entity.

<document targetdoc="BOOK_SOMEFILE">somefile.tdb</document>

But it doesn't work this way! Why? I thought entities are just replaced
by the parser in a first run, so where is the difference?
is there a way to create entity declaration with xslt? So that I could
rewrite my script?


Thx in advance,

Sebastian Fey









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