Commit merge
authorMichael Kay <mike@saxonica.com>
Fri, 27 Mar 2015 18:38:06 +0000
changeset 876 0dfe91273c8e
parent 875 d0a9b0ea5982 (current diff)
parent 872 bab5cac0fdae (diff)
child 878 a54b15456b03
Commit merge
catalog.xml
tests/attr/use-when/_use-when-test-set.xml
tests/attr/use-when/use-when-0127.xsl
--- a/catalog.xml	Fri Mar 27 17:47:17 2015 +0000
+++ b/catalog.xml	Fri Mar 27 18:38:06 2015 +0000
@@ -11,6 +11,7 @@
       <test-set name="mode" file="tests/attr/mode/_mode-test-set.xml"/>
       <test-set name="select" file="tests/attr/select/_select-test-set.xml"/>
       <test-set name="shadow" file="tests/attr/shadow/_shadow-test-set.xml"/>
+      <test-set name="static" file="tests/attr/static/_static-test-set.xml"/>
       <test-set name="streamable" file="tests/attr/streamable/_streamable-test-set.xml"/>
       <test-set name="strip-type-annotations" file="tests/attr/strip-type-annotations/_strip-type-annotations-test-set.xml"/>
       <test-set name="tunnel" file="tests/attr/tunnel/_tunnel-test-set.xml"/>
--- a/tests/attr/mode/_mode-test-set.xml	Fri Mar 27 17:47:17 2015 +0000
+++ b/tests/attr/mode/_mode-test-set.xml	Fri Mar 27 18:38:06 2015 +0000
@@ -1361,6 +1361,7 @@
       <description>Test xsl:mode on-no-match=fail, failure occurs but is caught; streaming</description>
       <keywords>xsl:mode on-no-match-attribute streamable fail xsl:try xsl:catch XTDE0555</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Abel Braaksma" on="2015-03-23"/>
       <environment ref="mode-14s"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -1370,7 +1371,7 @@
          <stylesheet file="mode-1426.xsl"/>
       </test>
       <result>
-         <error code="SXST0060"/>
+         <assert>count(/book/chapter/v/c[. = 'error XTDE055 caught']) = 56</assert>
       </result>
    </test-case>
 
--- a/tests/attr/mode/mode-1426.xsl	Fri Mar 27 17:47:17 2015 +0000
+++ b/tests/attr/mode/mode-1426.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -1,37 +1,39 @@
 <?xml version="1.0"?> 
 
 <!-- mode-onnomatch016s -->
-<!-- Michael Kay -->
-<!-- on-no-match=fail, failure case, with streaming; the error is caught, or would be if it were allowed when streaming --> 
+<!-- Michael Kay / mod. by ABr-->
+<!-- on-no-match=fail, failure case, with streaming; the error is caught, and reported back with a motionless construct --> 
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
-  xmlns:xs="http://www.w3.org/2001/XMLSchema"
-  exclude-result-prefixes="xs">
+    xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
 
