- From: Alex Milowski <alex@milowski.com>
- Date: Tue, 8 May 2012 11:54:34 -0700
- To: XProc WG <public-xml-processing-model-wg@w3.org>
I think we should consider a "render MathML" step and I've tried to
make a proposal for its definition. This pipeline also assumes the
use of c:data/@href that I recently sent an e-mail about.
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0"
xmlns:m="http://www.w3.org/1998/Math/MathML"
xmlns:pe="http://www.w3.org/ns/xproc-step-extension"
name="render-mathml"
>
<p:input port="source" primary="true"/>
<p:output port="result" primary="true"/>
<p:declare-step type="pe:render-mathml">
<p:documentation>This step will either generate an external
resource and return a c:data </p:documentation>
<p:input port="source"/>
<p:output port="result"/>
<p:option name="content-type" select="'image/png'">
<p:documentation>The output type of the renderer.</p:documentation>
</p:option>
<p:option name="href">
<p:documentation>The exact resource of where to store the
rendered mathml.</p:documentation>
</p:option>
<p:option name='generate-href' select="'true'">
<p:documentation>Indicates whether a URI should be generated
to store the MathML.</p:documentation>
</p:option>
<p:option name="suffix">
<p:documentation>A suffix to use for the generated
URI.</p:documentation>
</p:option>
</p:declare-step>
<p:viewport match="m:math">
<pe:render-mathml/>
<p:template>
<p:input port="template">
<p:inline>
<img xmlns="http://www.w3.org/1999/xhtml"
src="{/c:data/@href}" alt="rendered MathML"/>
</p:inline>
</p:input>
<p:input port="parameters">
<p:inline>
<c:param-set/>
</p:inline>
</p:input>
</p:template>
</p:viewport>
</p:declare-step>
--
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."
Bertrand Russell in a footnote of Principles of Mathematics
Received on Tuesday, 8 May 2012 18:55:07 UTC