Page 1 of 1

Declare and use a namespace inside another namespace?

Posted: Mon Mar 24, 2025 10:14 am
by wendycole
Hello,
this should be working but it says ml:math is incomplete and ml:matrix not allowed, how can i fix this ? i need to know if i can use a namespace inside another one.

Code: Select all

<!-- il est possible d'utiliser l'espace de noms http -->
<http:html xmlns:http="http://www.w3.org/1999/xhtml">
<http:head>
    <http:title>Titre du document</http:title>
</http:head>
<http:body>
    <http:p>
        <!-- il est possible d'utiliser l'espace de noms ml -->
        <ml:math xmlns:ml="http://www.w3.org/1998/Math/MathML">
            <ml:matrix>
                <ml:matrixrow>
                    <ml:cn>0</ml:cn>
                    <ml:cn>1</ml:cn>
                    <ml:cn>0</ml:cn>
                </ml:matrixrow>
                <ml:matrixrow>
                    <ml:cn>0</ml:cn>
                    <ml:cn>0</ml:cn>
                    <ml:cn>1</ml:cn>
                </ml:matrixrow>
            </ml:matrix>
        </ml:math>
        <!-- il n'est plus possible d'utiliser l'espace de noms ml -->
    </http:p>
</http:body>
</http:html>
<!-- il n'est plus possible d'utiliser l'espace de noms http -->

Re: Declare and use a namespace inside another namespace?

Posted: Tue Mar 25, 2025 11:43 am
by tavy
Hi,

In that context, you can use an element from the MathML namespace. It appears that the "matrix" element is not permitted. You may need to use the "mtable" element.
For more information, visit: https://www.w3.org/TR/REC-MathML/chap3_5.html

Best Regards,
Octavian