-  <xsl:mode on-no-match="fail" streamable="yes"/>
-  
-  <xsl:template match="/">
-    <xsl:apply-templates/>
-  </xsl:template>
-  
-  <xsl:template match="*">
-    <xsl:copy><xsl:apply-templates/></xsl:copy>
-  </xsl:template>
-  
-  <xsl:template match="text()[not(parent::v)]">
-    <xsl:value-of select="."/>
-  </xsl:template>
-  
-  <xsl:template match="v">
-    <xsl:copy>
-      <xsl:try>
-        <xsl:apply-templates/>
-        <xsl:catch errors="err:XTDE0555" xmlns:err="http://www.w3.org/2005/xqt-errors" exclude-result-prefixes="err">
-          <z><xsl:value-of select="."/></z>
-        </xsl:catch>
-      </xsl:try>
-    </xsl:copy>
-  </xsl:template>
-  
-    
-</xsl:stylesheet>
\ No newline at end of file
+    <xsl:mode on-no-match="fail" streamable="yes" />
+
+    <xsl:template match="/">
+        <xsl:apply-templates />
+    </xsl:template>
+
+    <xsl:template match="*">
+        <xsl:copy>
+            <xsl:apply-templates />
+        </xsl:copy>
+    </xsl:template>
+
+    <xsl:template match="text()[not(parent::v)]">
+        <xsl:value-of select="." />
+    </xsl:template>
+
+    <xsl:template match="v">
+        <xsl:copy>
+            <xsl:try>
+                <xsl:apply-templates />
+                <xsl:catch errors="err:XTDE0555" xmlns:err="http://www.w3.org/2005/xqt-errors"
+                    exclude-result-prefixes="err">
+                    <c>error XTDE055 caught</c>
+                </xsl:catch>
+            </xsl:try>
+        </xsl:copy>
+    </xsl:template>
+
+
+</xsl:stylesheet>
--- a/tests/attr/select/_select-test-set.xml	Fri Mar 27 17:47:17 2015 +0000
+++ b/tests/attr/select/_select-test-set.xml	Fri Mar 27 18:38:06 2015 +0000
@@ -2787,6 +2787,7 @@
    <test-case name="select-6101">
       <description>Test that entity does not cause splitting of one text node into many. With this output encoding, should get one byte of xE9 for the &amp;eacute</description>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Abel Braaksma" on="2015-03-23" change="The test tests the serialization of entities, changed it to use the new assert-serialization (and fixed line-ends, hope Hg treats them well)"/>
       <environment ref="select-61"/>
       <dependencies>
          <spec value="XSLT10+"/>
@@ -2795,7 +2796,7 @@
          <stylesheet file="select-6101.xsl"/>
       </test>
       <result>
-         <assert-xml file="select-6101.out"/>
+         <assert-serialization file="select-6101.out"/>
       </result>
    </test-case>
 
--- a/tests/attr/select/select-6101.out	Fri Mar 27 17:47:17 2015 +0000
+++ b/tests/attr/select/select-6101.out	Fri Mar 27 18:38:06 2015 +0000
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="ISO-8859-1"?><out>
-<e>1. adresse1 </e><e>2. AFTER</e>
-<e>1. adéresse2 </e><e>2. after</e>
-<e>1. adresse3 </e>
-<e>1. BEFORE </e><e>2. adresse4</e>
+<?xml version="1.0" encoding="ISO-8859-1"?><out>
+<e>1. adresse1 </e><e>2. AFTER</e>
+<e>1. adéresse2 </e><e>2. after</e>
+<e>1. adresse3 </e>
+<e>1. BEFORE </e><e>2. adresse4</e>
 <e>1. before </e><e>2. adéresse5</e></out>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/static/_static-test-set.xml	Fri Mar 27 18:38:06 2015 +0000
