Bug 28426 force-raise the XPTY0020 error by calling the function and matching with xsl:analyze-string
authorabraaksm
Tue, 07 Apr 2015 09:03:54 +0200
changeset 931 82bef93bed91
parent 930 84d455113603
child 932 d65a0894d476
Bug 28426 force-raise the XPTY0020 error by calling the function and matching with xsl:analyze-string
tests/misc/error/_error-test-set.xml
tests/misc/error/error-XPTY0020b.xsl
--- a/tests/misc/error/_error-test-set.xml	Tue Apr 07 08:57:56 2015 +0200
+++ b/tests/misc/error/_error-test-set.xml	Tue Apr 07 09:03:54 2015 +0200
@@ -11609,6 +11609,7 @@
    <test-case name="error-XPTY0020b">
       <description>"." used when not a node - static error even though never executed. Was error-code-183.</description>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Abel Braakmsa" on="2015-04-07" change="Bug 28426, the function must be called and the body of analyze-string must be evaluated to raise the error"/>
       <environment ref="error001"/>
       <dependencies>
          <spec value="XSLT20+"/>
--- a/tests/misc/error/error-XPTY0020b.xsl	Tue Apr 07 08:57:56 2015 +0200
+++ b/tests/misc/error/error-XPTY0020b.xsl	Tue Apr 07 09:03:54 2015 +0200
@@ -7,11 +7,12 @@
 
 <xsl:template match="/">
 <a/>
+  <xsl:value-of select="f:doc()" xmlns:f="http://f.com/"/>
 <xsl:message>***** error not detected! *****</xsl:message>
 </xsl:template>
 
 <xsl:function name="f:doc" xmlns:f="http://f.com/">
-  <xsl:analyze-string select="'abcd'" regex="efgh">
+  <xsl:analyze-string select="'abcd'" regex="a">
     <xsl:matching-substring>
       <xsl:value-of select="//a"/>
     </xsl:matching-substring>