Changeset 1262
- Timestamp:
- 03/11/08 13:54:21 (4 years ago)
- Location:
- trunk/model/sources/math
- Files:
-
- 9 edited
-
latex/_res/model/bs.txt (modified) (1 diff)
-
latex/mathTexInline_od.odwidget (modified) (1 diff)
-
latex/mathTexInline_web.uiwidget (modified) (1 diff)
-
mml/_res/model/bs.txt (modified) (4 diffs)
-
mml/getSwf.uiwidget (modified) (1 diff)
-
mml/mml_od.transf (modified) (1 diff)
-
mml/mml_od@inline.transf (modified) (1 diff)
-
mml/mml_web.transf (modified) (2 diffs)
-
mml/mml_web@inline.transf (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/model/sources/math/latex/_res/model/bs.txt
r1165 r1262 70 70 </module> 71 71 72 <module code="mmlOO" type="com.scenari.m.bdp.facet. wraptransf.FacetWrapTransformerLoader"72 <module code="mmlOO" type="com.scenari.m.bdp.facet.chain.FacetChainLoader" 73 73 checkAutoMultiRes="true" 74 transformParams="transform=latex2mathml&omitXmlDeclaration=yes&compatibility=OO"> 74 sourceParams="transform=latex2mathml&omitXmlDeclaration=yes" 75 contentType="text/mathml"> 76 <!-- ### 77 # Modifications du MathML pour le rendre compatible OO 78 # --> 79 <transform params="transform=mathml2mathmlOO"/> 80 75 81 </module> 76 82 -
trunk/model/sources/math/latex/mathTexInline_od.odwidget
r1261 r1262 13 13 resultatAgent('//', concat( 14 14 'resUri:src=src:', java:hGetUri(srcFileAgent()), 15 '?transform=latex2mathml&amp; compatibility=OO&amp;omitXmlDeclaration=yes&amp;content=', java:java.net.URLEncoder.encode(java:replaceAll(string(resultatAgent('../../odContentZone_zMathTex')),"&amp;", "%26")), '&amp;transform=mml2odf',15 '?transform=latex2mathml&amp;omitXmlDeclaration=yes&amp;content=', java:java.net.URLEncoder.encode(java:replaceAll(string(resultatAgent('../../odContentZone_zMathTex')),"&amp;", "%26")), '&amp;transform=mathml2mathmlOO&amp;transform=mml2odf', 16 16 '&amp;;mutabledst=', resultatAgent('/@@/destPathBinaryTmp'), '/', resultatAgent('../../optimalOutFileName'), 17 17 '' 18 18 )) 19 </source> <!--;transform=facet&amp;facet=mml00&amp;fileExt=.odf&amp;transform=mml2odf-->19 </source> 20 20 </valeur> 21 21 </set> -
trunk/model/sources/math/latex/mathTexInline_web.uiwidget
r1261 r1262 18 18 19 19 <xsl:variable name="vIdNodePrefixMeta" select="getIdNode(.)"/> 20 <xsl:variable name="vUri" select="resultatAgent('//', concat('res:src=src:', java:hGetUri(srcFileAgent()), '?transform=latex2mathml&amp; compatibility=OO&amp;omitXmlDeclaration=yes&amp;content=', java:java.net.URLEncoder.encode(java:replaceAll(string($vArguments), '&amp;', '%26')), '&amp;fileExt=.swf&amp;transform=mml2swf'))"/>21 <xsl:variable name="vResUri" select="resultatAgent('//', concat('resUri:src=src:', java:hGetUri(srcFileAgent()), '?transform=latex2mathml&amp; compatibility=OO&amp;omitXmlDeclaration=yes&amp;content=', java:java.net.URLEncoder.encode(java:replaceAll(string($vArguments), '&amp;', '%26')), '&amp;fileExt=.swf&amp;transform=mml2swf'))"/>20 <xsl:variable name="vUri" select="resultatAgent('//', concat('res:src=src:', java:hGetUri(srcFileAgent()), '?transform=latex2mathml&amp;omitXmlDeclaration=yes&amp;content=', java:java.net.URLEncoder.encode(java:replaceAll(string($vArguments), '&amp;', '%26')), '&amp;fileExt=.swf&amp;transform=mathml2mathmlOO&amp;transform=mml2swf'))"/> 21 <xsl:variable name="vResUri" select="resultatAgent('//', concat('resUri:src=src:', java:hGetUri(srcFileAgent()), '?transform=latex2mathml&amp;omitXmlDeclaration=yes&amp;content=', java:java.net.URLEncoder.encode(java:replaceAll(string($vArguments), '&amp;', '%26')), '&amp;fileExt=.swf&amp;transform=mathml2mathmlOO&amp;transform=mml2swf'))"/> 22 22 23 <xsl:variable name="vResInfoObj" select="parseXml(resultatAgent('//', concat('get:src:', java:hGetUri(srcFileAgent()), '?transform=latex2mathml&amp; compatibility=OO&amp;omitXmlDeclaration=yes&amp;content=', java:java.net.URLEncoder.encode(java:replaceAll(string($vArguments), '&amp;', '%26')), '&amp;transform=mml2png&amp;fontSize=', $vFontSize,'&amp;transform=img2props')))"/><!-- NOTE : on part du PNG car OO ne rensigne pas correctement les infos de taille dans le SWF -->23 <xsl:variable name="vResInfoObj" select="parseXml(resultatAgent('//', concat('get:src:', java:hGetUri(srcFileAgent()), '?transform=latex2mathml&amp;omitXmlDeclaration=yes&amp;content=', java:java.net.URLEncoder.encode(java:replaceAll(string($vArguments), '&amp;', '%26')), '&amp;transform=mathml2mathmlOO&amp;transform=mml2png&amp;fontSize=', $vFontSize,'&amp;transform=img2props')))"/><!-- NOTE : on part du PNG car OO ne rensigne pas correctement les infos de taille dans le SWF --> 24 24 <xsl:variable name="vResWebSize" select="java:com.scenari.s.co.transform.img.ImgUtil.getSize($vResInfoObj/props/p[@cd='width'], $vResInfoObj/props/p[@cd='height'], '', '', '', $vMaxWidth, $vMaxHeight)"/> 25 25 -
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"/> -
trunk/model/sources/math/mml/getSwf.uiwidget
r1113 r1262 57 57 58 58 <xsl:variable name="vIdNodePrefixMeta" select="getIdNode(.)"/> 59 <xsl:variable name="vUri" select="resultatAgent('//', concat('res:src=src:', java:hGetUri(srcFileAgent()), '/', java:hGetName(srcFileAgent()), ';transform=facet&amp;facet=mml &amp;fileExt=.swf&amp;transform=mml2swf'))"/>60 <xsl:variable name="vResUri" select="resultatAgent('//', concat('resUri:src=src:', java:hGetUri(srcFileAgent()), '/', java:hGetName(srcFileAgent()), ';transform=facet&amp;facet=mml &amp;fileExt=.swf&amp;transform=mml2swf'))"/>61 <xsl:variable name="vResInfoObj" select="parseXml(resultatAgent('//', concat('get:src:', java:hGetUri(srcFileAgent()), '/', java:hGetName(srcFileAgent()), '?transform=facet&amp;facet=mml &amp;transform=mml2png&amp;fontSize=', $vFontSize,'&amp;transform=img2props')))"/><!-- NOTE : on part du PNG car OO ne rensigne pas correctement les infos de taille dans le SWF -->59 <xsl:variable name="vUri" select="resultatAgent('//', concat('res:src=src:', java:hGetUri(srcFileAgent()), '/', java:hGetName(srcFileAgent()), ';transform=facet&amp;facet=mmlOO&amp;fileExt=.swf&amp;transform=mml2swf'))"/> 60 <xsl:variable name="vResUri" select="resultatAgent('//', concat('resUri:src=src:', java:hGetUri(srcFileAgent()), '/', java:hGetName(srcFileAgent()), ';transform=facet&amp;facet=mmlOO&amp;fileExt=.swf&amp;transform=mml2swf'))"/> 61 <xsl:variable name="vResInfoObj" select="parseXml(resultatAgent('//', concat('get:src:', java:hGetUri(srcFileAgent()), '/', java:hGetName(srcFileAgent()), '?transform=facet&amp;facet=mmlOO&amp;transform=mml2png&amp;fontSize=', $vFontSize,'&amp;transform=img2props')))"/><!-- NOTE : on part du PNG car OO ne rensigne pas correctement les infos de taille dans le SWF --> 62 62 <xsl:variable name="vResWebSize" select="java:com.scenari.s.co.transform.img.ImgUtil.getSize($vResInfoObj/props/p[@cd='width'], $vResInfoObj/props/p[@cd='height'], '', '', '', $vMaxWidth, $vMaxHeight)"/> 63 63 <xsl:template match="*"> -
trunk/model/sources/math/mml/mml_od.transf
r1122 r1262 43 43 <sm:WObject style="viewResource"> 44 44 <sm:binaryUrl> 45 <sm:freeTransform code="facet" options="facet=mml &fileExt=.odf&transform=mml2odf"/>45 <sm:freeTransform code="facet" options="facet=mmlOO&fileExt=.odf&transform=mml2odf"/> 46 46 </sm:binaryUrl> 47 47 <sm:mime value="application/vnd.oasis.opendocument.formula"/> -
trunk/model/sources/math/mml/mml_od@inline.transf
r1122 r1262 44 44 <sm:WObject style="viewResource"> 45 45 <sm:binaryUrl> 46 <sm:freeTransform code="facet" options="facet=mml &fileExt=.odf&transform=mml2odf"/>46 <sm:freeTransform code="facet" options="facet=mmlOO&fileExt=.odf&transform=mml2odf"/> 47 47 </sm:binaryUrl> 48 48 <sm:mime value="application/vnd.oasis.opendocument.formula"/> -
trunk/model/sources/math/mml/mml_web.transf
r1113 r1262 11 11 <sm:binary outputType="image"> 12 12 <!--Si besoin : &backgroundColor=#003399&fontSize=40--> 13 <sm:freeTransform code="facet" options="facet=mml &fileExt=.png&transform=mml2png"/>13 <sm:freeTransform code="facet" options="facet=mmlOO&fileExt=.png&transform=mml2png"/> 14 14 </sm:binary> 15 15 <sm:when widthOver="600" heightOver="600"> … … 27 27 <sm:WFlash> 28 28 <sm:binaryUrl> 29 <sm:freeTransform code="facet" options="facet=mml &fileExt=.swf&transform=mml2swf"/>29 <sm:freeTransform code="facet" options="facet=mmlOO&fileExt=.swf&transform=mml2swf"/> 30 30 </sm:binaryUrl> 31 31 <sm:size maxWidth="900" maxHeight="700"/> -
trunk/model/sources/math/mml/mml_web@inline.transf
r1134 r1262 13 13 <sm:WImage> 14 14 <sm:binaryUrl> 15 <sm:freeTransform code="facet" options="facet=mml &fileExt=.png&transform=mml2png"/>15 <sm:freeTransform code="facet" options="facet=mmlOO&fileExt=.png&transform=mml2png"/> 16 16 </sm:binaryUrl> 17 17 <sm:size maxWidth="400" maxHeight="100"/> … … 24 24 <sm:WFlash> 25 25 <sm:binaryUrl> 26 <sm:freeTransform code="facet" options="facet=mml &fileExt=.swf&transform=mml2swf"/>26 <sm:freeTransform code="facet" options="facet=mmlOO&fileExt=.swf&transform=mml2swf"/> 27 27 </sm:binaryUrl> 28 28 <sm:size maxWidth="900" maxHeight="700"/>
Note: See TracChangeset
for help on using the changeset viewer.