mathml & amaya

mathml & amaya - Divers - Programmation

Marsh Posté le 17-12-2002 à 11:22:20    

Dans le cadre d'un projet, je dois produire du mathml.
Pour vérifier si le code produit était valide,  
j'allais sur le site :
    http://www.mathmlcentral.com
 
Pas trés pratique ...
Donc j'aurais voulu pouvoir utiliser un navigateur  
pour faire le rendu de mon mathml et ainsi vérifier le résultat.
Aprés plusieurs essais, j'ai pris amaya (le navigateur W3C).
Ca marche bien ou presque ... Lorsque j'utilise des balises comme par exemple <apply>, <plus/>, ...,  
comme dans ce fichier :  

Code :
  1. <?xml version="1.0"?>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <body>
  4. <h1> Mon exemple sans apply </h1>
  5. <math xmlns="http://www.w3.org/1998/Math/MathML">
  6. <mfrac>
  7. <mrow>
  8.   <msup>
  9.       <mfenced>   
  10.     <mrow>
  11.         <mi>a</mi>
  12.         <mo>+</mo>
  13.         <mi>b</mi>
  14.     </mrow>
  15.       </mfenced>
  16.     <mn>2</mn>
  17.   </msup>
  18. </mrow>
  19.   <mn>2</mn>
  20. </mfrac>
  21. </math>
  22. <h1> Mon exemple avec apply</h1>
  23. <math xmlns="http://www.w3.org/1998/Math/MathML">
  24. <apply>
  25.   <divide/>
  26.   <apply>
  27.     <power/>
  28.     <apply>
  29.       <plus/>
  30.       <ci>a</ci>
  31.       <ci>b</ci>
  32.     </apply>
  33.     <cn>2</cn>
  34.   </apply>
  35.   <cn>2</cn>
  36. </apply>
  37. </math>
  38. </body>
  39. </html>


j'ai un message d'erreur du genre:

 *** Errors/warnings in "le fichier"
 Warning: no encoding specified, assuming UTF-8
  line 26, char 1: Invalid or unsupported MathML element <apply>
  line 27, char 2: Invalid or unsupported MathML element <divide>
  line 28, char 2: Invalid or unsupported MathML element <apply>
  line 29, char 4: Invalid or unsupported MathML element <power>
  line 30, char 4: Invalid or unsupported MathML element <apply>
  line 31, char 6: Invalid or unsupported MathML element <plus>
  line 32, char 6: Invalid or unsupported MathML element <ci>
  line 33, char 6: Invalid or unsupported MathML element <ci>
  line 35, char 4: Invalid or unsupported MathML element <cn>
  line 37, char 2: Invalid or unsupported MathML element <cn>***  
 
 
Si quelqu'un à une idée où la méthode pour utiliser ces balises, Merci

Reply

Marsh Posté le 17-12-2002 à 11:22:20   

Reply

Marsh Posté le 17-12-2002 à 11:35:51    

Essaie d'ajouter un attribut encoding à l'entête XML comme ceci, pour l'instant il s'attend à de l'UTF-8 comme codage...:
 


<?xml version="1.0" encoding="ISO-8859-1"?>


 
 
Bonne continuation. Avander


---------------
A thing of beauty is a joy forever (John Keats)
Reply

Marsh Posté le 18-12-2002 à 10:05:35    

aprés avoir récupérer les xsl voila un truc qui marche :

Code :
  1. ?xml version="1.0"?>
  2. <?xml-stylesheet type="text/xsl" href="mathml.xsl"?>
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <body>
  5. <math xmlns="http://www.w3.org/1998/Math/MathML">
  6. <apply>
  7.   <divide/>
  8.   <apply>
  9.     <power/>
  10.     <apply>
  11.       <plus/>
  12.       <ci>a</ci>
  13.       <ci>b</ci>
  14.     </apply>
  15.     <cn>2</cn>
  16.   </apply>
  17.   <cn>2</cn>
  18. </apply>
  19. </math>
  20. </body>
  21. </html>


 
maintenant que j'ai les xsl en local j'aimerai pouvoir tout faire en local chez moi (donc sans les http://www.w3.org/1998/Math/MathML )
Apparement ce lien sert récuperer les "MathML Namespace".
Comment les mettre en local si c possible ...
 
Merci ca me fera gagner du temps.

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed