Your template that matches figure elements doesn't call xsl:apply-templates,
so the template for caption elements will never be activated.
Note also that this:
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:value-of select="src"/>
</xsl:attribute>
</xsl:element>
can be rewritten as:
<img src="{src}"/>
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Joan Alvarez [mailto:ALVAREJO(_at_)wyeth(_dot_)com]
Sent: 20 September 2005 14:42
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Subject: Re: [xsl] Caption will not Display
Following are XSL , XML and DTD sections of documents being
used for conversion to html.
The figure (jpg file) shows up in the html file, but the
caption does not. Any
assistance would be very much appreciated.
Joan Alvarez <alvarejo(_at_)wyeth(_dot_)com>
XSL Code:
<xsl:template match="figure/caption"><br /> <br /><i>
<xsl:apply-templates/></i>
</xsl:template>
<xsl:template match="caption"><br /> <br /><i>
<xsl:apply-templates/></i>
</xsl:template>
<xsl:template match="figure">
<p><center>
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:value-of select="src"/>
</xsl:attribute>
</xsl:element>
</center></p><br /> <br />
</xsl:template>
======================
XML Code
<figure>
<src>FruitsVegetables.jpg</src>
<caption>Eat Fruits and Vegetables</caption>
</figure>
==========================
DTD
<!ELEMENT figure (#PCDATA | caption)* >
<!ATTLIST figure
file CDATA #REQUIRED >
<!ELEMENT caption (#PCDATA) >
==============================
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--