docbook-apps message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: include MathML files with the help of XSL
- From: Zoltán János Jánosi <jazoja4@gmail.com>
- To: docbook-apps@lists.oasis-open.org
- Date: Wed, 13 Jun 2012 10:52:43 +0200
Hi all!
My question:
Is there any way (with XSLT) to dynamically pull in MathML files (by their ID) and put them into the XML/HTML files?
The situation is the following:
- I have a DocBook 4.4 XML file with equation objects in it.
- Every equation object has a unique ID.
- For every equation ID belongs to 2 files, one MathML 2.0 XML file and a graphics version.
-
Both filename is constructed from the equation ID+extension.
- The graphics version is linked by the imagedata tag.
The source equation looks like this: (DocBook 4.4)
<para>
<inlineequation id="Eq_0005">
<inlinemediaobject>
<imageobject>
<imagedata fileref="math/Eq_0005.gif"/>
</imageobject>
</inlinemediaobject>
</inlineequation>
<para>
I'd like to dynamically transform the equation object to include the MathML version rather than the graphics version. I tried to transform the DocBook document into XHTML and HTML5, and use xinclude to include the MathML XML files, but didn't succeed yet.
It should look something like this at the end: (I think)
<p>
<math>
<mrow>
<mi>a</mi>
<mo>⁢</mo>
<msup>
...
</math>
</p>
What I have tried yet:
Here is a simple XSLT to get the equation ID:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="inlineequation">
The ID of equation is <xsl:value-of select="@id"/>
</xsl:template>
</xsl:stylesheet>
Then I tried to use the xinclude and put into the XSLT but none of them seemed to work.
Any ideas appreciated.
Thanx in advance!
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]