Entities and Namespaces

Hi.

Can entities be namespaced?

For example, take the following XHTML document:

   <html xmlns="http://www.w3.org/TR/xhtml1/strict">

     <head>
       <title>Mozilla Tests: XML namespace</title>
     </head>

     <body>

       <h1>Relationships between &theta; and &pi;</h1>

       <math xmlns="http://www.w3.org/Math/MathML">
          <mrow>
            <mi>&theta;</mi>
            <mo>=</mo> 
            <mn>&pi;</mn>
          </mrow>
       </math>

       <relationships xmlns="http://ns.ieh.ch/relationships/dtd">
          <equals type="numeric">
             <i>&theta;</i>
             <i>&pi;</i>
          </equals>
       </relationships>

     </body>

   </html>

It has a section that is namespaced as MathML, and another that is
namespaced as a fictional "relationships" fragment, and each of the
three namespaces (XHTML, MathML, relationships) have different
expansions for their respective &theta; and &pi; entities.

Currently, the above document is not even well-formed, because the
entities have not been declared (after all, there is no DOCTYPE).

But even if they _were_ declared, there would still be no way to make
"&theta;" mean something different depending on the active namespace!

And the following is even less possible:

       <math xmlns="http://www.w3.org/Math/MathML">
          <mrow>
            <mi>&theta;</mi>
            <mo>=</mo> 
            <mn>&pi;</mn>
          </mrow>
          <mtext xmlns:html="http://www.w3.org/TR/xhtml1/strict">
             <html:p>This is how &html:theta and &html:pi; are equal.</html:p>
          </mtext>
       </math>

Will this ever be possible? (Is it possible now?)

Will Schema cover this?

If you are not the appropriate people to answer this, could you point
me to an appropriate mailing list? Thanks.

-- 
Ian Hickson
: Is your JavaScript ready for Nav5 and IE5?
: Get the latest JavaScript client sniffer at 
: http://developer.netscape.com/docs/examples/javascript/browser_type.html

Received on Tuesday, 28 September 1999 07:39:27 UTC