This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28426 - [XT30] error-XPTY0020b expects static error even when not executed
Summary: [XT30] error-XPTY0020b expects static error even when not executed
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 Test Suite (show other bugs)
Version: Last Call drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Abel Braaksma
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-07 06:57 UTC by Abel Braaksma
Modified: 2015-05-06 21:24 UTC (History)
0 users

See Also:


Attachments

Description Abel Braaksma 2015-04-07 06:57:17 UTC
The test calls a function that uses an expression that select the root node from a context item that is not a node:

<xsl:function name="f:doc" xmlns:f="http://f.com/">
  <xsl:analyze-string select="'abcd'" regex="efgh">
    <xsl:matching-substring>
      <xsl:value-of select="//a"/>
    </xsl:matching-substring>
  </xsl:analyze-string>
</xsl:function>
</xsl:stylesheet>

However, the function is never executed. The test is marked with:

    "." used when not a node - static error even though never executed. 

I don't think that is true. If the function is never called, the error does not need to be raised.
Comment 1 Abel Braaksma 2015-04-07 07:02:25 UTC
Actually, even when that function is called, we still do not throw the error because the body of the xsl:analyze-string is never hit.
Comment 2 Abel Braaksma 2015-04-07 07:19:24 UTC
Same is true for error-XPTY0004f.

Both fixed as suggested.
Comment 3 Abel Braaksma 2015-05-06 21:24:33 UTC
Was resolved > 30 days ago, closing.