| OLD | NEW |
| 1 Mozilla XSLT | 1 Mozilla XSLT |
| 2 TransforMiiX Test Cases | 2 TransforMiiX Test Cases |
| 3 This document serves to test basic XSL expressions. | 3 This document serves to test basic XSL expressions. |
| 4 | 4 |
| 5 Testing xsl:variable and xsl:copy-of | 5 Testing xsl:variable and xsl:copy-of |
| 6 Test: <xsl:copy-of select="$product-name"/> | 6 Test: <xsl:copy-of select="$product-name"/> |
| 7 Desired Result:TransforMiiX | 7 Desired Result:TransforMiiX |
| 8 Result: TransforMiiX | 8 Result: TransforMiiX |
| 9 | 9 |
| 10 Testing xsl:if | 10 Testing xsl:if |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 Result: named template processed with passed value! | 69 Result: named template processed with passed value! |
| 70 | 70 |
| 71 Attribute Value Templates and variables | 71 Attribute Value Templates and variables |
| 72 Test: | 72 Test: |
| 73 | 73 |
| 74 <xsl:variable name="color">red</xsl:variable> | 74 <xsl:variable name="color">red</xsl:variable> |
| 75 <FONT COLOR="{$color}">Red Text</FONT> | 75 <FONT COLOR="{$color}">Red Text</FONT> |
| 76 Desired Result:Red Text | 76 Desired Result:Red Text |
| 77 Result:Red Text | 77 Result:Red Text |
| 78 Axis Identifiers (these should work, I need more test cases though) | 78 Axis Identifiers (these should work, I need more test cases though) |
| 79 Test:» <xsl:if test="descendant::z">true</xsl:if> | 79 Test:» <xsl:if test="descendant::z">true</xsl:if> |
| 80 Desired Result: true | 80 Desired Result: true |
| 81 Result: true | 81 Result: true |
| 82 Test:» <xsl:if test="not(descendant-or-self::no-element)">true</xsl:if> | 82 Test:» <xsl:if test="not(descendant-or-self::no-element)">true</xsl:if> |
| 83 Desired Result: true | 83 Desired Result: true |
| 84 Result: true | 84 Result: true |
| 85 Test:» <xsl:value-of select="count(x/attribute::*)"/> | 85 Test:» <xsl:value-of select="count(x/attribute::*)"/> |
| 86 Desired Result: 1 | 86 Desired Result: 1 |
| 87 Result: 1 | 87 Result: 1 |
| 88 Creating Elements with xsl:element and xsl:attribute | 88 Creating Elements with xsl:element and xsl:attribute |
| 89 Test:» <xsl:element name="FONT"> | 89 Test:» <xsl:element name="FONT"> |
| 90 <xsl:attribute name="COLOR">blue</xsl:attribute> | 90 <xsl:attribute name="COLOR">blue</xsl:attribute> |
| 91 Passed | 91 Passed |
| 92 </xsl:element> | 92 </xsl:element> |
| 93 Desired Result: Passed | 93 Desired Result: Passed |
| 94 Result:» Passed | 94 Result:»Passed |
| 95 Using Attribute Sets | 95 Using Attribute Sets |
| 96 Test:» <FONT xsl:use-attribute-sets="style1"> | 96 Test:» <FONT xsl:use-attribute-sets="style1"> |
| 97 Passed | 97 Passed |
| 98 </FONT> | 98 </FONT> |
| 99 Desired Result: Passed | 99 Desired Result: Passed |
| 100 Result:» Passed | 100 Result:»Passed |
| 101 Test:» <xsl:element name="FONT" use-attribute-sets="style1 style2"> | 101 Test:» <xsl:element name="FONT" use-attribute-sets="style1 style2"> |
| 102 Passed | 102 Passed |
| 103 </xsl:element> | 103 </xsl:element> |
| 104 Desired Result: Passed | 104 Desired Result: Passed |
| 105 Result:» Passed | 105 Result:»Passed |
| 106 Numbering (only simple numbering currently implemented) | 106 Numbering (only simple numbering currently implemented) |
| 107 Test:» <xsl:number value="4"/> | 107 Test:» <xsl:number value="4"/> |
| 108 Desired Result: 4 | 108 Desired Result: 4 |
| 109 Result: 4 | 109 Result: 4 |
| 110 Test:» see source | 110 Test:» see source |
| 111 Desired Result:» 1. x | 111 Desired Result:»1. x |
| 112 1. y | 112 1. y |
| 113 1. z | 113 1. z |
| 114 Result: 1. x | 114 Result: 1. x |
| 115 1. y | 115 1. y |
| 116 1. z | 116 1. z |
| 117 Additive Expressions | 117 Additive Expressions |
| 118 Test:» <xsl:value-of select="70+4"/> | 118 Test:» <xsl:value-of select="70+4"/> |
| 119 Desired Result: 74 | 119 Desired Result: 74 |
| 120 Result: 74 | 120 Result: 74 |
| 121 Test:» <xsl:value-of select="-70+4"/> | 121 Test:» <xsl:value-of select="-70+4"/> |
| 122 Desired Result: -66 | 122 Desired Result: -66 |
| 123 Result: -66 | 123 Result: -66 |
| 124 Test:» <xsl:value-of select="1900+70+8-4"/> | 124 Test:» <xsl:value-of select="1900+70+8-4"/> |
| 125 Desired Result: 1974 | 125 Desired Result: 1974 |
| 126 Result: 1974 | 126 Result: 1974 |
| 127 Test:» <xsl:value-of select="(4+5)-(9+9)"/> | 127 Test:» <xsl:value-of select="(4+5)-(9+9)"/> |
| 128 Desired Result: -9 | 128 Desired Result: -9 |
| 129 Result: -9 | 129 Result: -9 |
| 130 Multiplicative Expressions | 130 Multiplicative Expressions |
| 131 Test:» <xsl:value-of select="7*4"/> | 131 Test:» <xsl:value-of select="7*4"/> |
| 132 Desired Result: 28 | 132 Desired Result: 28 |
| 133 Result: 28 | 133 Result: 28 |
| 134 Test:» <xsl:value-of select="7mod 4"/> | 134 Test:» <xsl:value-of select="7mod 4"/> |
| 135 Desired Result: 3 | 135 Desired Result: 3 |
| 136 Result: 3 | 136 Result: 3 |
| 137 Test:» <xsl:value-of select="7div 4"/> | 137 Test:» <xsl:value-of select="7div 4"/> |
| 138 Desired Result: 1.75 | 138 Desired Result: 1.75 |
| 139 Result: 1.75 | 139 Result: 1.75 |
| 140 Test:» <xsl:value-of select="7div 0"/> | 140 Test:» <xsl:value-of select="7div 0"/> |
| 141 Desired Result: Infinity | 141 Desired Result: Infinity |
| 142 Result: Infinity | 142 Result: Infinity |
| 143 Test:» <xsl:value-of select="0 div 0"/> | 143 Test:» <xsl:value-of select="0 div 0"/> |
| 144 Desired Result: NaN | 144 Desired Result: NaN |
| 145 Result: NaN | 145 Result: NaN |
| 146 Test:» <xsl:variable name="x" select="7*3"/> | 146 Test:» <xsl:variable name="x" select="7*3"/> |
| 147 <xsl:variable name="y" select="3"/> | 147 <xsl:variable name="y" select="3"/> |
| 148 <xsl:value-of select="$x div $y"/> | 148 <xsl:value-of select="$x div $y"/> |
| 149 Desired Result: 7 | 149 Desired Result: 7 |
| 150 Result: 7 | 150 Result: 7 |
| 151 Precedence tests | 151 Precedence tests |
| 152 Test:» <xsl:value-of select="2 mod 2 = 0"/> | 152 Test:» <xsl:value-of select="2 mod 2 = 0"/> |
| 153 Desired Result: true | 153 Desired Result: true |
| 154 Result: true | 154 Result: true |
| 155 Test:» <xsl:value-of select="5 mod 2 < 5 and 2*6 >= 12"/> | 155 Test:» <xsl:value-of select="5 mod 2 < 5 and 2*6 >= 12"/> |
| 156 Desired Result: true | 156 Desired Result: true |
| 157 Result: true | 157 Result: true |
| 158 Test:» <xsl:value-of select="5 mod 2 < 5 and 2*6>12"/> | 158 Test:» <xsl:value-of select="5 mod 2 < 5 and 2*6>12"/> |
| 159 Desired Result: false | 159 Desired Result: false |
| 160 Result: false | 160 Result: false |
| 161 Test:» <xsl:value-of select="4+5*3"/> | 161 Test:» <xsl:value-of select="4+5*3"/> |
| 162 Desired Result: 19 | 162 Desired Result: 19 |
| 163 Result: 19 | 163 Result: 19 |
| 164 Test:» <xsl:value-of select="4+5*3+(6-4)*7"/> | 164 Test:» <xsl:value-of select="4+5*3+(6-4)*7"/> |
| 165 Desired Result: 33 | 165 Desired Result: 33 |
| 166 Result: 33 | 166 Result: 33 |
| 167 Automatic Result Type Conversion | 167 Automatic Result Type Conversion |
| 168 Test:» <xsl:value-of select="'747' + 8"/> | 168 Test:» <xsl:value-of select="'747' + 8"/> |
| 169 Desired Result: 755 | 169 Desired Result: 755 |
| 170 Result: 755 | 170 Result: 755 |
| OLD | NEW |