Post by Vincent LefevrePost by Chuck BowlingI'm not sure what I'm doing wrong but I can't get MathML symbols to work in
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mo> ∑ </mo>
</mrow></math>
XML Parsing Error: undefined entity
Location: file:///C:/Documents%20and%20Settings/xx/Desktop/t.xml
Line Number 3, Column 6:<mo> ∑ </mo>
-----^
I don't know what Firefox does, but you must define the entities to
be able to use them. This can be done by using a MathML DTD.
BTW, you should also use an XML prolog.
An alternative to referencing the DTD (as DTD's can be problematic) is
to use unicode character references. You can lookup the mapping at:
http://www.w3.org/TR/MathML2/bycodes.html
You can also use the unicode code pages for reference:
http://www.unicode.org/charts/
With a character reference, your MathML becomes:
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mo> ∑ </mo>
</mrow></math>
The beauty of this solution is that:
* there are no extra declarations
* you can cut-n-paste this MathML chunk anywhere and not
have to worry about defining characters in the prolog
or DTD.
I have had quite a bit of success using MathML in many different
vocabularies (not just XHTML) with unicode. Most "normal" symbols
used are in unicode 2.0. Unicode 3.0 extends this addition additional
symbols.
Also, if you have a unicode aware authoring tool, you can just insert
the character directly. This is what I do in that I use XMLMind's XML
editor (see www.xmlmind.com) and use their unicode character palette to
insert such characters. In the authoring tool, I just see the character
and not the character reference--which makes things rather nice.
Further, some operating systems (e.g. mac OS X) suppose character
palettes at the OS level. This lets you insert unicode characters
without
the tool have support for browsing character code pages. This works
as long as the tool you use for authoring supports pasting of unicode
characters.
In addition, if there isn't a unicode character (which is possible but
not often the case), you can use mglyph. See:
http://www.w3.org/TR/MathML2/chapter3.html#presm.mglyph
-- Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity
of the
inflexions, i.e. to the degree of analysis effected by the language
considered."
Bertrand Russell in a footnote of Principles of Mathematics