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

S/MIME Cryptographic Signature



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