hi, I have looked at this and looked at it and still cannot see what I'm
doing wrong.
I would appreciate another set of eyes to show me the error.Trying to match
on an 'inlineequation' to produce an 'img' element, but getting a 'span'
instead. I've cut it down to this example:

The XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:d="http://docbook.org/ns/docbook";
  version="1.0" exclude-result-prefixes="d">

  <xsl:include href="path/to/docbook/xsl-1.78.1/html/onechunk.xsl" />

  <xsl:template
match="d:inlineequation/d:inlinemediaobject[@remap='math']/d:imageobject/d:imagedata">
    <xsl:element name="img">
      <xsl:attribute name="class">math</xsl:attribute>
    </xsl:element>
  </xsl:template>
</xsl:stylesheet>

This DocBook 5 XML:
<article xmlns="http://docbook.org/ns/docbook";
  xmlns:mml="http://www.w3.org/1998/Math/MathML";
  xmlns:xl="http://www.w3.org/1999/xlink";>
 <section remap="section" xml:id="a0000000002">
  <info><title>Introduction</title></info>
   For example,
  <inlineequation>
  <inlinemediaobject remap="math">
    <imageobject role="math_images">
      <imagedata role="math" />
    </imageobject>
    <textobject role="tex">
      <phrase>$\alpha +\beta {}x+\varepsilon $</phrase>
    </textobject>
  </inlinemediaobject>
</inlineequation>.
</section>
</article>

And I get this result, which means that my template is not getting used,
right? Can you see what I'm doing wrong? I omit the HTML header and intro
material:
<div class="section">
      <div class="titlepage">
        <div>
          <div>
            <h2 class="title" style="clear: both">
              <a name="a0000000002"></a>
              Introduction
            </h2>
          </div>
        </div>
      </div>
      For example,
      <span class="inlinemediaobject"></span>
      .
    </div>

thanks in advance,
--Tim

Reply via email to