@@ -0,0 +1,418 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<test-set xmlns="http://www.w3.org/2012/10/xslt-test-catalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="static">
+   <description>Tests static attributes on xsl:variable and xsl:param declarations</description>
+   <environment name="static-1">
+      <source role=".">
+         <content><![CDATA[<doc/>]]></content>
+      </source>
+   </environment>
+
+
+   <test-case name="static-001">
+      <description>
+         Tests static attribute on xsl:param and dynamic ctx usage in a TVT
+      </description>
+      <keywords>static-variable tvt</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-001.xsl"/>
+      </test>
+      <result>
+         <assert-string-value normalize-space="true">success</assert-string-value>
+      </result>
+   </test-case>
+   
+   <test-case name="static-001a">
+      <description>
+         Tests setting a static attr to a value from the calling processor, and its usage in a TVT
+      </description>
+      <keywords>static-variable tvt</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-001.xsl"/>
+         <param name="static-param" static="yes" select="'Hello World'"/>
+      </test>
+      <result>
+         <assert-string-value normalize-space="true">Hello World</assert-string-value>
+      </result>
+   </test-case>
+   
+   <test-case name="static-002">
+      <description>
+         Using a static param in another static param
+      </description>
+      <keywords>static-variable tvt</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-002.xsl"/>
+      </test>
+      <result>
+         <assert-string-value normalize-space="true">successSUCCESS</assert-string-value>
+      </result>
+   </test-case>
+   
+   <test-case name="static-002a">
+      <description>
+         Using a static param in another static param, set base value from the calling processor
+      </description>
+      <keywords>static-variable tvt</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-002.xsl"/>
+         <param name="static-param" static="yes" select="'ohgoodie'" />
+      </test>
+      <result>
+         <assert-string-value normalize-space="true">ohgoodieOHGOODIE</assert-string-value>
+      </result>
+   </test-case>
+   
+   <test-case name="static-002b">
+      <description>
+         Using a static param in another static param, set overridden value from the calling processor
+      </description>
+      <keywords>static-variable tvt</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-002.xsl"/>
+         <param name="alt-param" static="yes" select="'ohgoodie'" />
+      </test>
+      <result>
+         <assert-string-value normalize-space="true">successOHGOODIE</assert-string-value>
+      </result>
+   </test-case>
+   
+   <test-case name="static-003">
+      <description>
+         Using a static param in another static param, but in the wrong stylesheet declaration order: ERROR scenario
+      </description>
+      <keywords>static-variable tvt err:XPST0008</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-003.xsl"/>
+      </test>
+      <result>
+         <error code="XPST0008"/>
+      </result>
+   </test-case>
+   
+   <test-case name="static-003a">
+      <description>
+         Using a static param in another static param, but in the wrong stylesheet declaration order
+         After setting the value from the calling processor, it is not an error anymore.
+      </description>
+      <keywords>static-variable tvt err:XPST0008</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-003.xsl"/>
+         <param name="alt-param" static="yes" select="' in a better world'" />
+      </test>
+      <result>
+         <assert-string-value normalize-space="true">success in a better world</assert-string-value>
+      </result>
+   </test-case>
+   
+   <test-case name="static-004">
+      <description>
+         Simple test with a required static param
+      </description>
+      <keywords>static-variable required-param tvt</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-004.xsl"/>
+         <param name="req-param" static="yes" select="'required'" />
+      </test>
+      <result>
+         <assert-string-value normalize-space="true">required-required</assert-string-value>
+      </result>
+   </test-case>
+   
+   <test-case name="static-004a">
+      <description>
+         Simple test with a required static param, no value given, ERROR scenario
+      </description>
+      <keywords>static-variable required-param tvt err:XTSE0050</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-004.xsl"/>
+         <param name="req-param" static="yes" select="'required'" />
+      </test>
+      <result>
+         <error code="XTDE0050"/>
+      </result>
+   </test-case>
+   
+   <test-case name="static-005">
+      <description>
+         Simple test with a required static param, select-attribute present, ERROR scenario
+      </description>
+      <keywords>static-variable required-param tvt err:XTSE0010</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-005.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0010"/>
+      </result>
+   </test-case>
+   
+   <test-case name="static-005a">
+      <description>
+         Simple test with a required static param, select-attribute present, ERROR scenario (even when param value is supplied)
+      </description>
+      <keywords>static-variable required-param tvt err:XTSE0010</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-005.xsl"/>
+         <param name="req-param" static="yes" select="'this will not work'" />
+      </test>
+      <result>
+         <error code="XTSE0010"/>
+      </result>
+   </test-case>
+   
+   <test-case name="static-006">
+      <description>
+         Simple test with a required static param, seqtor is non-empty, ERROR scenario
+      </description>
+      <keywords>static-variable required-param tvt err:XTSE0010</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-006.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0010"/>
+      </result>
+   </test-case>
+   
+   <test-case name="static-006a">
+      <description>
+         Simple test with a required static param, seqtor is non-empty, ERROR scenario (even when a value is supplied)
+      </description>
+      <keywords>static-variable required-param tvt err:XTSE0010</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-006.xsl"/>
+         <param name="req-param" static="yes" select="'this will not work'" />
+      </test>
+      <result>
+         <error code="XTSE0010"/>
+      </result>
+   </test-case>
+   
+   <test-case name="static-007">
+      <description>
+         Simple test with a static param, seqtor is non-empty, ERROR scenario
+      </description>
+      <keywords>static-variable required-param tvt err:XTSE0010</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-007.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0010"/>
+      </result>
+   </test-case>
+   
+   <test-case name="static-007a">
+      <description>
+         Simple test with a static param, seqtor is non-empty, ERROR scenario (even when a value is supplied)
+      </description>
+      <keywords>static-variable required-param tvt err:XTSE0010</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-007.xsl"/>
+         <param name="static-param" static="yes" select="'this will not work'" />
+      </test>
+      <result>
+         <error code="XTSE0010"/>
+      </result>
+   </test-case>
+   
+   <test-case name="static-008">
+      <description>
+         Simple test with a static param, no select attr, no as attr, which is allowed and defaults to empty string
+      </description>
+      <keywords>static-variable tvt</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-008.xsl"/>
+      </test>
+      <result>
+         <assert-string-value normalize-space="true">false--true</assert-string-value>
+      </result>
+   </test-case>
+   
+   <test-case name="static-008a">
+      <description>
+         Simple test with a static param, no select attr, no as attr, which is allowed, and is set by the processor
+      </description>
+      <keywords>static-variable tvt</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-008.xsl"/>
+         <param name="static-param" static="yes" select="'not so empty anymore'" />
+      </test>
+      <result>
+         <assert-string-value normalize-space="true">false-NOT SO EMPTY ANYMORE-true</assert-string-value>
+      </result>
+   </test-case>
+   
+   <test-case name="static-009">
+      <description>
+         Simple test with static param with implicit default value of item()*, no select attr, value NOT set from calling processor, defaults to empty seq
+      </description>
+      <keywords>static-variable tvt implicit-default item occurrence-indicator</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-009.xsl"/>
+      </test>
+      <result>
+         <assert-string-value normalize-space="true">true--false</assert-string-value>
+      </result>
+   </test-case>
+   
+   <test-case name="static-009a">
+      <description>
+         Simple test with static param with implicit default value of item()*, no select attr, value set from calling processor
+      </description>
+      <keywords>static-variable tvt implicit-default item occurrence-indicator</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-009.xsl"/>
+         <param name="static-param" static="yes" as="item()*" select="23" />
+      </test>
+      <result>
+         <assert-string-value normalize-space="true">false-230-false</assert-string-value>
+      </result>
+   </test-case>
+   
+   <test-case name="static-010">
+      <description>
+         Simple test with static param with implicit default value of xs:integer?, no select attr, value NOT set from calling processor, defaults to empty seq
+      </description>
+      <keywords>static-variable tvt implicit-default xs:integer occurrence-indicator</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-010.xsl"/>
+      </test>
+      <result>
+         <assert-string-value normalize-space="true">true--false</assert-string-value>
+      </result>
+   </test-case>
+   
+   <test-case name="static-010a">
+      <description>
+         Simple test with static param with implicit default value of xs:integer?, no select attr, value set from calling processor
+      </description>
+      <keywords>static-variable tvt implicit-default xs:integer occurrence-indicator</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-010.xsl"/>
+         <param name="static-param" static="yes" as="xs:integer" select="23" />
+      </test>
+      <result>
+         <assert-string-value normalize-space="true">false-230-false</assert-string-value>
+      </result>
+   </test-case>
+   
+   <test-case name="static-011">
+      <description>
+         Simple test with static param that is implicitly mandatory with type xs:integer, no select attr, value NOT set from calling processor, ERROR scenario
+         (See also Bug#28355, this error seems to have disappeared from the spec.)
+      </description>
+      <keywords>static-variable tvt implicit-default xs:integer occurrence-indicator</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-011.xsl"/>         
+      </test>
+      <result>
+         <error code="XTDE0610"/>
+      </result>
+   </test-case>
+   
+   <test-case name="static-011a">
+      <description>
+         Simple test with static param with explicit default value of xs:integer, no select attr, value set from calling processor
+      </description>
+      <keywords>static-variable tvt implicitly-mandatory xs:integer</keywords>
+      <created by="Abel Braaksma" on="2015-03-10"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="static-011.xsl"/>
+         <param name="static-param" static="yes" as="xs:integer" select="23" />
+      </test>
+      <result>
+         <assert-string-value normalize-space="true">230</assert-string-value>
+      </result>
+   </test-case>
+   
+
+</test-set>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/static/static-001.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <!-- Tests static attribute on xsl:param and dynamic ctx usage in a TVT -->
+   
+   <xsl:param name="static-param" static="yes" select="'success'"/>
+   
+   <xsl:template name="xsl:initial-template" expand-text="yes">
+      {$static-param}
+   </xsl:template>
+   
+</xsl:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/static/static-002.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <!-- Using a static param in another static param -->
+   
+   <xsl:param name="static-param" static="yes" select="'success'"/>
+
+   <xsl:param name="alt-param" static="yes" select="upper-case($static-param)"/>
+
+   <xsl:template name="xsl:initial-template" expand-text="yes">
+      {$static-param}{$alt-param}
+   </xsl:template>
+   
+</xsl:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/static/static-003.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <!-- Using a static param in another static param in wrong decl order: ERROR scenario -->
+   
+   <xsl:param name="alt-param" static="yes" select="upper-case($static-param)"/>
+
+   <xsl:param name="static-param" static="yes" select="'success'"/>
+
+   <xsl:template name="xsl:initial-template" expand-text="yes">
+      {$static-param}{$alt-param}
+   </xsl:template>
+   
+</xsl:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/static/static-004.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <!-- Simple req param test -->
+   
+   <xsl:param name="req-param" static="yes" required="yes"/>
+
+   <xsl:template name="xsl:initial-template" expand-text="yes">
+      {$req-param}-{$req-param}
+   </xsl:template>
+   
+</xsl:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/static/static-005.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <!-- Req param with select attr: ERROR scenario -->
+   
+   <xsl:param name="req-param" static="yes" select="'this will fail with XTSE0010'" required="yes"/>
+
+   <xsl:template name="xsl:initial-template" expand-text="yes">
+      {$req-param}-{$req-param}
+   </xsl:template>
+   
+</xsl:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/static/static-006.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <!-- Req param with select attr: ERROR scenario -->
+   
+   <xsl:param name="req-param" static="yes" required="yes">
+      This will fail with XTSE0010
+   </xsl:param>
+
+   <xsl:template name="xsl:initial-template" expand-text="yes">
+      {$req-param}-{$req-param}
+   </xsl:template>
+   
+</xsl:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/static/static-007.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <!-- Req param with select attr: ERROR scenario -->
+   
+   <xsl:param name="wrong-param" static="yes">
+      This will raise XTSE0010
+   </xsl:param>
+
+   <xsl:template name="xsl:initial-template" expand-text="yes">
+      {$wrong-param}
+   </xsl:template>
+   
+</xsl:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/static/static-008.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+   <!-- Static param without select attr, defaults to empty string -->
+   
+   <xsl:param name="static-param" static="yes" />
+
+   <xsl:template name="xsl:initial-template" expand-text="yes">
+      {empty($static-param)}-{upper-case($static-param)}-{$static-param = ''}
+   </xsl:template>
+   
+</xsl:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/static/static-009.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:xs="http://www.w3.org/2001/XMLSchema" version="3.0">
+
+   <!-- Static param without select attr, but with an as-clause (implicitly defaulting to empty seq or empty string) -->
+   
+   <xsl:param name="static-param" static="yes" as="item()*" />
+
+   <xsl:template name="xsl:initial-template" expand-text="yes">
+      {empty($static-param)}-{10 * $static-param}-{$static-param = ''}
+   </xsl:template>
+   
+</xsl:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/static/static-010.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:xs="http://www.w3.org/2001/XMLSchema" version="3.0">
+
+   <!-- Static param without select attr, but with an as-clause (implicitly defaulting to empty seq or empty string) -->
+   
+   <xsl:param name="static-param" static="yes" as="xs:integer?" />
+
+   <xsl:template name="xsl:initial-template" expand-text="yes">
+      {empty($static-param)}-{10 * $static-param}-{$static-param = ''}
+   </xsl:template>
+   
+</xsl:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/static/static-011.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:xs="http://www.w3.org/2001/XMLSchema" version="3.0">
+
+   <!-- Static param without select attr, but with an as-clause, implicitly mandatory-->
+   
+   <xsl:param name="static-param" static="no" as="xs:integer" />
+
+   <xsl:template name="xsl:initial-template" expand-text="yes">
+      {10 * $static-param}
+   </xsl:template>
+   
+</xsl:transform>
--- a/tests/attr/use-when/_use-when-test-set.xml	Fri Mar 27 17:47:17 2015 +0000
+++ b/tests/attr/use-when/_use-when-test-set.xml	Fri Mar 27 18:38:06 2015 +0000
@@ -538,7 +538,7 @@
    <test-case name="use-when-0127a">
       <description>test use-when expression calling generate-id() function (should fail in 2.0).</description>
       <created by="Michael Kay" on="2012-11-07"/>
-      <modified by="Michael Kay" on="2015-03-27" change="see bug 28349"/>
+      <modified by="Abel Braaksma" on="2015-03-23" change="Bug#28349 Should only fail with XSLT 2.0, not 3.0"/>
       <environment ref="use-when-01"/>
       <dependencies>
          <spec value="XSLT20"/>
@@ -567,6 +567,8 @@
       </result>
    </test-case>
 
+
+
    <test-case name="use-when-0128">
       <description>test use-when expression calling doc() function (should fail).</description>
       <created by="Michael Kay" on="2012-11-07"/>
@@ -1327,12 +1329,14 @@
       <description>
          Tests using function-available for generate-id,
          system-property, key, current, unparsed-entity-uri, and unparsed-entity-public-id
-         in an use-when instruction.
+         in a use-when instruction.
       </description>
       <created by="Michael Kay" on="2012-10-30"/>
+      <modified by="Abel Braaksma" on="2015-03-23" change="Fixed test-part on generate-id (which reported generate-id, but tested fn:current)"/>
+      <modified by="Abel Braaksma" on="2015-03-23" change="Only applies to XSLT 2.0, most of these functions are allowed in XSLT 3.0, see use-when-0407a"/>
       <environment ref="use-when-04"/>
       <dependencies>
-         <spec value="XSLT20+"/>
+         <spec value="XSLT20"/>
       </dependencies>
       <test>
          <stylesheet file="use-when-0407.xsl"/>
--- a/tests/attr/use-when/use-when-0127.xsl	Fri Mar 27 17:47:17 2015 +0000
+++ b/tests/attr/use-when/use-when-0127.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -5,7 +5,7 @@
 
   <!-- PURPOSE: test use-when expression calling generate-id() function (should fail in 2.0, succeed in 3.0). -->
   <?spec xslt#conditional-inclusion?>
-  <?error XPST0003?>
+  <?error XPST0017?>
 
   <xsl:template match="*">
     <xsl:copy>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/use-when/use-when-0127a.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -0,0 +1,19 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+
+  <!-- PURPOSE: test use-when expression calling generate-id() function (should SUCCEED in XSLT 3.0). -->
+  <?spec xslt#conditional-inclusion?>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:apply-templates />
+    </out>
+  </xsl:template>
+  
+  <xsl:template match="para" use-when="generate-id(()) = ''">
+    <p><xsl:next-match/></p>
+  </xsl:template>
+  
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/use-when/use-when-0127b.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -0,0 +1,19 @@
+<?xml version="1.0"?> 
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+
+  <!-- PURPOSE: test use-when expression calling generate-id() function (should SUCCEED in XSLT 3.0). -->
+  <?spec xslt#conditional-inclusion?>
+
+  <xsl:template match="/">
+    <out>
+      <xsl:apply-templates />
+    </out>
+  </xsl:template>
+  
+  <xsl:template match="para" use-when="generate-id(()) != ''">
+    <p><xsl:next-match/></p>
+  </xsl:template>
+  
+</xsl:stylesheet>
\ No newline at end of file
--- a/tests/attr/use-when/use-when-0407.xsl	Fri Mar 27 17:47:17 2015 +0000
+++ b/tests/attr/use-when/use-when-0407.xsl	Fri Mar 27 18:38:06 2015 +0000
@@ -39,7 +39,7 @@
                   <t:value-of select="function-available('current')"/>
             </fa>
             <fa f="generate-id">
-                  <t:value-of select="function-available('current')"/>
+                  <t:value-of select="function-available('generate-id')"/>
             </fa>
             <fa f="key">
                   <t:value-of select="function-available('key')"/>