xsl-list
[Top] [All Lists]

Re: [xsl] HTML5 and MathML and namespaces, oh my

2020-11-06 08:57:58
Hi,

On Thu, Nov 5, 2020 at 10:18 PM Liam R. E. Quin 
liam(_at_)fromoldbooks(_dot_)org <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

On Fri, 2020-11-06 at 01:13 +0000, Chris Papademetrious
christopher(_dot_)papademetrious(_at_)synopsys(_dot_)com wrote:

  <xsl:template xmlns="http://www.w3.org/1998/Math/MathML";
match="mi">

i think you want,
<xsl:template xmlns:m="http://www.w3.org/1998/Math/MathML";
match="m:mi">


Alternatively,
<xsl:template xpath-default-namespace="http://www.w3.org/1998/Math/MathML";
match="mi">

which binds unprefixed names to MathML for the purposes of XPath, in the
scope of this template. Not that I would recommend doing this a lot, or
even much at all.

One takeaway is that we have the option of writing our XSLT to match using
the same prefixes on names as are used in the document(s), but we don't
have to, and indeed it is a necessary feature that we be able to assign and
use our own prefixes instead, especially when dealing with these
mixed-namespace cases.

Cheers, Wendell

-- 
...Wendell Piez... ...wendell -at- nist -dot- gov...
...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org...
...github.com/wendellpiez... ...gitlab.coko.foundation/wendell...
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>