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] entities in processing instructions


Laszlo Kovacs wrote:

I am trying to implement a glossary in Javahelp that does not use Docbook glossary entities and does not use the Javahelp glossary feature either. The main reason being that javahelp.xsl does not convert Docbook glossaries into Javahelp glossaries (it converts them into html, but that is not enough in this case).

The plan is to use an xml processing instruction like:

<?glossary-entry text="pda" definition="personal digital assistant" ?>

But you can still use DocBook glossary markup for marking-up data and then customize stylesheets to generate output, you want.


Then I write an xsl template that translates this to an <object> tag that uses some java code I wrote that will open a window when the text is hovered with the definition in it.

You can mark your glossary terms with glossterm, like.


<para>....<glossterm>pda</glossterm>...</para>

Then, at the end of your document, just put glossary with term definitions:

<glossary>
<glossentry>
<glossterm>pda</glossterm>
<glossdef>
<para>Personal digital assistent</para>
</glossdef>
</glossterm>
...
</glossary>

Then you can add following template into your customization layer in order to not process glossary:

<xsl:template match="glossary"/>

And the add customized template for glossterm, that will generate object element you need:

<xsl:template match="glossterm">
<xsl:value-of select="."/>
<object ...>
...
<!-- You can access term definition with -->
<xsl:value-of select="//glossentry[glossterm = string(current())]/glossdef"/>
</object>
</xsl:template>


HTH,

Jirka

--
------------------------------------------------------------------
  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/
------------------------------------------------------------------

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


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