Reorganized xsl:override tests
authorMichael Kay <mike@saxonica.com>
Fri, 20 Mar 2015 14:13:04 +0000
changeset 840 e80670ae04c0
parent 839 fdaf817d5f75
child 841 b447add296e7
Reorganized xsl:override tests
tests/decl/override/override-as-001.xsl
tests/decl/override/override-as-002.xsl
tests/decl/override/override-as-003.xsl
tests/decl/override/override-as-004.xsl
tests/decl/override/override-as-005.xsl
tests/decl/override/override-base-as-001.xsl
tests/decl/override/override-base-f-001.xsl
tests/decl/override/override-base-misc-001.xsl
tests/decl/override/override-base-misc-002.xsl
tests/decl/override/override-base-t-001.xsl
tests/decl/override/override-base-v-001.xsl
tests/decl/override/override-f-001.xsl
tests/decl/override/override-f-002.xsl
tests/decl/override/override-f-003.xsl
tests/decl/override/override-f-004.xsl
tests/decl/override/override-f-005.xsl
tests/decl/override/override-f-006.xsl
tests/decl/override/override-f-007.xsl
tests/decl/override/override-f-008.xsl
tests/decl/override/override-f-009.xsl
tests/decl/override/override-f-010.xsl
tests/decl/override/override-f-011.xsl
tests/decl/override/override-f-012.xsl
tests/decl/override/override-f-013.xsl
tests/decl/override/override-f-014.xsl
tests/decl/override/override-f-015.xsl
tests/decl/override/override-f-016.xsl
tests/decl/override/override-f-017.xsl
tests/decl/override/override-f-018.xsl
tests/decl/override/override-misc-001.xsl
tests/decl/override/override-misc-002.xsl
tests/decl/override/override-misc-003.xsl
tests/decl/override/override-misc-004.xsl
tests/decl/override/override-misc-005.xsl
tests/decl/override/override-misc-006.xsl
tests/decl/override/override-misc-007.xsl
tests/decl/override/override-t-001.xsl
tests/decl/override/override-t-002.xsl
tests/decl/override/override-t-003.xsl
tests/decl/override/override-t-004.xsl
tests/decl/override/override-t-005.xsl
tests/decl/override/override-t-006.xsl
tests/decl/override/override-t-007.xsl
tests/decl/override/override-v-001.xsl
tests/decl/override/override-v-002.xsl
tests/decl/override/override-v-003.xsl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-as-001.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,41 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-301"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-301"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:attribute-set name="as-public" visibility="public">
+        <xsl:attribute name="pub1" select="'pub1o'"/>
+        <xsl:attribute name="pub2" select="'pub2o'"/>
+      </xsl:attribute-set>
+    
+      <xsl:attribute-set name="as-abstract" visibility="public">
+        <xsl:attribute name="abs1" select="'abs1o'"/>
+        <xsl:attribute name="abs2" select="'abs2o'"/>
+      </xsl:attribute-set>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+  
+   
+    <xsl:template name="main">
+      <out>
+        <x xsl:use-attribute-sets="as-public"/>
+        <y xsl:use-attribute-sets="as-abstract"/>
+        <z xsl:use-attribute-sets="as-final"/>
+      </out>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-as-002.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,41 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-301"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-301"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:attribute-set name="as-public" visibility="public" use-attribute-sets="xsl:original">
+        <xsl:attribute name="pub1" select="'pub1o'"/>
+        <xsl:attribute name="pub3" select="'pub3o'"/>
+      </xsl:attribute-set>
+    
+      <xsl:attribute-set name="as-abstract" visibility="public">
+        <xsl:attribute name="abs1" select="'abs1o'"/>
+        <xsl:attribute name="abs2" select="'abs2o'"/>
+      </xsl:attribute-set>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+  
+   
+    <xsl:template name="main">
+      <out>
+        <x xsl:use-attribute-sets="as-public"/>
+        <y xsl:use-attribute-sets="as-abstract"/>
+        <z xsl:use-attribute-sets="as-final"/>
+      </out>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-as-003.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,41 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-301"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-301"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:attribute-set name="as-base" visibility="public" use-attribute-sets="as-public">
+        <xsl:attribute name="pub1" select="'base1o'"/>
+        <xsl:attribute name="pub3" select="'base3o'"/>
+      </xsl:attribute-set>
+    
+      <xsl:attribute-set name="as-abstract" visibility="public">
+        <xsl:attribute name="abs1" select="'abs1o'"/>
+        <xsl:attribute name="abs2" select="'abs2o'"/>
+      </xsl:attribute-set>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+  
+   
+    <xsl:template name="main">
+      <out>
+        <x xsl:use-attribute-sets="as-public"/>
+        <y xsl:use-attribute-sets="as-abstract"/>
+        <z xsl:use-attribute-sets="as-final"/>
+      </out>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-as-004.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,41 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-301"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-301"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:attribute-set name="as-private">
+        <xsl:attribute name="priv8" select="'base1o'"/>
+        <xsl:attribute name="priv9" select="'base3o'"/>
+      </xsl:attribute-set>
+    
+      <xsl:attribute-set name="as-abstract" visibility="public">
+        <xsl:attribute name="abs1" select="'abs1o'"/>
+        <xsl:attribute name="abs2" select="'abs2o'"/>
+      </xsl:attribute-set>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+  
+   
+    <xsl:template name="main">
+      <out>
+        <x xsl:use-attribute-sets="as-public"/>
+        <y xsl:use-attribute-sets="as-abstract"/>
+        <z xsl:use-attribute-sets="as-final"/>
+      </out>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-as-005.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,38 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-301"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-301"
+    package-version="1.0.0">
+  
+    <xsl:override>
+    
+      <xsl:attribute-set name="as-abstract" visibility="public">
+        <xsl:attribute name="abs1" select="'abs1o'"/>
+        <xsl:attribute name="abs2" select="'abs2o'"/>
+      </xsl:attribute-set>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+  <xsl:attribute-set name="as-private">
+    <xsl:attribute name="priv8" select="'priv8'"/>
+    <xsl:attribute name="priv9" select="'priv9'"/>
+  </xsl:attribute-set>
+   
+    <xsl:template name="main">
+      <out>
+        <x xsl:use-attribute-sets="as-public"/>
+        <y xsl:use-attribute-sets="as-private"/>
+      </out>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-base-as-001.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,32 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-base-301"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+  
+  
+  
+  <xsl:attribute-set name="as-public" visibility="public" use-attribute-sets="as-private">
+    <xsl:attribute name="pub1" select="'pub1'"/>
+    <xsl:attribute name="pub2" select="'pub2'"/>
+  </xsl:attribute-set>
+    
+  <xsl:attribute-set name="as-private" visibility="private" use-attribute-sets="as-base">
+    <xsl:attribute name="priv1" select="'priv1'"/>
+  </xsl:attribute-set>
+    
+  <xsl:attribute-set name="as-final" visibility="final">
+    <xsl:attribute name="final1" select="'final1'"/>
+  </xsl:attribute-set>
+    
+  <xsl:attribute-set name="as-abstract" visibility="abstract" />
+    
+  <xsl:attribute-set name="as-base" visibility="public">
+    <xsl:attribute name="base1" select="'base1'"/>
+  </xsl:attribute-set>
+    
+  
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-base-f-001.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,43 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-base-001"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  
+  
+    <xsl:function name="p:f" as="xs:string" visibility="public">
+      <xsl:param name="in" as="xs:string"/>
+      <xsl:param name="count" as="xs:integer"/>
+      <xsl:sequence select="p:f-private($in, $count)"/>
+    </xsl:function>
+    
+    <xsl:function name="p:f-private" as="xs:string" visibility="private">
+      <xsl:param name="in" as="xs:string"/>
+      <xsl:param name="count" as="xs:integer"/>
+      <xsl:sequence select="string-join((1 to $count)!$in, '')"/>
+    </xsl:function>
+    
+    <xsl:function name="p:f-final" as="xs:string" visibility="final">
+      <xsl:param name="in" as="xs:string"/>
+      <xsl:param name="count" as="xs:integer"/>
+      <xsl:sequence select="p:f-private($in, $count)"/>
+    </xsl:function>
+    
+    <xsl:function name="p:f-abstract" as="xs:string" visibility="abstract" >
+      <xsl:param name="in" as="xs:string"/>
+      <xsl:param name="count" as="xs:integer"/>
+    </xsl:function>
+    
+    <xsl:variable name="p:final-var" select="p:f('+', 3)" visibility="final"/>
+    
+    <xsl:variable name="p:f-private-ref" select="p:f-private#2" visibility="public"/>
+    
+    <xsl:variable name="p:f-ref" select="p:f#2" visibility="public"/>
+    
+    <xsl:variable name="p:f-partial" select="p:f(?, 3)" visibility="public"/>
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-base-misc-001.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,32 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-base-901"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:key name="k" match="*" use="."/>
+  
+  <xsl:accumulator name="ac" initial-value="0">
+    <xsl:accumulator-rule match="*" new-value="$value+1"/>
+  </xsl:accumulator>
+  
+  <xsl:decimal-format name="d" grouping-separator="." decimal-separator=","/>
+  
+  <xsl:template name="k" visibility="public">
+    <b><xsl:copy-of select="key('k', 'x')"/></b>
+  </xsl:template>
+  
+  <xsl:template name="ac" visibility="public">
+    <b><xsl:value-of select="accumulator-after('ac')"/></b>
+  </xsl:template>
+  
+  <xsl:template name="d" visibility="public">
+    <b><xsl:value-of select="format-number(123456.78, '0.000,00', 'd')"/></b>
+  </xsl:template>
+  
+  
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-base-misc-002.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,25 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-base-misc-002"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-misc-002"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:key name="k" match="*" use="."/>
+  
+  <xsl:accumulator name="ac" initial-value="0" streamable="yes">
+    <xsl:accumulator-rule match="*" new-value="$value+1"/>
+  </xsl:accumulator>
+  
+  
+  <xsl:template name="use-base" visibility="public">
+    <xsl:stream href="../accumulator/books.xml" use-accumulators="ac">
+      <a><count nodes="{count(//*)}"/><acc value="{accumulator-after('ac')}"/></a>
+    </xsl:stream>  
+  </xsl:template>
+
+  
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-base-t-001.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,52 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-base-101"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-101"
+  exclude-result-prefixes="xs p">
+  
+  
+  
+    <xsl:template name="t" as="xs:string" visibility="public">
+      <xsl:param name="in" as="xs:string"/>
+      <xsl:param name="count" as="xs:integer"/>
+      <xsl:call-template name="t-private">
+         <xsl:with-param name="in" select="$in"/>
+         <xsl:with-param name="count" select="$count"/>
+      </xsl:call-template>
+    </xsl:template>
+    
+    <xsl:template name="t-private" as="xs:string" visibility="private">
+      <xsl:param name="in" as="xs:string"/>
+      <xsl:param name="count" as="xs:integer"/>
+      <xsl:sequence select="string-join((1 to $count)!$in, '')"/>
+    </xsl:template>
+    
+    <xsl:template name="t-final" as="xs:string" visibility="final">
+      <xsl:param name="in" as="xs:string"/>
+      <xsl:param name="count" as="xs:integer"/>
+      <xsl:call-template name="t-private">
+         <xsl:with-param name="in" select="$in"/>
+         <xsl:with-param name="count" select="$count"/>
+      </xsl:call-template>
+    </xsl:template>
+    
+    <xsl:template name="t-abstract" as="xs:string" visibility="abstract" >
+      <xsl:param name="in" as="xs:string"/>
+      <xsl:param name="count" as="xs:integer"/>
+    </xsl:template>
+    
+    <xsl:template name="u" as="xs:string" visibility="public">
+      <xsl:param name="in" as="xs:string"/>
+      <xsl:param name="count" as="xs:integer"/>
+      <xsl:call-template name="t">
+         <xsl:with-param name="in" select="$in"/>
+         <xsl:with-param name="count" select="$count"/>
+      </xsl:call-template>
+    </xsl:template>
+    
+  
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-base-v-001.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,23 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-base-201"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+  
+  
+  
+    <xsl:variable name="v-public" as="xs:integer" visibility="public" select="$v-private - 1"/>
+    
+    <xsl:variable name="v-private" as="xs:integer" visibility="private" select="$v-base"/>
+    
+    <xsl:variable name="v-final" as="xs:integer" visibility="final" select="3"/>
+    
+    <xsl:variable name="v-abstract" as="xs:integer" visibility="abstract" />
+    
+    <xsl:variable name="v-base" as="xs:integer" visibility="public" select="2"/>
+    
+  
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-001.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,43 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:function name="p:f" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'*' || p:f-final($in, $count) || '*'"/>
+      </xsl:function>
+    
+      <xsl:function name="p:f-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:function>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="p:f('x', 5) = '*xxxxx*'"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="{p:f('x', 5)}"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-002.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,36 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/use-package-004"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+    <xsl:override>
+      <xsl:function name="p:f" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="string-join((1 to $count)!$in, ',')"/>
+      </xsl:function>
+    </xsl:override>
+  </xsl:use-package>
+
+  
+ 
+  
+    <!-- Call public function defined in used package -->
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="p:f('x', 5) = 'x,x,x,x,x'"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="{p:f('x', 5)}"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-003.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,36 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-003"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+    <xsl:override>
+      <xsl:function name="p:f" as="xs:integer" visibility="public">
+        <xsl:param name="in" as="xs:integer"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="()"/>
+      </xsl:function>
+    </xsl:override>
+  </xsl:use-package>
+
+  
+ 
+  
+    <!-- Call public function defined in used package -->
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="p:f('5', 5) = 'xxxxx'"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="p:f('5', 5)"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-004.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,35 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-004"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/use-package-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+    <xsl:override>
+      <xsl:function name="p:fa" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="string-join((1 to $count)!$in, ',')"/>
+      </xsl:function>
+    </xsl:override>
+  </xsl:use-package>
+
+  
+  
+    <!-- Call public function defined in used package -->
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="p:f('x', 5) = 'xxxxx'"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="p:f('x', 5)"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-005.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,38 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-base-001"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <!-- disallow text as a child of xsl:override -->
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:function name="p:f" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'*' || p:f-final($in, $count) || '*'"/>
+      </xsl:function>
+    
+		Gotcha!
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+      <out/>
+    </xsl:template>
+    
+  
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-006.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,38 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-base-001"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <!-- disallow LRE as a child of xsl:override (even in a namespace) -->
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:function name="p:f" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'*' || p:f-final($in, $count) || '*'"/>
+      </xsl:function>
+    
+	  <p:out/>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+      <out/>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-007.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,38 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-base-001"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <!-- disallow xsl:override as a child of xsl:override  -->
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:function name="p:f" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'*' || p:f-final($in, $count) || '*'"/>
+      </xsl:function>
+    
+	  <xsl:override/>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+      <out/>
+    </xsl:template>
+    
+  
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-008.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,28 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-base-001"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <!-- empty xsl:override is OK  -->
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+  
+    <xsl:override/>
+    
+  </xsl:use-package>
+  
+  
+   
+    <xsl:template name="main">
+      <out/>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-009.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,48 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:function name="p:f" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'*' || p:f-final($in, $count) || '*'"/>
+      </xsl:function>
+    
+      <xsl:function name="p:f-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:function>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+  
+    <xsl:function name="p:local-function">
+      <xsl:param name="cond" as="xs:boolean"/>
+      <xsl:sequence select="if ($cond) then p:f('x', 5) else p:local-function(true())"/>
+    </xsl:function>
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="p:local-function(true()) = '*xxxxx*'"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="{p:local-function(true())}"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-010.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,45 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:function name="p:f" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'*' || p:f-final($in, $count) || '*'"/>
+      </xsl:function>
+    
+      <xsl:function name="p:f-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:function>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+  
+  
+    <xsl:variable name="v" select="p:f('x', 5)"/>
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="$v = '*xxxxx*'"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="{$v}"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-011.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,52 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:function name="p:f" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'*' || p:f-final($in, $count) || '*'"/>
+      </xsl:function>
+    
+      <xsl:function name="p:f-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:function>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+  
+  
+    <xsl:variable name="g"><a/></xsl:variable>
+    
+    <xsl:template match="a" as="xs:string">
+      <xsl:sequence select="p:f('x', 5)"/>
+    </xsl:template>  
+   
+    <xsl:template name="main">
+      <xsl:variable name="v" as="xs:string">
+        <xsl:apply-templates select="$g//a"/>
+      </xsl:variable>
+      <xsl:choose>
+        <xsl:when test="$v = '*xxxxx*'"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="{$v}"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-012.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,44 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:function name="p:f" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'*' || p:f-final($in, $count) || '*'"/>
+      </xsl:function>
+    
+      <xsl:function name="p:f-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:function>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+  
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="$p:final-var = '*+++*'"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="{$p:final-var}"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-013.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,45 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <!-- Use a function reference from a used package -->
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:function name="p:f" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'*' || p:f-final($in, $count) || '*'"/>
+      </xsl:function>
+    
+      <xsl:function name="p:f-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:function>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="$p:f-ref('x', 5) = '*xxxxx*'"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="{$p:f-ref('x', 5)}"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-014.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,45 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <!-- Use a function reference to a private function from a used package -->
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:function name="p:f" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'*' || p:f-final($in, $count) || '*'"/>
+      </xsl:function>
+    
+      <xsl:function name="p:f-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:function>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="$p:f-private-ref('x', 5) = 'xxxxx'"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="{$p:f-private-ref('x', 5)}"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-015.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,45 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <!-- Use a partial application of an overridden function -->
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:function name="p:f" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'*' || p:f-final($in, $count) || '*'"/>
+      </xsl:function>
+    
+      <xsl:function name="p:f-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:function>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="$p:f-partial('o') = '*ooo*'"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="{$p:f-partial('o')}"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-016.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,43 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:function name="p:f" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'*' || xsl:original($in, $count) || '*'"/>
+      </xsl:function>
+    
+      <xsl:function name="p:f-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:function>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="p:f('x', 5) = '*xxxxx*'"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="{p:f('x', 5)}"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-017.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,49 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:function name="p:f" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:variable name="orig" as="function(*)" select="xsl:original#2"/>
+        <xsl:sequence select="p:action($orig, $in, $count)"/>
+      </xsl:function>
+    
+      <xsl:function name="p:f-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:function>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+    <xsl:function name="p:action">
+      <xsl:param name="f" as="function(*)"/>
+      <xsl:param name="in" as="xs:string"/>
+      <xsl:param name="count" as="xs:integer"/>
+      <xsl:sequence select="'*' || $f($in, $count) || '*'"/>
+    </xsl:function>
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="p:f('x', 5) = '*xxxxx*'"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="{p:f('x', 5)}"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-f-018.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,48 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-001"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:function name="p:f" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:variable name="orig" as="function(*)" select="xsl:original(?, $count)"/>
+        <xsl:sequence select="p:action($orig, $in)"/>
+      </xsl:function>
+    
+      <xsl:function name="p:f-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:function>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+    <xsl:function name="p:action">
+      <xsl:param name="f" as="function(*)"/>
+      <xsl:param name="in" as="xs:string"/>
+      <xsl:sequence select="'*' || $f($in) || '*'"/>
+    </xsl:function>
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="p:f('x', 5) = '*xxxxx*'"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="{p:f('x', 5)}"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-misc-001.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,34 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:variable name="data"><e/><f/><g/></xsl:variable>
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-901"
+    package-version="1.0.0">
+    
+    <!-- Cannot override a key -->
+  
+    <xsl:override>
+  
+      <xsl:key name="k" match="comment()" use="."/>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+      <out><xsl:value-of select="$data/key('k', 23)"/></out>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-misc-002.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,36 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:variable name="data"><e/><f/><g/></xsl:variable>
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-901"
+    package-version="1.0.0">
+    
+    <!-- Cannot override an accumulator -->
+  
+    <xsl:override>
+  
+      <xsl:accumulator name="ac" initial-value="17">
+        <xsl:accumulator-rule match="x" new-value="$value * 2"/>
+      </xsl:accumulator>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+      <out><xsl:value-of select="$data/accumulator-after('ac')"/></out>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-misc-003.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,34 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:variable name="data"><e/><f/><g/></xsl:variable>
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-901"
+    package-version="1.0.0">
+    
+    <!-- Cannot override a decimal format -->
+  
+    <xsl:override>
+  
+      <xsl:decimal-format name="d" NaN="0"/>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+      <out><xsl:value-of select="format-number(17, '999', 'd')"/></out>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-misc-004.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,31 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:variable name="data"><e>x</e><x>y</x><g>z</g></xsl:variable>
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-901"
+    package-version="1.0.0"/>
+    
+  <!-- Keys in different packages can share the same name -->
+  
+  <xsl:key name="k" match="*" use="name()"/>
+   
+    <xsl:template name="main">
+      <out>
+        <a><xsl:copy-of select="$data/key('k', 'x')"/></a>
+        <xsl:for-each select="$data">
+          <xsl:call-template name="k"/>
+        </xsl:for-each>
+      </out>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-misc-005.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,33 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:variable name="data"><e>x</e><x>y</x><g>z</g></xsl:variable>
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-901"
+    package-version="1.0.0"/>
+    
+  <!-- Accumulators in different packages can share the same name -->
+  
+  <xsl:accumulator name="ac" initial-value="0">
+    <xsl:accumulator-rule match="*" new-value="$value - 1"></xsl:accumulator-rule>
+  </xsl:accumulator>
+   
+    <xsl:template name="main">
+      <xsl:for-each select="$data">
+        <out>
+          <a><xsl:copy-of select="accumulator-after('ac')"/></a>
+          <xsl:call-template name="ac"/>         
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-misc-006.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,31 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:variable name="data"><e>x</e><x>y</x><g>z</g></xsl:variable>
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-901"
+    package-version="1.0.0"/>
+    
+  <!-- Decimal formats in different packages can share the same name -->
+  
+  <xsl:decimal-format name="d" grouping-separator="!" decimal-separator=":"/>
+   
+    <xsl:template name="main">
+      <xsl:for-each select="$data">
+        <out>
+          <a><xsl:value-of select="format-number(123456.78, '0!000:00', 'd')"/></a>
+          <xsl:call-template name="d"/>         
+        </out>
+      </xsl:for-each>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-misc-007.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,36 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-001"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-misc-002"
+  exclude-result-prefixes="xs p">
+  
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-misc-002"
+    package-version="1.0.0"/>
+    
+  <!-- Streamed accumulators in different packages can share the same name -->
+  
+  <xsl:accumulator name="ac" initial-value="0" streamable="yes">
+    <xsl:accumulator-rule match="*" new-value="$value - 1"></xsl:accumulator-rule>
+  </xsl:accumulator>
+  
+  <xsl:template name="use-this" visibility="public">
+    <xsl:stream href="../accumulator/books.xml" use-accumulators="ac">
+      <b><count nodes="{count(//*)}"/><acc value="{accumulator-after('ac')}"/></b>
+    </xsl:stream>  
+  </xsl:template>
+   
+    <xsl:template name="main">
+        <out>
+          <xsl:call-template name="use-base"/>
+          <xsl:call-template name="use-this"/>
+        </out>   
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-t-001.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,52 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-101"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-101"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-101"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:template name="t" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:value-of>
+          <xsl:text>*</xsl:text>
+          <xsl:call-template name="t-final">
+            <xsl:with-param name="in" select="$in"/>
+            <xsl:with-param name="count" select="$count"/>
+          </xsl:call-template>
+          <xsl:text>*</xsl:text>
+        </xsl:value-of>
+      </xsl:template>
+    
+      <xsl:template name="t-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:template>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+    <out>
+      <xsl:call-template name="t">
+            <xsl:with-param name="in" select="'x'"/>
+            <xsl:with-param name="count" select="5"/>
+      </xsl:call-template>
+    </out>  
+    </xsl:template>
+    
+
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-t-002.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,54 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-101"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-101"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-101"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:template name="t" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:value-of>
+          <xsl:text>*</xsl:text>
+          <xsl:call-template name="t-final">
+            <xsl:with-param name="in" select="$in"/>
+            <xsl:with-param name="count" select="$count"/>
+          </xsl:call-template>
+          <xsl:text>*</xsl:text>
+        </xsl:value-of>
+      </xsl:template>
+    
+      <xsl:template name="t-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:template>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+  
+  
+    <!-- Demonstrate that the named template u in the base package is rebound to the declaration of t in this package -->
+   
+    <xsl:template name="main">
+    <out>
+      <xsl:call-template name="u">
+            <xsl:with-param name="in" select="'x'"/>
+            <xsl:with-param name="count" select="5"/>
+      </xsl:call-template>
+    </out>  
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-t-003.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,49 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-103"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-101"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-101"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:template name="t" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:value-of>
+          <xsl:text>*</xsl:text>
+          <xsl:call-template name="t-abstract">
+            <xsl:with-param name="in" select="$in"/>
+            <xsl:with-param name="count" select="$count"/>
+          </xsl:call-template>
+          <xsl:text>*</xsl:text>
+        </xsl:value-of>
+      </xsl:template>
+    
+
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+  
+  
+    <!-- Demonstrate that the named template u in the base package is rebound to the declaration of t in this package -->
+   
+    <xsl:template name="main">
+    <out>
+      <xsl:call-template name="u">
+            <xsl:with-param name="in" select="'x'"/>
+            <xsl:with-param name="count" select="5"/>
+      </xsl:call-template>
+    </out>  
+    </xsl:template>
+    
+  
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-t-004.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,54 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-101"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-101"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-101"
+    package-version="1.0.0">
+  
+    <xsl:override>
+    
+      <!-- illegal override, types do not match -->
+  
+      <xsl:template name="t" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:decimal"/>
+        <xsl:value-of>
+          <xsl:text>*</xsl:text>
+          <xsl:call-template name="t-final">
+            <xsl:with-param name="in" select="$in"/>
+            <xsl:with-param name="count" select="$count"/>
+          </xsl:call-template>
+          <xsl:text>*</xsl:text>
+        </xsl:value-of>
+      </xsl:template>
+    
+      <xsl:template name="t-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:template>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+    <out>
+      <xsl:call-template name="t">
+            <xsl:with-param name="in" select="'x'"/>
+            <xsl:with-param name="count" select="5"/>
+      </xsl:call-template>
+    </out>  
+    </xsl:template>
+    
+
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-t-005.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,55 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-101"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-101"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-101"
+    package-version="1.0.0">
+  
+    <xsl:override>
+    
+      <!-- illegal override, context item types do not match -->
+  
+      <xsl:template name="t" as="xs:string" visibility="public">
+        <xsl:context-item as="xs:anyURI"/>
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:value-of>
+          <xsl:text>*</xsl:text>
+          <xsl:call-template name="t-final">
+            <xsl:with-param name="in" select="$in"/>
+            <xsl:with-param name="count" select="$count"/>
+          </xsl:call-template>
+          <xsl:text>*</xsl:text>
+        </xsl:value-of>
+      </xsl:template>
+    
+      <xsl:template name="t-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:template>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+    <out>
+      <xsl:call-template name="t">
+            <xsl:with-param name="in" select="'x'"/>
+            <xsl:with-param name="count" select="5"/>
+      </xsl:call-template>
+    </out>  
+    </xsl:template>
+    
+
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-t-006.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,55 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-101"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-101"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-101"
+    package-version="1.0.0">
+  
+    <xsl:override>
+    
+      <!-- illegal override, context item use does not match -->
+  
+      <xsl:template name="t" as="xs:string" visibility="public">
+        <xsl:context-item use="absent"/>
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:value-of>
+          <xsl:text>*</xsl:text>
+          <xsl:call-template name="t-final">
+            <xsl:with-param name="in" select="$in"/>
+            <xsl:with-param name="count" select="$count"/>
+          </xsl:call-template>
+          <xsl:text>*</xsl:text>
+        </xsl:value-of>
+      </xsl:template>
+    
+      <xsl:template name="t-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:template>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+    <out>
+      <xsl:call-template name="t">
+            <xsl:with-param name="in" select="'x'"/>
+            <xsl:with-param name="count" select="5"/>
+      </xsl:call-template>
+    </out>  
+    </xsl:template>
+    
+
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-t-007.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,52 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-101"
+  package-version="1.0.0"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:p="http://www.w3.org/xslt30tests/override-base-101"
+  exclude-result-prefixes="xs p">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-101"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:template name="t" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:value-of>
+          <xsl:text>*</xsl:text>
+          <xsl:call-template name="xsl:original">
+            <xsl:with-param name="in" select="$in"/>
+            <xsl:with-param name="count" select="$count"/>
+          </xsl:call-template>
+          <xsl:text>*</xsl:text>
+        </xsl:value-of>
+      </xsl:template>
+    
+      <xsl:template name="t-abstract" as="xs:string" visibility="public">
+        <xsl:param name="in" as="xs:string"/>
+        <xsl:param name="count" as="xs:integer"/>
+        <xsl:sequence select="'abcd'"/>
+      </xsl:template>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+    <out>
+      <xsl:call-template name="t">
+            <xsl:with-param name="in" select="'x'"/>
+            <xsl:with-param name="count" select="5"/>
+      </xsl:call-template>
+    </out>  
+    </xsl:template>
+    
+
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-v-001.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,34 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-201"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-201"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:variable name="v-public" as="xs:integer" visibility="public" select="42"/>
+    
+      <xsl:variable name="v-abstract" as="xs:integer" visibility="public" select="93"/>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+  
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="$v-public = 42"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="{$v-public}"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-v-002.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,34 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-201"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-201"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:variable name="v-base" as="xs:integer" visibility="public" select="42"/>
+    
+      <xsl:variable name="v-abstract" as="xs:integer" visibility="public" select="93"/>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+ 
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="$v-public = 41"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="{$v-public}"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+  
+  
+</xsl:package>   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/decl/override/override-v-003.xsl	Fri Mar 20 14:13:04 2015 +0000
@@ -0,0 +1,34 @@
+<xsl:package 
+  name="http://www.w3.org/xslt30tests/override-201"
+  package-version="1.0.1"
+  version="3.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  exclude-result-prefixes="xs">
+  
+  <xsl:use-package
+    name="http://www.w3.org/xslt30tests/override-base-201"
+    package-version="1.0.0">
+  
+    <xsl:override>
+  
+      <xsl:variable name="v-public" as="xs:integer" visibility="public" select="xsl:original + 13"/>
+    
+      <xsl:variable name="v-abstract" as="xs:integer" visibility="public" select="93"/>
+      
+    </xsl:override>  
+    
+  </xsl:use-package>
+  
+  
+   
+    <xsl:template name="main">
+      <xsl:choose>
+        <xsl:when test="$v-public = 14"><ok/></xsl:when>
+        <xsl:otherwise><wrong value="{$v-public}"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
+    
+ 
+  
+</xsl:package>   
\ No newline at end of file