<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>7976</bug_id>
          
          <creation_ts>2009-10-20 11:14:45 +0000</creation_ts>
          <short_desc>[XSLT 2.1] xsl:analyze-string applied to an empty sequence</short_desc>
          <delta_ts>2014-05-15 14:00:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XSLT 3.0</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>28572</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2009-10-20 11:14:45 +0000</bug_when>
    <thetext>The new fn:analyze-string() function behaves like most string functions in that it accepts an empty sequence as input, and treats it in the same way as a zero-length string (in both cases the output will be an empty fn:analyze-string-result element).

The xsl:analyze-string instruction in XSLT 2.0 does not work this way: it reports an error if the input is an empty sequence. So, for example, if there is no address element then &lt;xsl:analyze-string select=&quot;address&quot;&gt; will cause a type error, but if the address element is present and empty, it will produce empty output.

I propose we change this (a) for usability, (b) for consistency, and (c) to make it a little bit easier for implementations to reuse code between xsl:analyze-string and fn:analyze-string.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36941</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-07-16 10:49:12 +0000</bug_when>
    <thetext>Proposal accepted at the F2F meeting in Oxford (change xsl:analyze-string to accept the empty sequence in the same way as fn:analyze-string does).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>