Correct unintended errors (extension-element-prefixes)
authorMichael Kay <mike@saxonica.com>
Sat, 02 Feb 2019 20:26:39 +0000
changeset 1956 4624e4c75d67
parent 1955 df4636738305
child 1957 b0fda4892e01
Correct unintended errors (extension-element-prefixes)
tests/expr/math/_math-test-set.xml
tests/expr/math/math-3701.xsl
tests/expr/math/math-3702.xsl
tests/expr/math/math-3801.xsl
tests/expr/math/math-3901.xsl
--- a/tests/expr/math/_math-test-set.xml	Sat Feb 02 20:26:04 2019 +0000
+++ b/tests/expr/math/_math-test-set.xml	Sat Feb 02 20:26:39 2019 +0000
@@ -2785,8 +2785,9 @@
    </test-case>
 
    <test-case name="math-3701">
-      <description>Round with different test cases for xs:Double</description>
+      <description>Round with different test cases for xs:double</description>
       <created by="ONeil Delpratt, Saxonica" on="2012-11-07"/>
+      <modified by="Michael Kay, Saxonica" on="2019-01-21" change="correct unintended error (see math-3702)"/>
       <environment ref="math-37"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -2799,9 +2800,25 @@
       </result>
    </test-case>
 
+   <test-case name="math-3702">
+      <description>extension-element-prefixes cannot use a reserved namespace. Was math-3701, now corrected to raise an error</description>
+      <created by="Michael Kay, Saxonica" on="2019-01-21"/>
+      <environment ref="math-37"/>
+      <dependencies>
+         <spec value="XSLT30+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="math-3702.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0085"/>
+      </result>
+   </test-case>
+   
    <test-case name="math-3801">
       <description>Round with different test cases for xs:Decimal</description>
       <created by="ONeil Delpratt, Saxonica" on="2012-11-07"/>
+      <modified by="Michael Kay, Saxonica" on="2019-01-21" change="correct unintended error (see math-3702)"/>
       <environment ref="math-38"/>
       <dependencies>
          <spec value="XSLT30+"/>
@@ -2817,6 +2834,7 @@
    <test-case name="math-3901">
       <description>Round with different test cases for xs:Float</description>
       <created by="ONeil Delpratt, Saxonica" on="2012-11-07"/>
+      <modified by="Michael Kay, Saxonica" on="2019-01-21" change="correct unintended error (see math-3702)"/>
       <environment ref="math-39"/>
       <dependencies>
          <spec value="XSLT30+"/>
--- a/tests/expr/math/math-3701.xsl	Sat Feb 02 20:26:04 2019 +0000
+++ b/tests/expr/math/math-3701.xsl	Sat Feb 02 20:26:39 2019 +0000
@@ -1,4 +1,4 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" extension-element-prefixes="xs">
+<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">
  <xsl:output method="xml" encoding="UTF-8" indent="no" omit-xml-declaration="yes" />
  <xsl:template match="doc">
 <x>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/expr/math/math-3702.xsl	Sat Feb 02 20:26:39 2019 +0000
@@ -0,0 +1,27 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" extension-element-prefixes="xs">
+ <xsl:output method="xml" encoding="UTF-8" indent="no" omit-xml-declaration="yes" />
+ <xsl:template match="doc">
+<x>
+  <!-- Testing Round xs:Double -->
+   <?spec fo#func-round?>
+    <out><xsl:value-of select="round(12.0e0, 1)"/></out>
+    <out><xsl:value-of select="round(1.154E1, 1)"/></out>
+    <out><xsl:value-of select="round(1.365e1, 1)"/></out>
+    <out><xsl:value-of select="round(-1.365e1, 1)"/></out>
+    <out><xsl:value-of select="round(-2.5e0,0)"/></out>
+    <out><xsl:value-of select="round(2.5e0,0)"/></out>
+    <out><xsl:value-of select="round(2.4999e2,0)"/></out>
+    <out><xsl:value-of select="round(8492.15e1, -1)"/></out>
+    <out><xsl:value-of select="round(8495.551e2,-1)"/></out>
+    <out><xsl:value-of select="round(8496.787e2,-2)"/></out>
+    <out><xsl:value-of select="round(xs:double(45e100),-101)" /></out>
+    <out><xsl:value-of select="round(xs:double(9.9e-99),99)" /></out>
+    <out><xsl:value-of select="round(xs:double('0'),0)"/></out>    
+    <out><xsl:value-of select="round(xs:double('NaN'),0)"/></out>
+    <out><xsl:value-of select="round(xs:double(1e0 div 0e0), 0)"/></out>
+    <out>
+    <xsl:value-of select="round(xs:double(sum(for $e in a return xs:double($e))), 2)"/>   
+    </out>
+</x>
+ </xsl:template>
+</xsl:stylesheet>
--- a/tests/expr/math/math-3801.xsl	Sat Feb 02 20:26:04 2019 +0000
+++ b/tests/expr/math/math-3801.xsl	Sat Feb 02 20:26:39 2019 +0000
@@ -1,4 +1,4 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" extension-element-prefixes="xs">
+<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">
  <xsl:output method="xml" encoding="UTF-8" indent="no" omit-xml-declaration="yes" />
  <xsl:template match="doc">
   <x>
--- a/tests/expr/math/math-3901.xsl	Sat Feb 02 20:26:04 2019 +0000
+++ b/tests/expr/math/math-3901.xsl	Sat Feb 02 20:26:39 2019 +0000
@@ -1,4 +1,4 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" extension-element-prefixes="xs">
+<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">
  <xsl:output method="xml" encoding="UTF-8" indent="no" omit-xml-declaration="yes" />
  <xsl:template match="doc">
   <x>