xsl transformation and special characters

Dear mathml experts

I'm trying to develop an application where text and mathematics can be 
edited online using a browser. I've runned into a few problems doing that:

I've made a XHTML page, where the end-user should be capable of editing a 
text containing special letters like the danish æ, ø an å. This page is 
rendered just fine, but something happens as the text is sent from the 
textarea to the server that translates the letters:
    * æ  > æ
    * ø   > gø

This does not happen in a html page... First as I started using XML the 
problem occurred. Here is part of the XML page:


<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="pmathml.xsl"?>
<!--
   pref:renderer="techexplorer-plugin"
   pref:renderer="techexplorer"
   pref:renderer="css"
   pref:renderer="mathplayer"
   pref:renderer="mathplayer-dl"
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da">
.....


<TEXTAREA CLASS="editor">
æøå
</TEXTAREA>
...


As I submit the form with the Textarea, the letters: æ,ø and å are 
translated. But only in the browsers: ie6 and opera, not in Netscape or 
Mozilla.

It seems that the xsl transformations are causing the problems with the 
special characters. So I tryed a  version like the one beneath:

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
                "http://www.w3.org/Math/DTD/xhtml-math11-f.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" 
xmlns:m="http://www.w3.org/1998/Math/MathML">
  <head>
    <OBJECT ID="MathPlayer" 
CLASSID="clsid:32F66A20-7614-11D4-BD11-00104BD3F987"></OBJECT>
    <?IMPORT NAMESPACE="m" IMPLEMENTATION="#MathPlayer"?>

This solves the problem with special character inputs but this causes the 
following problems:
    * I have to write the mathml like: <m:math>... instead of: <math 
xlms="..." >, this is a problem if I want to make it possible to copy 
mathml from programs like Mathematica,
    * I can't use the WEB-EQ input-control without writing a class-id 
statement in the header.
    * I'm not sure tha I can use both mathplayer and input-control on the 
same page.
1) If I use xsl transformations the user-input from html forms in Internet 
Explorer and Opera translates special characters like æ,ø and mathematical 
symbols like the integral symbol before they reach the server.
2) If I use the  <HTML doctype way then I have to write the mathml like: 
<m:math>... instead of: <math xlms="..." >, this is a problem if I want to 
make it possible to copy mathml from programs like Mathematica, plus I 
can't use the WEB-EQ input-control without writing a class-id statement in 
the header.

I think the solution could be something with entering some extra xsl files 
in the xsl way or translating the mathml on the server, depending on 
whether it must be edited or viewed.

How can this be solved?

Thanks

Morten Andersen
Denmark

Received on Friday, 4 July 2003 07:39:23 UTC