mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-17 18:12:04 +01:00
added some precedence tests
This commit is contained in:
parent
2667963142
commit
72e8decc76
9 changed files with 67 additions and 3 deletions
|
@ -78,11 +78,11 @@ public:
|
|||
for(boost::ptr_vector<TopLevelParam>::const_iterator pi = params_.begin(), pe = params_.end(); pi != pe; ++pi)
|
||||
pi->declare(context);
|
||||
for(ItemStack::const_iterator isi = items_.begin(), ise = items_.end(); isi != ise; ++isi)
|
||||
{
|
||||
for(ItemList::const_iterator ci = isi->begin(), ce = isi->end(); ci != ce; ++ci)
|
||||
{
|
||||
(*ci)->execute(initialNode, context);
|
||||
context.pushVariablePrecendence();
|
||||
} // for ...
|
||||
context.pushVariablePrecendence();
|
||||
} // for ...
|
||||
context.freezeTopLevel();
|
||||
|
||||
// go!
|
||||
|
|
|
@ -160,5 +160,23 @@
|
|||
<input-file role="principal-stylesheet">VariableWithinVariable4.xsl</input-file>
|
||||
</scenario>
|
||||
</test-case>
|
||||
<test-case id="variables05">
|
||||
<file-path>variables</file-path>
|
||||
<purpose>import precedence</purpose>
|
||||
<scenario operation="standard">
|
||||
<input-file role="principal-data">foo.xml</input-file>
|
||||
<input-file role="principal-stylesheet">import_precedence.xsl</input-file>
|
||||
<output-file role="principal">import_precedence_result.xml</output-file>
|
||||
</scenario>
|
||||
</test-case>
|
||||
<test-case id="variables06">
|
||||
<file-path>variables</file-path>
|
||||
<purpose>import precedence</purpose>
|
||||
<scenario operation="standard">
|
||||
<input-file role="principal-data">foo.xml</input-file>
|
||||
<input-file role="principal-stylesheet">import_precedence2.xsl</input-file>
|
||||
<output-file role="principal">import_precedence2_result.xml</output-file>
|
||||
</scenario>
|
||||
</test-case>
|
||||
</test-catalog>
|
||||
</test-suite>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<e1>var(foo3)</e1>
|
|
@ -0,0 +1 @@
|
|||
<e1>var(foo)</e1>
|
1
tests/XSLT/testsuite/TESTS/arabica/variables/foo.xml
Normal file
1
tests/XSLT/testsuite/TESTS/arabica/variables/foo.xml
Normal file
|
@ -0,0 +1 @@
|
|||
<FOO/>
|
|
@ -0,0 +1,14 @@
|
|||
<xsl:stylesheet
|
||||
version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
>
|
||||
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:element name="e1"><xsl:value-of select="$foo"/></xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:variable name="foo" select="'var(foo)'"/>
|
||||
<xsl:include href="import_precedence_a.xsl"/>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,13 @@
|
|||
<xsl:stylesheet
|
||||
version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
>
|
||||
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:element name="e1"><xsl:value-of select="$foo"/></xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:include href="import_precedence_a.xsl"/>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,7 @@
|
|||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:foo="urn:bang" xmlns="urn:foo">
|
||||
|
||||
<xsl:import href="import_precedence_b.xsl"/>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:foo="urn:bang">
|
||||
|
||||
<!-- xmlns="urn:foo"> -->
|
||||
|
||||
<xsl:variable name="foo" select="'var(foo3)'"/>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
Loading…
Reference in a new issue