I have a xhtml file(using MathML to present definite integrals). In the xhtml file, there have some dummy variables. Now, I want to using Twig to replace those dummy variables.
integrals.xhtml:
<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mstyle mathsize="1em" displaystyle="true" mathcolor="#0000ff" f +ontfamily="serif"> <mml:mrow> <mml:msubsup> <mml:mstyle displaystyle="true"> <mml:mo>&#x222b;</mml:mo> </mml:mstyle> <mml:mn>0</mml:mn> <mml:mn>4</mml:mn> </mml:msubsup> </mml:mrow> <mml:msqrt> <mml:mrow> <mml:mrow> <mml:msup> <mml:mi>s</mml:mi> <mml:mn>2</mml:mn> </mml:msup> </mml:mrow> <mml:mo>+</mml:mo> <mml:mi>s</mml:mi> </mml:mrow> <mml:mspace width="0em" height="1.2ex" /> </mml:msqrt> <mml:mo maxsize="1">(</mml:mo> <mml:mn>2</mml:mn> <mml:mi>s</mml:mi> <mml:mo>+</mml:mo> <mml:mn>1</mml:mn> <mml:mo maxsize="1">)</mml:mo> <mml:mspace width="0.167em" /> <mml:mi>d</mml:mi> <mml:mi>s</mml:mi> </mml:mstyle> </mml:math>
First, I need to find the value?
<mml:mi>s</mml:mi>
Does anyone know an easy way to do this?

In reply to Replace MathML content using Twig by renovatio

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.