mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-18 22:26:32 +01:00
added some new tests concerning variable declarations inside variables
This commit is contained in:
parent
538fe00271
commit
01db7aad46
14 changed files with 141 additions and 4 deletions
|
@ -37,7 +37,7 @@ const char* msft_tests[] = { "AVTs", /*"AttributeSets",*/ "Attributes", "BVTs",
|
||||||
/*"Stylesheet", */ /*"Template",*/ /*"Text", */ /*"ValueOf",*/
|
/*"Stylesheet", */ /*"Template",*/ /*"Text", */ /*"ValueOf",*/
|
||||||
"Variables", "Whitespaces", "XSLTFunctions", 0 };
|
"Variables", "Whitespaces", "XSLTFunctions", 0 };
|
||||||
|
|
||||||
const char* arabica_tests[] = { "errors", "include", "processing-instruction", "stylesheet", 0 };
|
const char* arabica_tests[] = { "errors", "include", "processing-instruction", "stylesheet", "variables", 0 };
|
||||||
|
|
||||||
int main(int argc, const char* argv[])
|
int main(int argc, const char* argv[])
|
||||||
{
|
{
|
||||||
|
|
|
@ -126,5 +126,39 @@
|
||||||
<output-file role="principal">stylesheet03.out</output-file>
|
<output-file role="principal">stylesheet03.out</output-file>
|
||||||
</scenario>
|
</scenario>
|
||||||
</test-case>
|
</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>
|
||||||
|
<scenario operation="standard">
|
||||||
|
<input-file role="principal-data">VariableWithinVariable.xml</input-file>
|
||||||
|
<input-file role="principal-stylesheet">VariableWithinVariable.xsl</input-file>
|
||||||
|
<output-file role="principal">VariableWithinVariable_result.xml</output-file>
|
||||||
|
</scenario>
|
||||||
|
</test-case>
|
||||||
|
<test-case id="variables02">
|
||||||
|
<file-path>variables</file-path>
|
||||||
|
<purpose>Use xsl:variable within xsl:variable </purpose>
|
||||||
|
<scenario operation="execution-error">
|
||||||
|
<input-file role="principal-data">VariableWithinVariable2.xml</input-file>
|
||||||
|
<input-file role="principal-stylesheet">VariableWithinVariable2.xsl</input-file>
|
||||||
|
</scenario>
|
||||||
|
</test-case>
|
||||||
|
<test-case id="variables03">
|
||||||
|
<file-path>variables</file-path>
|
||||||
|
<purpose>Use xsl:variable within xsl:variable </purpose>
|
||||||
|
<scenario operation="standard">
|
||||||
|
<input-file role="principal-data">VariableWithinVariable3.xml</input-file>
|
||||||
|
<input-file role="principal-stylesheet">VariableWithinVariable3.xsl</input-file>
|
||||||
|
<output-file role="principal">VariableWithinVariable3_result.xml</output-file>
|
||||||
|
</scenario>
|
||||||
|
</test-case>
|
||||||
|
<test-case id="variables04">
|
||||||
|
<file-path>variables</file-path>
|
||||||
|
<purpose>Use xsl:variable within xsl:variable </purpose>
|
||||||
|
<scenario operation="execution-error">
|
||||||
|
<input-file role="principal-data">VariableWithinVariable4.xml</input-file>
|
||||||
|
<input-file role="principal-stylesheet">VariableWithinVariable4.xsl</input-file>
|
||||||
|
</scenario>
|
||||||
|
</test-case>
|
||||||
</test-catalog>
|
</test-catalog>
|
||||||
</test-suite>
|
</test-suite>
|
||||||
|
|
|
@ -630,7 +630,7 @@
|
||||||
<test-case id="Variables_PositionAndLastComparisonShouldBeEqual" compare="text"/>
|
<test-case id="Variables_PositionAndLastComparisonShouldBeEqual" compare="text"/>
|
||||||
<test-case id="Variables_SelectAttributeAndWhitespaceBetweenElement" compare="fragment"/>
|
<test-case id="Variables_SelectAttributeAndWhitespaceBetweenElement" compare="fragment"/>
|
||||||
<test-case id="Variables_UseDocumentFnToReturnRootNode" compare="text"/>
|
<test-case id="Variables_UseDocumentFnToReturnRootNode" compare="text"/>
|
||||||
<test-case id="Variables_VariableWithinVariable" compare="text"/>
|
<test-case id="Variables_VariableWithinVariable" skip="yes" reason="XML encoding in Windows-1251. Similar test in arabica tests."/>
|
||||||
<test-case id="Variables_xslt_variable_qname_test1" compare="fragment"/>
|
<test-case id="Variables_xslt_variable_qname_test1" compare="fragment"/>
|
||||||
<test-case id="Variables_xslt_variable_qname_test2" compare="fragment"/>
|
<test-case id="Variables_xslt_variable_qname_test2" compare="fragment"/>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<root>local from global</root>
|
|
@ -0,0 +1 @@
|
||||||
|
<root>local from global</root>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<book>
|
||||||
|
<author>Joseph Smith</author>
|
||||||
|
<title />
|
||||||
|
</book>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version='1.0'?>
|
||||||
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
|
||||||
|
<xsl:output method="xml" omit-xml-declaration="yes" indent="no" />
|
||||||
|
|
||||||
|
<xsl:variable name="foo" select="'global'"/>
|
||||||
|
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:variable name="foo">
|
||||||
|
<xsl:variable name="foo" select="concat('local from ', $foo)"/>
|
||||||
|
<xsl:value-of select="$foo"/>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<root>
|
||||||
|
<xsl:value-of select="$foo"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<book>
|
||||||
|
<author>Joseph Smith</author>
|
||||||
|
<title />
|
||||||
|
</book>
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version='1.0'?>
|
||||||
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
|
||||||
|
<xsl:output method="xml" omit-xml-declaration="yes" indent="no" />
|
||||||
|
|
||||||
|
<xsl:variable name="foo" select="'global'"/>
|
||||||
|
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:variable name="bar" select="'baz'"/>
|
||||||
|
<xsl:variable name="foo">
|
||||||
|
<xsl:variable name="bar" select="concat('local from ', $foo)"/>
|
||||||
|
<xsl:value-of select="$bar"/>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<root>
|
||||||
|
<xsl:value-of select="$foo"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<book>
|
||||||
|
<author>Joseph Smith</author>
|
||||||
|
<title />
|
||||||
|
</book>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version='1.0'?>
|
||||||
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
|
||||||
|
<xsl:output method="xml" omit-xml-declaration="yes" indent="no" />
|
||||||
|
|
||||||
|
<xsl:variable name="foo" select="'global'"/>
|
||||||
|
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:variable name="bar">
|
||||||
|
<xsl:variable name="foo" select="concat('local from ', $foo)"/>
|
||||||
|
<xsl:value-of select="$foo"/>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<root>
|
||||||
|
<xsl:value-of select="$bar"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<book>
|
||||||
|
<author>Joseph Smith</author>
|
||||||
|
<title />
|
||||||
|
</book>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version='1.0'?>
|
||||||
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
|
||||||
|
<xsl:output method="xml" omit-xml-declaration="yes" indent="no" />
|
||||||
|
|
||||||
|
<xsl:variable name="foo" select="'global'"/>
|
||||||
|
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:variable name="foo">
|
||||||
|
<xsl:variable name="bar" select="concat('local from ', $foo)"/>
|
||||||
|
<xsl:value-of select="$bar"/>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<root>
|
||||||
|
<xsl:value-of select="$foo"/>,<xsl:value-of select="$bar"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
|
@ -912,7 +912,7 @@
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="cl /TC /EP -D USE_MSXML ..\vs7\ArabicaConfig.S > ..\include\SAX\ArabicaConfig.hpp
"
|
CommandLine="cl /TC /EP -D USE_EXPAT ..\vs7\ArabicaConfig.S > ..\include\SAX\ArabicaConfig.hpp
"
|
||||||
Outputs="..\include\SAX\ArabicaConfig.hpp"
|
Outputs="..\include\SAX\ArabicaConfig.hpp"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
|
Loading…
Reference in a new issue