cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Skip Carter <>
Subject Re: JEuclid for MathML to SVG conversion
Date Mon, 12 Apr 2004 17:24:37 GMT
> Greetings all:
> I am looking for a way to convert MathML to SVG (for inclusion of 
> equations in a DocBook publication).  JEuclid appears to do just this, 
> but the documentation is very sparse.  I have not been able to figure 
> out how to invoke it. 
> Ideally, I would like to bypass the Cocoon step; I've never  have no 
> need for a web application here. I just want to run a batch process (for 
> example, an Ant task) to convert my DocBook to HTML and PDF, with the 
> equations as embedded images.  Does anyone know how to run JEuclid from 
> the command line or from Ant?

I never tried doing it from the command line, but this is how I am doing
it in Cocoon.

The sitemap contains in the transformers section:



   <!-- ======================= MML =========================== -->
   <map:transformer     name="mml-extractor" src="org.apache.cocoon.transformat
    <!--<map:parameter name="extract-uri" value="
    <map:parameter name="extract-element" value="math"/>-->


And then in the pipeline:

   <map:match pattern="mml/">
    <map:generate src="mml/toturetest.xml"/>
    <map:transform type="mml-extractor"/>
    <map:transform src="mml/page2html.xsl"/>

   <map:match pattern="mml/example*.xml">
    <map:generate src="mml/example{1}.mml"/>
    <map:transform type="mml-extractor"/>
    <map:transform src="mml/page2html.xsl"/>

   <map:match pattern="mml/testsuite/**.gif">
    <map:read src="mml/testsuite/{1}.gif"/>

   <map:match pattern="mml/testsuite/**.png">
    <map:read src="mml/testsuite/{1}.png"/>

   <map:match pattern="mml/testsuite/**.xhtml">
    <map:generate src="mml/testsuite/{1}.xhtml"/>
    <map:transform type="mml-extractor"/>
    <map:transform src="mml/fragment2img.xsl"/>

   <map:match pattern="mml/testsuite/**.mml">
    <map:generate src="mml/testsuite/{1}.mml"/>
    <!--<map:transform src="mml/mathmlc2p.xsl"/>-->
    <map:serialize type="mml2gif"/>
   <map:match pattern="mml/images/*.gif">
    <map:generate type="extractor" src="{1}"/>
    <!--<map:transform src="mml/mathmlc2p.xsl"/>-->
    <map:serialize type="mml2gif"/>
    <!-- an example of a chain of XSLT transformations -->
    <map:match pattern="math/falling_clocks.xml">
            <map:generate src="xml/math/falling_clocks.xml"/>
            <map:transform src="stylesheets/mathml.xsl"/>
            <map:transform type="mml-extractor"/>
            <map:transform src="stylesheets/page_html.xsl"/>

Hope this is helpful to you,


 Dr. Everett (Skip) Carter      Phone: 831-641-0645 FAX:  831-641-0647
 Taygeta Scientific Inc.        INTERNET:
 1340 Munras Ave., Suite 314    WWW:
 Monterey, CA. 93940            

View raw message