This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


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

XSL stylesheets: ALT support in admon graphics?


Norm, can you add an ALT attribute to the <img> used
for graphical admonitions?  I'm trying to validate my
HTML against the HTML 4.01 DTD and ALT is a required
attribute of IMG.

I don't guarantee that this code is the right way to
do it, but it worked for me.  (One of these days I'll
submit a patch that you use verbatim, and then I'll
put that fact on my resume... :)

-M

<!-- html/admon.xsl -->
<xsl:template name="graphical.admonition">
...
<img>
  <xsl:attribute name="src">
    <xsl:call-template name="admon.graphic"/>
  </xsl:attribute>
  <!-- begin patch -->
  <xsl:attribute name="alt">
    <xsl:call-template name="gentext.element.name"/>
  </xsl:attribute>
  <!-- end patch -->
</img>


__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

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