Re: HTML5 and MathML and namespaces, oh my

"Martin Honnen [email protected]" <[email protected]>
Newsgroups gmane.text.xml.xsl.general.mulberrytech
Message-ID <[email protected]>
Am 04.11.2020 um 13:44 schrieb Chris Papademetrious
[email protected]:
> Hi all,
>
> I have an HTML5-namespaced document containing MathML-namespaced <math>
> content:
>
> <!DOCTYPE html>
>
> <html  xmlns="http://www.w3.org/1999/xhtml">
>
>    <head>
>
>      <title>Equations</title>
>
>    </head>
>
>    <body>
>
>      <math xmlns="http://www.w3.org/1998/Math/MathML">
>
>        <mrow>
>
>          <mspace/>
>
>        </mrow>
>
>      </math>
>
>    </body>
>
> </html>
>
> I am trying to create an XSLT transformation that modifies these islands
> of MathML while leaving the surrounding content untouched. As a test, I
> try wrapping <mspace> elements in <mrow>:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
>      xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
>      xmlns:mml="http://www.w3.org/1998/Math/MathML"

So why do you declare that prefix mml here although you don't need it
anywhere? It will be in scope for any literal result elements your XSLT
creates. Either drop that line above or at least
>
>      xpath-default-namespace="http://www.w3.org/1998/Math/MathML"
>
>      exclude-result-prefixes="xs"

use    exclude-result-prefixes="#all"
here or
        exclude-result-prefixes="xs mml"

if you prefer.
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/3329386
or by email: [email protected]
--~--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.