cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Skip Carter <s...@taygeta.com>
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:

<map:transformers>

       .....


   <!-- ======================= MML =========================== -->
   <map:transformer     name="mml-extractor" src="org.apache.cocoon.transformat
ion.FragmentExtractorTransformer2">
    <!--<map:parameter name="extract-uri" value="http://www.w3.org/1998/Math/Ma
thML"/>
    <map:parameter name="extract-element" value="math"/>-->
    <extract-uri>http://www.w3.org/1998/Math/MathML</extract-uri>
    <extract-element>math</extract-element>
   </map:transformer>


</map:transformers>


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:serialize/>
   </map:match>

   <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:serialize/>
   </map:match>

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

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

   <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:serialize/>
   </map:match>

   <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>
   
   <map:match pattern="mml/images/*.gif">
    <map:generate type="extractor" src="{1}"/>
    <!--<map:transform src="mml/mathmlc2p.xsl"/>-->
    <map:serialize type="mml2gif"/>
   </map:match>
    
    <!-- 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"/>
            <map:serialize/>
     </map:match>




Hope this is helpful to you,

Skip




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












Mime
View raw message