<?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>29222</bug_id>
          
          <creation_ts>2015-10-22 03:32:51 +0000</creation_ts>
          <short_desc>[XT30] function-1501 tests existing environment variables by checking against the empty string</short_desc>
          <delta_ts>2015-10-22 15:57:18 +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 Test Suite</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</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="Abel Braaksma">abel.braaksma</reporter>
          <assigned_to name="Abel Braaksma">abel.online</assigned_to>
          <cc>mike</cc>
          
          <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>123833</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-10-22 03:32:51 +0000</bug_when>
    <thetext>The test uses the following to test whether any item from fn:available-system-variables() exists or not:

  &lt;xsl:if test=&quot;environment-variable(.) =&apos;&apos;&quot; &gt;
     false
  &lt;/xsl:if&gt; 

It is possible to have environment variables that return an empty string. In fact, the FO30 spec says that if an env variables does not exist, it should return the empty sequence.

I propose to fix this test by testing for emptiness instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123850</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-10-22 14:21:42 +0000</bug_when>
    <thetext>Agreed. I have rewritten the test to read:

&lt;xsl:value-of select=&quot;
    every $s in (&apos;user&apos;, &apos;USER&apos;, &apos;shell&apos;, &apos;SHELL&apos;, &apos;path&apos;, &apos;PATH&apos;, &apos;zzz&apos;, &apos;&apos;, &apos;%$£*!&apos;) satisfies
          if (available-environment-variables() = $s) 
          then exists(environment-variable($s)) 
          else empty(environment-variable($s))&quot;/&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123851</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-10-22 14:31:35 +0000</bug_when>
    <thetext>I have similarly rewritten function-1601</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123856</commentid>
    <comment_count>3</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-10-22 15:57:18 +0000</bug_when>
    <thetext>Thanks. I also rewrote it, I will check if I inadvertently overwrote your changes...</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>