Changeset 1262 for trunk/model/sources/math/mml/_res/model/bs.txt
- Timestamp:
- 03/11/08 13:54:21 (4 years ago)
- File:
-
- 1 edited
-
trunk/model/sources/math/mml/_res/model/bs.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/model/sources/math/mml/_res/model/bs.txt
r1205 r1262 61 61 contentType="text/mathml" 62 62 > 63 <!-- REMARQUE : les memes transformation XSL sont appliquées à l'issu de latex2mml dans latex/.../bs.txt --> 63 64 <!-- ### 64 65 # Ajout du namespace MathML … … 69 70 xmlns:math="http://www.w3.org/1998/Math/MathML" 70 71 version="1.0"> 71 <xsl:output method="xml" indent="no" encoding="UTF-8" />72 <xsl:output method="xml" indent="no" encoding="UTF-8" omit-xml-declaration="yes"/> 72 73 73 74 <xsl:template match="*"> … … 86 87 87 88 </xsl:stylesheet> 88 </xsl> 89 90 <!-- ### 91 # Modifications du MathML 89 </xsl> 90 </module> 91 92 <module code="mmlOO" type="com.scenari.m.bdp.facet.chain.FacetChainLoader" checkAutoMultiRes="true" 93 sourceParams="facet=mml" 94 contentType="text/mathml" 95 > 96 <!-- ### 97 # Modifications du MathML pour le rendre compatible OO 92 98 # --> 93 <xsl> 94 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 95 xmlns:math="http://www.w3.org/1998/Math/MathML" 96 version="1.0"> 97 <xsl:output method="xml" indent="no" omit-xml-declaration="yes" encoding="UTF-8"/> 98 99 <xsl:template match="/*"> 100 <math:math> 101 <xsl:apply-templates select="@*"/> 102 <!--<mstyle displaystyle="true">--> 103 <xsl:apply-templates select="node()"/> 104 <!--</mstyle>--> 105 </math:math> 106 </xsl:template> 107 108 <!-- # traitement des éléments ne pouvant pas contenir de fils --> 109 <xsl:template match="math:mo | math:mi | math:mn | math:mtext"> 110 <xsl:apply-templates mode="noImb" select="text() | *"> 111 <xsl:with-param name="pNodeName" select="local-name()"/> 112 </xsl:apply-templates> 113 </xsl:template> 114 115 <xsl:template match="text()" mode="noImb" priority="2"> 116 <xsl:param name="pNodeName"/> 117 <xsl:if test="string-length(normalize-space(.))>0"> 118 <xsl:choose><!-- # remplacement des mo en mi pour les opérateurs à plusieurs caractères (contrainte OO) --> 119 <xsl:when test="$pNodeName='mo' and string-length(.)>1"> 120 <xsl:element name="math:mi"> 121 <xsl:call-template name="tInspectContent"><xsl:with-param name="pContent"><xsl:value-of select="."/></xsl:with-param></xsl:call-template> 122 </xsl:element> 123 </xsl:when> 124 <xsl:otherwise> 125 <xsl:element name="math:{$pNodeName}"> 126 <xsl:call-template name="tInspectContent"><xsl:with-param name="pContent"><xsl:value-of select="."/></xsl:with-param></xsl:call-template> 127 </xsl:element> 128 </xsl:otherwise> 129 </xsl:choose> 130 </xsl:if> 131 </xsl:template> 132 <xsl:template match="*" mode="noImb"> 133 <xsl:apply-templates select="current()"/> 134 </xsl:template> 135 136 <!-- # OO ne supporte pas <mo>{</mo>. Solution de contournement non idéal : <mi>{</mi> --> 137 <xsl:template match="math:mo[text()='{']"> 138 <math:mi>{</math:mi> 139 </xsl:template> 140 141 <!-- # remplacement éventuel de caractère par d'autre (pour résoudre pb d'import OO) --> 142 <xsl:template name="tInspectContent"> 143 <xsl:param name="pContent"/> 144 <!-- caractères d'espacement non reconnus par OO --> 145 <xsl:value-of select="translate($pContent, 'ⅆⅈ⁢⁡⁣', '     ')"/> 146 </xsl:template> 147 148 <xsl:template match="@*|node()"> 149 <xsl:copy> 150 <xsl:apply-templates select="@*|node()"/> 151 </xsl:copy> 152 </xsl:template> 153 154 </xsl:stylesheet> 155 </xsl> 99 <transform params="transform=mathml2mathmlOO"/> 156 100 </module> 157 101 158 102 <module code="glimpse" type="com.scenari.m.bdp.facet.chain.FacetChainLoader" 159 103 checkAutoMultiRes="true" 160 sourceParams="facet=mml "104 sourceParams="facet=mmlOO" 161 105 contentType="image/png"> 162 106 <transform params="transform=mml2png"/> … … 166 110 <module code="swf" type="com.scenari.m.bdp.facet.chain.FacetChainLoader" 167 111 checkAutoMultiRes="true" 168 sourceParams="facet=mml "112 sourceParams="facet=mmlOO" 169 113 contentType="image/png"> 170 114 <transform params="transform=mml2swf"/>
Note: See TracChangeset
for help on using the changeset viewer.