W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > March 2013

Use Case 5.27 - Integrate Computation Components (MathML)

From: Alex Milowski <alex@milowski.com>
Date: Wed, 6 Mar 2013 10:46:11 -0800
Message-ID: <CABp3FNKY+7vKRdV5kwhD+vUf2zZun6hioBmxbDcmpZXJ3_Snqw@mail.gmail.com>
To: XProc WG <public-xml-processing-model-wg@w3.org>
We have this covered by extension steps.  For example, the following
pipeline computes the kernel for each matrix found in the document by
locating the MathML matrix elements (mtable/matrix) and then running a
custom filter step that computes the kernel and outputs a new mtable/matrix
element.

<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step type="ex:sign" xmlns:p="http://www.w3.org/ns/xproc"
    xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0"
    xmlns:ex="http://www.example.org/math"
    xmlns:m="http://www.w3.org/1998/Math/MathML">
   <p:input port="source"/>
   <p:output port="result"/>
   <p:import href="kernel.xpl"/>
   <p:viewport match="m:math/m:mtable | m:math/matrix">
      <ex:matrix-kernel/>
   </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 Wednesday, 6 March 2013 18:46:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 6 March 2013 18:46:42 GMT