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

Gurra Green wrote:

> Does anybody have any suggestions on alternate methods for accomplishing 
> the same thing? It feels wrong to misuse DocBook because of an 
> incomplete tool, but the XMLMind editor has a number of verynice 
> features why I am reluctant to switching the whole company to another 
> editor. I have googled for others with the same problem, but not found 
> anything. Grateful for any suggestions, including makefile/perl hacks if 
> no "native" DocBook mechanism could be used.

One possible workaround is to use some element as indicator of entity. 
For example:

<phrase role="ent">productname</phrase>

Then you can add following code into your stylesheets customization 
layer in order to get phrase replaced by expanded text:

<xsl:template match="phrase[@role='ent']">
     <xsl:when test=". = 'productname'">SuperSoft v3.5</xsl:when>
     ... other xsl:when for handling other "entity" names ...
       <xsl:message>Undefined replacement text for <xsl:value-of 

This soulution is very easy to implement, only drawback is that you 
can't see resulting string in XXE. It would be possible to use CSS to 
replace placeholder with expanded text, but then you must very carefully 
synchronize CSS and XSL stylesheets. Or you can generate them 
automaticaly from some common source.

Other solutions would be usage of XInclude or using empty elements in 
separate namespace as entity replacement.


   Jirka Kosek     e-mail: jirka@kosek.cz     http://www.kosek.cz
   Profesionální školení a poradenství v oblasti technologií XML.
      Podívejte se na náš nově spuštěný web http://DocBook.cz
        Podrobný přehled školení http://xmlguru.cz/skoleni/

S/MIME Cryptographic Signature

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