working on attribute tests

This commit is contained in:
jez 2009-01-02 23:08:49 +00:00
parent 2877e7e9b7
commit c9b50e484e
6 changed files with 163 additions and 128 deletions

View file

@ -37,7 +37,8 @@ const char* msft_tests[] = { "AVTs", /*"AttributeSets",*/ "Attributes", "BVTs",
"Stylesheet", "Template", "Text", "Valueof",
"Variables", "Whitespaces", "XSLTFunctions", 0 };
const char* arabica_tests[] = { "errors", "include", "processing-instruction",
const char* arabica_tests[] = { "attributes",
"errors", "include", "processing-instruction",
"stylesheet", "text", "variables", 0 };
int main(int argc, const char* argv[])

View file

@ -1,131 +1,140 @@
<test-suite>
<test-catalog submitter="Arabica">
<creator>JezUK</creator>
<major-path>arabica</major-path>
<date>2007-11-20</date>
<test-case id="error01">
<file-path>errors</file-path>
<purpose>xsl:stylesheet within xsl:stylesheet should fail</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error01.xsl</input-file>
</scenario>
</test-case>
<test-case id="error02">
<file-path>errors</file-path>
<purpose>xsl:stylesheet within xsl:stylesheet should fail</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error02.xsl</input-file>
</scenario>
</test-case>
<test-case id="error03">
<file-path>errors</file-path>
<purpose>xsl:processing-instruction name cannot be 'xml'</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error03.xsl</input-file>
</scenario>
</test-case>
<test-case id="error04">
<file-path>errors</file-path>
<purpose>xsl:processing-instruction name cannot be 'xml'</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error04.xsl</input-file>
</scenario>
</test-case>
<test-case id="error05">
<file-path>errors</file-path>
<purpose>xsl:processing-instruction name cannot be 'xml'</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error05.xsl</input-file>
</scenario>
</test-case>
<test-case id="error06">
<file-path>errors</file-path>
<purpose>check qnames</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error06.xsl</input-file>
</scenario>
</test-case>
<test-case id="error07">
<file-path>errors</file-path>
<purpose>check qnames</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error07.xsl</input-file>
</scenario>
</test-case>
<test-case id="error08">
<file-path>errors</file-path>
<purpose>check qnames</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error08.xsl</input-file>
</scenario>
</test-case>
<test-case id="error09">
<file-path>errors</file-path>
<purpose>check qnames</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error09.xsl</input-file>
</scenario>
</test-case>
<test-case id="include01">
<file-path>include</file-path>
<scenario operation="standard">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">include01.xsl</input-file>
<output-file role="principal" compare="XML">include01.out</output-file>
</scenario>
</test-case>
<test-case id="include02">
<file-path>include</file-path>
<scenario operation="standard">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">include02.xsl</input-file>
<output-file role="principal" compare="XML">include02.out</output-file>
</scenario>
</test-case>
<test-case id="pi01">
<file-path>processing-instruction</file-path>
<scenario operation="standard">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">pi01.xsl</input-file>
<output-file role="principal" compare="XML">pi01.out</output-file>
</scenario>
</test-case>
<test-case id="stylesheet01">
<file-path>stylesheet</file-path>
<purpose>2.2 - the xsl:stylesheet element may contain any element not from the XSLT namespace, provided that the expanded-name of the element has a non-null namespace URI</purpose>
<scenario operation="standard">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">stylesheet01.xsl</input-file>
<output-file role="principal">stylesheet01.out</output-file>
</scenario>
</test-case>
<test-case id="stylesheet02">
<file-path>stylesheet</file-path>
<purpose>2.2 - the xsl:stylesheet element may contain any element not from the XSLT namespace, provided that the expanded-name of the element has a non-null namespace URI</purpose>
<scenario operation="standard">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">stylesheet02.xsl</input-file>
<output-file role="principal">stylesheet02.out</output-file>
</scenario>
</test-case>
<test-case id="stylesheet03">
<file-path>stylesheet</file-path>
<purpose>2.2 - the xsl:stylesheet element may contain any element not from the XSLT namespace, provided that the expanded-name of the element has a non-null namespace URI</purpose>
<scenario operation="standard">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">stylesheet03.xsl</input-file>
<output-file role="principal">stylesheet03.out</output-file>
</scenario>
</test-case>
<creator>JezUK</creator>
<major-path>arabica</major-path>
<date>2007-11-20</date>
<test-case id="attributes01">
<file-path>attributes</file-path>
<purpose/>
<scenario operation="standard">
<input-file role="principal-data">attributes01.xml</input-file>
<input-file role="principal-stylesheet">attributes01.xsl</input-file>
<output-file role="principal" compare="XML">attributes01.out</output-file>
</scenario>
</test-case>
<test-case id="error01">
<file-path>errors</file-path>
<purpose>xsl:stylesheet within xsl:stylesheet should fail</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error01.xsl</input-file>
</scenario>
</test-case>
<test-case id="error02">
<file-path>errors</file-path>
<purpose>xsl:stylesheet within xsl:stylesheet should fail</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error02.xsl</input-file>
</scenario>
</test-case>
<test-case id="error03">
<file-path>errors</file-path>
<purpose>xsl:processing-instruction name cannot be 'xml'</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error03.xsl</input-file>
</scenario>
</test-case>
<test-case id="error04">
<file-path>errors</file-path>
<purpose>xsl:processing-instruction name cannot be 'xml'</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error04.xsl</input-file>
</scenario>
</test-case>
<test-case id="error05">
<file-path>errors</file-path>
<purpose>xsl:processing-instruction name cannot be 'xml'</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error05.xsl</input-file>
</scenario>
</test-case>
<test-case id="error06">
<file-path>errors</file-path>
<purpose>check qnames</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error06.xsl</input-file>
</scenario>
</test-case>
<test-case id="error07">
<file-path>errors</file-path>
<purpose>check qnames</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error07.xsl</input-file>
</scenario>
</test-case>
<test-case id="error08">
<file-path>errors</file-path>
<purpose>check qnames</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error08.xsl</input-file>
</scenario>
</test-case>
<test-case id="error09">
<file-path>errors</file-path>
<purpose>check qnames</purpose>
<scenario operation="execution-error">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">error09.xsl</input-file>
</scenario>
</test-case>
<test-case id="include01">
<file-path>include</file-path>
<scenario operation="standard">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">include01.xsl</input-file>
<output-file role="principal" compare="XML">include01.out</output-file>
</scenario>
</test-case>
<test-case id="include02">
<file-path>include</file-path>
<scenario operation="standard">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">include02.xsl</input-file>
<output-file role="principal" compare="XML">include02.out</output-file>
</scenario>
</test-case>
<test-case id="pi01">
<file-path>processing-instruction</file-path>
<scenario operation="standard">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">pi01.xsl</input-file>
<output-file role="principal" compare="XML">pi01.out</output-file>
</scenario>
</test-case>
<test-case id="stylesheet01">
<file-path>stylesheet</file-path>
<purpose>2.2 - the xsl:stylesheet element may contain any element not from the XSLT namespace, provided that the expanded-name of the element has a non-null namespace URI</purpose>
<scenario operation="standard">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">stylesheet01.xsl</input-file>
<output-file role="principal">stylesheet01.out</output-file>
</scenario>
</test-case>
<test-case id="stylesheet02">
<file-path>stylesheet</file-path>
<purpose>2.2 - the xsl:stylesheet element may contain any element not from the XSLT namespace, provided that the expanded-name of the element has a non-null namespace URI</purpose>
<scenario operation="standard">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">stylesheet02.xsl</input-file>
<output-file role="principal">stylesheet02.out</output-file>
</scenario>
</test-case>
<test-case id="stylesheet03">
<file-path>stylesheet</file-path>
<purpose>2.2 - the xsl:stylesheet element may contain any element not from the XSLT namespace, provided that the expanded-name of the element has a non-null namespace URI</purpose>
<scenario operation="standard">
<input-file role="principal-data">data.xml</input-file>
<input-file role="principal-stylesheet">stylesheet03.xsl</input-file>
<output-file role="principal">stylesheet03.out</output-file>
</scenario>
</test-case>
<test-case id="variables01">
<file-path>variables</file-path>
<purpose>Use xsl:variable within xsl:variable with a variable of the same name. Also, a global variable exist (with the same name as well). Adapted from MS test case</purpose>

View file

@ -174,6 +174,7 @@
<test-case id="AVTs__77582" compare="fragment" reason="XML Fragment output"/>
<test-case id="AVTs__77599" compare="fragment" reason="XML Fragment output"/>
<test-case id="Attributes__78366" compiles="no" reason="Error case: empty namespace"/>
<test-case id="Attributes__78372" skip="yes" reason="Expected output includes newlines and tabs, but inconsistently escaped. Mangle escapes them all, as do Saxon, .NET, and Xalan (although Xalan uses decimal rather than hex numerical entities)."/>
<test-case id="Attributes__78382" compiles="no" reason="Haven't implemented embedded stylesheets yet"/>
<test-case id="Attributes__78386" compiles="no" reason="Haven't implemented embedded stylesheets yet"/>
<test-case id="Attributes__81430" compare="fragment" reason="XML Fragment output"/>
@ -215,9 +216,11 @@
<test-case id="Attributes__89442" compare="fragment"/>
<test-case id="Attributes__89459" compare="fragment"/>
<test-case id="Attributes__89466" compare="fragment"/>
<test-case id="Attributes_Attribute_UseXmlnsAsNamespaceForAttributeImplicitly" skip="yes" reason="Marked as execution error, but error is recovered at runtime. Mangle issues a diagnostic - other processors agree."/>
<test-case id="Attributes_Attribute_UseXmlnsNsAsNamespaceForAttribute" skip="yes" reason="Marked as execution error, but I believe this to be wrong. The .NET XSLT processor refuses, but everything else processes it without issue."/>
<test-case id="Attributes_Attribute_WhitespaceInUseAttributeSets" compiles="no" reason="Haven't implemented attribute-sets"/>
<test-case id="Attributes_EmptyStringInUseAttribSets" compiles="no" reason="Haven't implemented attribute-sets"/>
<test-case id="BVTs_bvt001" compare="fragment"/>
<test-case id="BVTs_bvt001" compare="fragment"/>
<test-case id="BVTs_bvt002" compiles="no" reason="Haven't implemented embedded stylesheets yet"/>
<test-case id="BVTs_bvt003" compiles="no" reason="Needs attribute sets"/>
<test-case id="BVTs_bvt004" compiles="no" reason="Haven't implemented embedded stylesheets yet"/>
@ -718,6 +721,7 @@
<test-case id="XSLTFunctions_Bug76054" compiles="no"/>
<test-case id="XSLTFunctions_Bug76984" runs="no"/>
<test-case id="attributes01" compare="text"/>
<test-case id="stylesheet01" compare="text"/>
<test-case id="stylesheet02" compare="text"/>

View file

@ -0,0 +1 @@
<cat auto-ns1:foobar="&#xA;&#x9;&#x9;dog&#xA;&#x9;" xmlns:auto-ns1="http://www.w3.org/2000/xmlns/"/>

View file

@ -0,0 +1,5 @@
<?xml version='1.0'?>
<root>
<food>Fruit</food>
<food>Vegetables</food>
</root>

View file

@ -0,0 +1,15 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
<xsl:output omit-xml-declaration='yes' encoding='utf-8' indent='no' />
<xsl:template match='/'>
<cat>
<xsl:attribute name="foobar" namespace="http://www.w3.org/2000/xmlns/">
dog
</xsl:attribute>
</cat>
</xsl:template>
</xsl:stylesheet>