[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] include MathML files with the help of XSL
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)
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)
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">
The ID of equation is <xsl:value-of select="@id"/>
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!