W3C home > Mailing lists > Public > xml-names-editor@w3.org > September 1999

Entities and Namespaces

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Tue, 28 Sep 1999 12:39:21 +0100 (BST)
To: xml-names-editor@w3.org
Message-ID: <Pine.GSO.4.04.9909281221490.2620-100000@midge.bath.ac.uk>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:42 GMT