(mml, xsl)
return s
Apply a xsl to a MathML string
    @param mml: a string with MathML code
    @param xsl: a string representing a path to a xsl (xml stylesheet)
        file. This file name is relative to the PYTHONPATH

    >>> from sympy.utilities.mathml import apply_xsl
    >>> xsl = 'mathml/data/simple_mmlctop.xsl'
    >>> mml = '<apply> <plus/> <ci>a</ci> <ci>b</ci> </apply>'
    >>> res = apply_xsl(mml,xsl)
    >>> ''.join(res.splitlines())
    '<?xml version="1.0"?><mrow xmlns="http://www.w3.org/1998/Math/MathML">  <mi>a</mi>  <mo> + </mo>  <mi>b</mi></mrow>'
Apply a xsl to a MathML string
    @param mml: a string with MathML code
    @param xsl: a string representing a path to a xsl (xml stylesheet)
        file. This file name is relative to the PYTHONPATH
Apply a xsl to a MathML string @param mml : a string with MathML code @param xsl : a string representing a path to a xsl ( xml stylesheet ) file . This file name is relative to the PYTHONPATH
def apply_xsl(mml, xsl):
    """Apply a xsl to a MathML string
    @param mml: a string with MathML code
    @param xsl: a string representing a path to a xsl (xml stylesheet)
        file. This file name is relative to the PYTHONPATH

    >>> from sympy.utilities.mathml import apply_xsl
    >>> xsl = 'mathml/data/simple_mmlctop.xsl'
    >>> mml = '<apply> <plus/> <ci>a</ci> <ci>b</ci> </apply>'
    >>> res = apply_xsl(mml,xsl)
    >>> ''.join(res.splitlines())
    '<?xml version="1.0"?><mrow xmlns="http://www.w3.org/1998/Math/MathML">  <mi>a</mi>  <mo> + </mo>  <mi>b</mi></mrow>'

    """
    from lxml import etree
    s = etree.XML(get_resource(xsl).read())
    transform = etree.XSLT(s)
    doc = etree.XML(mml)
    result = transform(doc)
    s = str(result)
    return s
def apply_xsl ( mml , xsl ) : from lxml import etree s = etree . XML ( get_resource ( xsl ) . read ( ) ) transform = etree . XSLT ( s ) doc = etree . XML ( mml ) result = transform ( doc ) s = str ( result ) return s