blue +0 red +0 this is a test processing instruction TransforMiiX Test cases, written by Keith Visco. named template processed with !
Error, undeclared parameters should be ignored!
TransforMiiX TransforMiiX Test Cases
Mozilla XSLT
TransforMiiX Test Cases

This document serves to test basic XSL expressions.

Testing xsl:variable and xsl:copy-of
Test: <xsl:copy-of select="$product-name"/>
Desired Result:TransforMiiX
Result:

Testing xsl:if
Test: <xsl:if test="x | y | z">true</xsl:if>
Desired Result: true
Result: true

Testing xsl:if
Test: <xsl:if test="true()">true</xsl:if>
Desired Result: true
Result: true

Testing xsl:if
Test: <xsl:if test="'a'='b'">a equals b</xsl:if>
<xsl:if test="'a'!='b'">a does not equal b</xsl:if>
Desired Result: a does not equal to b
Result: a equals b
a does not equal b

Testing xsl:if
Test: <xsl:if test="2+1-3"> 2+1-3 is true</xsl:if>
 <xsl:if test="not(2+1-3)"> not(2+1-3) is true</xsl:if>
Desired Result:not(2+1-3) is true
Result: 2+1-3 is true not(2+1-3) is true

Testing xsl:choose
Test:see source
Desired Result: true
Result: error - a true error - b false

Testing parent and ancestor ops
Test:see source
Desired Result: true
Result:true

Testing basic xsl:apply-templates
Test:<xsl:apply-templates/>
Desired Result:element x, element y, element z
Result:

Testing basic xsl:apply-templates with mode
Test:<xsl:apply-templates mode="mode-test"/>
Desired Result:x, y, z
Result:

Testing predicates
Test:see source
Desired Result: z
Result:

Testing predicates
Test:see source
Desired Result:
Result:

Named Template/Call Template

Test:<xsl:call-template name="named-template-test"/>
Desired Result:named template processed with default value!
Result:

Test: - passing arguments to named templates (see xsl source)
Desired Result:named template processed with passed value!
Result:

Attribute Value Templates and variables
Test:

    <xsl:variable name="color">red</xsl:variable>
    <FONT COLOR="{$color}">Red Text</FONT>
Desired Result: Red Text
Result: red Red Text


Axis Identifiers (these should work, I need more test cases though)
Test: <xsl:if test="descendant::z">true</xsl:if>
Desired Result: true
Result: true
Test: <xsl:if test="not(descendant-or-self::no-element)">true</xsl:if>
Desired Result: true
Result: true
Test: <xsl:value-of select="count(x/attribute::*)"/>
Desired Result: 1
Result:

Creating Elements with xsl:element and xsl:attribute
Test: <xsl:element name="FONT">
<xsl:attribute name="COLOR">blue</xsl:attribute>
Passed
</xsl:element>
Desired Result: Passed
Result: blue Passed
Using Attribute Sets
Test: <FONT xsl:use-attribute-sets="style1">
Passed
</FONT>
Desired Result: Passed
Result: Passed
Test: <xsl:element name="FONT" use-attribute-sets="style1 style2">
Passed
</xsl:element>
Desired Result: Passed
Result: Passed

Numbering (only simple numbering currently implemented)
Test: <xsl:number value="4"/>
Desired Result: 4
Result:
Test: see source
Desired Result: 1. x
1. y
1. z

Result: .

Additive Expressions
Test: <xsl:value-of select="70+4"/>
Desired Result: 74
Result:
Test: <xsl:value-of select="-70+4"/>
Desired Result: -66
Result:
Test: <xsl:value-of select="1900+70+8-4"/>
Desired Result: 1974
Result:
Test: <xsl:value-of select="(4+5)-(9+9)"/>
Desired Result: -9
Result:

Multiplicative Expressions
Test: <xsl:value-of select="7*4"/>
Desired Result: 28
Result:
Test: <xsl:value-of select="7mod 4"/>
Desired Result: 3
Result:
Test: <xsl:value-of select="7div 4"/>
Desired Result: 1.75
Result:
Test: <xsl:value-of select="7div 0"/>
Desired Result: Infinity
Result:
Test: <xsl:value-of select="0 div 0"/>
Desired Result: NaN
Result:
Test: <xsl:variable name="x" select="7*3"/>
<xsl:variable name="y" select="3"/>
<xsl:value-of select="$x div $y"/>
Desired Result: 7
Result:
Precedence tests
Test: <xsl:value-of select="2 mod 2 = 0"/>
Desired Result: true
Result:
Test: <xsl:value-of select="5 mod 2 < 5 and 2*6 >= 12"/>
Desired Result: true
Result:
Test: <xsl:value-of select="5 mod 2 < 5 and 2*6>12"/>
Desired Result: false
Result:
Test: <xsl:value-of select="4+5*3"/>
Desired Result: 19
Result:
Test: <xsl:value-of select="4+5*3+(6-4)*7"/>
Desired Result: 33
Result:
Automatic Result Type Conversion
Test: <xsl:value-of select="'747' + 8"/>
Desired Result: 755
Result:
element , , element (z):