Changes to fix bug 30139
authorMichael Kay <mike@saxonica.com>
Tue, 11 Jul 2017 12:38:21 +0100
changeset 1719 b50f6e67e87b
parent 1718 4e84e25cfbdc
child 1720 3678ab35f30d
Changes to fix bug 30139
tests/decl/accept/_accept-test-set.xml
tests/decl/accept/accept-040.xsl
tests/decl/accept/accept-041.xsl
tests/decl/accept/accept-042.xsl
tests/decl/accept/accept-043.xsl
tests/decl/accept/accept-044.xsl
tests/decl/accept/accept-045.xsl
tests/decl/accept/accept-046.xsl
tests/decl/accept/accept-047.xsl
tests/decl/accept/accept-C.xsl
tests/decl/override/override-f-002.xsl
tests/decl/override/override-f-008.xsl
--- a/tests/decl/accept/_accept-test-set.xml	Mon Jul 10 22:45:01 2017 +0100
+++ b/tests/decl/accept/_accept-test-set.xml	Tue Jul 11 12:38:21 2017 +0100
@@ -291,6 +291,7 @@
    <test-case name="accept-041c">
       <description>xsl:accept - must override an abstract function</description>
       <created by="Michael Kay" on="2015-11-02"/>
+      <modified by="Michael Kay" on="2017-07-11" change="change error condition: see bug 30142"/>
       <environment ref="accept-C"/>
       <test>
          <package file="accept-041.xsl" role="principal"/>
@@ -299,7 +300,8 @@
          <initial-template name="main"/>    
       </test>
       <result>
-         <error code="XTSE3080"/> 
+         <!--<error code="XTSE3080"/> -->
+         <error code="XTDE3052"/> 
       </result>
    </test-case>
    
@@ -347,6 +349,7 @@
    <test-case name="accept-043c">
       <description>xsl:accept - must override an abstract variable</description>
       <created by="Michael Kay" on="2015-11-02"/>
+      <modified by="Michael Kay" on="2017-07-11" change="change error condition: see bug 30142"/>
       <environment ref="accept-C"/>
       <test>
          <package file="accept-043.xsl" role="principal"/>
@@ -355,7 +358,8 @@
          <initial-template name="main"/>
       </test>
       <result>
-         <error code="XTSE3080"/> 
+         <!--<error code="XTSE3080"/> -->
+         <error code="XTDE3052"/>  
       </result>
    </test-case>
    
@@ -403,6 +407,7 @@
    <test-case name="accept-045c">
       <description>xsl:accept - must override an abstract named template</description>
       <created by="Michael Kay" on="2015-11-02"/>
+      <modified by="Michael Kay" on="2017-07-11" change="change error condition: see bug 30142"/>
       <environment ref="accept-C"/>
       <test>
          <package file="accept-045.xsl" role="principal"/>
@@ -411,7 +416,8 @@
          <initial-template name="main"/>
       </test>
       <result>
-         <error code="XTSE3080"/> 
+         <!--<error code="XTSE3080"/> -->
+         <error code="XTDE3052"/> 
       </result>
    </test-case>
    
@@ -467,7 +473,7 @@
          <initial-template name="main"/>
       </test>
       <result>
-         <error code="*"/> <!-- No error code defined in spec? -->
+         <error code="XTDE3052"/>
       </result>
    </test-case>
    
--- a/tests/decl/accept/accept-040.xsl	Mon Jul 10 22:45:01 2017 +0100
+++ b/tests/decl/accept/accept-040.xsl	Tue Jul 11 12:38:21 2017 +0100
@@ -25,7 +25,7 @@
       
     </xsl:override>
     
-    <xsl:accept component="function" names="C:f1" visibility="absent"/>
+    <xsl:accept component="function" names="C:f1" visibility="hidden"/>
   </xsl:use-package>  
   
   
--- a/tests/decl/accept/accept-041.xsl	Mon Jul 10 22:45:01 2017 +0100
+++ b/tests/decl/accept/accept-041.xsl	Tue Jul 11 12:38:21 2017 +0100
@@ -28,14 +28,14 @@
       
     </xsl:override>
     
-    <xsl:accept component="function" names="C:f1" visibility="absent" use-when="$accept"/>
+    <xsl:accept component="function" names="C:f1" visibility="hidden" use-when="$accept"/>
   </xsl:use-package>  
   
   
   <xsl:template name="main">
     <out xsl:use-attribute-sets="a1">
       <xsl:if test="$go">
-        <xsl:value-of select="C:f1('London')"/>
+        <xsl:value-of select="C:f1-proxy('London')"/>
       </xsl:if>
       <xsl:call-template name="t1">
         <xsl:with-param name="p1" select="string($v1)"/>
--- a/tests/decl/accept/accept-042.xsl	Mon Jul 10 22:45:01 2017 +0100
+++ b/tests/decl/accept/accept-042.xsl	Tue Jul 11 12:38:21 2017 +0100
@@ -29,7 +29,7 @@
       
     </xsl:override>
     
-    <xsl:accept component="variable" names="v1" visibility="absent"/>
+    <xsl:accept component="variable" names="v1" visibility="hidden"/>
   </xsl:use-package>  
   
   
--- a/tests/decl/accept/accept-043.xsl	Mon Jul 10 22:45:01 2017 +0100
+++ b/tests/decl/accept/accept-043.xsl	Tue Jul 11 12:38:21 2017 +0100
@@ -32,14 +32,14 @@
       
     </xsl:override>
     
-    <xsl:accept component="variable" names="v1" visibility="absent" use-when="$accept"/>
+    <xsl:accept component="variable" names="v1" visibility="hidden" use-when="$accept"/>
   </xsl:use-package>  
   
   
   <xsl:template name="main">
     <out xsl:use-attribute-sets="a1">
       <xsl:if test="$go">
