<?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet href="xxx.xsl" type="text/xsl" ?> <!DOCTYPE xml SYSTEM "https://loribel.com/toto.dtd">
<html> <body> <script type="text/javascript"> // chargement du fichier XML var xml = new ActiveXObject("Microsoft.XMLDOM") xml.async = false xml.load("toto.xml")
// chargement du fichier XSL var xsl = new ActiveXObject("Microsoft.XMLDOM") xsl.async = false xsl.load("toto.xsl")
// transformation en Html document.write(xml.transformNode(xsl)) </script> </body> </html>
<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" />
<xsl:template match="/"> <xsl:value-of select="aaa" /> <xsl:copy-of select="bbb" /> <xsl:apply-templates select="bbb" />
<xsl:value-of select="." /> <xsl:value-of select="aaa/text()" /> </xsl:template> </xsl:stylesheet>
<xsl:value-of select="$1 + $2"/> <xsl:value-of select="value1 - value2"/> <xsl:value-of select="value1 div value2"/> <xsl:value-of select="value1 * value2"/> <xsl:value-of select="value mod 3"/>
<xsl:template name="replace"> <xsl:param name="stringIn" /> <xsl:param name="charsIn" /> <xsl:param name="charsOut" /> <xsl:choose> <xsl:when test="contains($stringIn, $charsIn)"> <xsl:value-of select=" concat(substring-before($stringIn, $charsIn), $charsOut)"/> <xsl:call-template name="replaceCharsInString"> <xsl:with-param name="stringIn" select= "substring-after($stringIn, $charsIn)"/> <xsl:with-param name="charsIn" select="$charsIn"/> <xsl:with-param name="charsOut" select="$charsOut"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$stringIn"/> </xsl:otherwise> </xsl:choose> </xsl:template>