This is the mail archive of the xsl-list@mulberrytech.com 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]

Replacing images with alt tags - PART 2


So, even with breaking up the template the only one that works is the
"img" template.  If an image is within a <p> tag it still uses the img
match thus putting <p> tags within <p> tags which is invalid wml.  In
terms of images as the link of an <a> tag those are not converted.
Whats going on?  I am new to this but I thought that the XSL was right.

<xsl:template match="a/img">
<!-- this should replace images with alt text only when img is the
link-->
   <xsl:value-of select="@alt"/> 
 </xsl:template>

 <xsl:template match="p/img">
<!-- replace images with alt text only when img is within a <p>-->
   <xsl:value-of select="@alt"/> 
 </xsl:template>

 <xsl:template match="img">
<!-- replace images with alt text in <p> tags when its not within
tags-->
   <p><xsl:value-of select="@alt"/></p>
 </xsl:template>



Jacob

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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