-        <xsl:value-of select="$v1"/>
+        <xsl:value-of select="$v1-proxy"/>
       </xsl:if>
       <xsl:call-template name="t1">
         <xsl:with-param name="p1" select="string(C:f1('London'))"/>
--- a/tests/decl/accept/accept-044.xsl	Mon Jul 10 22:45:01 2017 +0100
+++ b/tests/decl/accept/accept-044.xsl	Tue Jul 11 12:38:21 2017 +0100
@@ -26,7 +26,7 @@
       
     </xsl:override>
     
-    <xsl:accept component="template" names="t1" visibility="absent"/>
+    <xsl:accept component="template" names="t1" visibility="hidden"/>
   </xsl:use-package>  
   
   
--- a/tests/decl/accept/accept-045.xsl	Mon Jul 10 22:45:01 2017 +0100
+++ b/tests/decl/accept/accept-045.xsl	Tue Jul 11 12:38:21 2017 +0100
@@ -29,14 +29,14 @@
       
     </xsl:override>
     
-    <xsl:accept component="template" names="t1" visibility="absent" use-when="$accept"/>
+    <xsl:accept component="template" names="t1" visibility="hidden" use-when="$accept"/>
   </xsl:use-package>  
   
   
   <xsl:template name="main">
     <out xsl:use-attribute-sets="a1">
       <xsl:if test="$go">
-        <xsl:call-template name="t1">
+        <xsl:call-template name="t1-proxy">
           <xsl:with-param name="p1" select="string(C:f1('London'))"/>
         </xsl:call-template>
       </xsl:if>
--- a/tests/decl/accept/accept-046.xsl	Mon Jul 10 22:45:01 2017 +0100
+++ b/tests/decl/accept/accept-046.xsl	Tue Jul 11 12:38:21 2017 +0100
@@ -27,7 +27,7 @@
       
     </xsl:override>
     
-    <xsl:accept component="attribute-set" names="a1" visibility="absent"/>
+    <xsl:accept component="attribute-set" names="a1" visibility="hidden"/>
   </xsl:use-package>  
   
   
--- a/tests/decl/accept/accept-047.xsl	Mon Jul 10 22:45:01 2017 +0100
+++ b/tests/decl/accept/accept-047.xsl	Tue Jul 11 12:38:21 2017 +0100
@@ -30,14 +30,14 @@
       
     </xsl:override>
     
-    <xsl:accept component="attribute-set" names="a1" visibility="absent" use-when="$accept"/>
+    <xsl:accept component="attribute-set" names="a1" visibility="hidden" use-when="$accept"/>
   </xsl:use-package>  
   
   
   <xsl:template name="main">
     <out>
       <xsl:if test="$go">
-        <in  xsl:use-attribute-sets="a1"/>
+        <in  xsl:use-attribute-sets="a1-proxy"/>
       </xsl:if>
       <xsl:call-template name="t1">
         <xsl:with-param name="p1" select="string(C:f1('London')) || $v1"/>
--- a/tests/decl/accept/accept-C.xsl	Mon Jul 10 22:45:01 2017 +0100
+++ b/tests/decl/accept/accept-C.xsl	Tue Jul 11 12:38:21 2017 +0100
@@ -8,16 +8,34 @@
 
 
   <xsl:variable name="v1" as="xs:integer" visibility="abstract"/>
+  
+  <xsl:variable name="v1-proxy" as="xs:integer" visibility="public" select="$v1"/>
 
   <xsl:template name="t1" as="xs:integer" visibility="abstract">
     <xsl:param name="p1" as="xs:string"/>
   </xsl:template>
+  
+  <xsl:template name="t1-proxy" as="xs:integer" visibility="public">
+    <xsl:param name="p1" as="xs:string"/>
+    <xsl:call-template name="t1">
+      <xsl:with-param name="p1" select="$p1"/>
+    </xsl:call-template>
+  </xsl:template>
 
   <xsl:attribute-set name="a1" visibility="abstract"/>
+  
+  <xsl:attribute-set name="a1-proxy" use-attribute-sets="a1" visibility="public"/>
 
   <xsl:function name="C:f1" as="xs:integer" visibility="abstract">
     <xsl:param name="p1" as="xs:string"/>
   </xsl:function>
+  
+  <xsl:function name="C:f1-proxy" as="xs:integer" visibility="public">
+    <xsl:param name="p1" as="xs:string"/>
+    <xsl:sequence select="C:f1($p1) + 1"/>
+  </xsl:function>
+  
+  
 
 
 </xsl:package>
--- a/tests/decl/override/override-f-002.xsl	Mon Jul 10 22:45:01 2017 +0100
+++ b/tests/decl/override/override-f-002.xsl	Tue Jul 11 12:38:21 2017 +0100
@@ -17,7 +17,7 @@
         <xsl:sequence select="string-join((1 to $count)!$in, ',')"/>
       </xsl:function>
     </xsl:override>
-    <xsl:accept component="function" names="*:f-abstract" visibility="absent"/>
+    <xsl:accept component="function" names="*:f-abstract" visibility="hidden"/>
   </xsl:use-package>
 
   
--- a/tests/decl/override/override-f-008.xsl	Mon Jul 10 22:45:01 2017 +0100
+++ b/tests/decl/override/override-f-008.xsl	Tue Jul 11 12:38:21 2017 +0100
@@ -14,7 +14,7 @@
     package-version="1.0.0">
   
     <xsl:override/>
-    <xsl:accept component="function" names="*:f-abstract" visibility="absent"/>
+    <xsl:accept component="function" names="*:f-abstract" visibility="hidden"/>
   </xsl:use-package>