S
Szymon Nieradka
Hi,
I'm trying to make a docbook document template. I would like to make
my life easier and instead of writing:
<glosslist>
<glossentry>
<glossterm>C</glossterm>
<glossdef>
<para>
A procedural programming language invented by K&R.
</para>
</glossdef>
</glossentry>
<!-- ... -->
</glosslist>
I'd like to write:
<glosslist>
<glossEntry term="C">
A procedural programming language invented by K&R.
</glossEntry>
<!-- ... -->
</glosslist>
(of course thats only example of use)
I'm making transormations of DocBook file using my custom XSL
stylescheet. This XSL stylescheet have got some default include at the
top (for ex. .../docbook/html/docbook.xsl). Abow I'm putting my addons.
I was trying to do what I want this way:
<xsl:template match="glossEntry">
<!-- (1) -->
<xsl:value-of select="@term"/> <!-- term -->
<!-- (2) -->
<xsl:value-of select="."/> <!-- definition -->
</xsl:template match="glossEntry">
At (1) I have to resolve / call <glossentry> and at (2) I have to do the
same with <glossdef> and <para>. I was trying a lot of combinations of:
<xsl:call-template name="glossentry"/>
and
<xsl:apply-templates select="glossentry"/>
but without success.
Of course I could insert HTML tags diresctly (<dl/>) but I'm not only
interested in HTML, I need also RTF and PDF output.
Any ideas? Is it possible?
I'm trying to make a docbook document template. I would like to make
my life easier and instead of writing:
<glosslist>
<glossentry>
<glossterm>C</glossterm>
<glossdef>
<para>
A procedural programming language invented by K&R.
</para>
</glossdef>
</glossentry>
<!-- ... -->
</glosslist>
I'd like to write:
<glosslist>
<glossEntry term="C">
A procedural programming language invented by K&R.
</glossEntry>
<!-- ... -->
</glosslist>
(of course thats only example of use)
I'm making transormations of DocBook file using my custom XSL
stylescheet. This XSL stylescheet have got some default include at the
top (for ex. .../docbook/html/docbook.xsl). Abow I'm putting my addons.
I was trying to do what I want this way:
<xsl:template match="glossEntry">
<!-- (1) -->
<xsl:value-of select="@term"/> <!-- term -->
<!-- (2) -->
<xsl:value-of select="."/> <!-- definition -->
</xsl:template match="glossEntry">
At (1) I have to resolve / call <glossentry> and at (2) I have to do the
same with <glossdef> and <para>. I was trying a lot of combinations of:
<xsl:call-template name="glossentry"/>
and
<xsl:apply-templates select="glossentry"/>
but without success.
Of course I could insert HTML tags diresctly (<dl/>) but I'm not only
interested in HTML, I need also RTF and PDF output.
Any ideas? Is it possible?