[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Subject: Re: Caption will not Display

Subject: RE: Subject: Re: Caption will not Display
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 20 Sep 2005 15:15:54 +0100
jpg will not display
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@xxxxxxxxx] 
> Sent: 20 September 2005 14:42
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Subject: Re:  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@xxxxxxxxx>
> 
> 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) >
> 
> ==============================    

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.