<?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>29988</bug_id>
          
          <creation_ts>2016-11-06 18:23:41 +0000</creation_ts>
          <short_desc>[XSLT30] Function available-system-properties and its returned value</short_desc>
          <delta_ts>2016-11-11 09:07:16 +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>Candidate Recommendation</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="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>128090</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-11-06 18:23:41 +0000</bug_when>
    <thetext>The function fn:available-system-properties returns a sequence of qnames. At the bottom of its section (bottom of 20.4.5), there&apos;s a convenience-function described to convert these into strings that can be used with system-property.

While that&apos;s a good thing, the function is introduced with:

&quot;However, they must first be converted to the form expected by the system-property function. This can be conveniently achieved by passing a QName to the function:&quot;

I think it is more accurate to say that this *may* be needed. While the function returns qnames, we can&apos;t say anything about their prefixes, but processors are allowed to assign prefixes (right?). In such cases it may be enough to simply cast the qname to a string.

With the caveat that the prefix in the string may get out of namespace-scope.

But bottom line is, either we should be more explicit as to why we go through the trouble of giving a utility function to the user, or we should settle with &quot;may&quot;:

&quot;However, they may first need to be converted to ...&quot;

(alternatively, can&apos;t we request the F&amp;O group to introduce an fn:qname-to-eqname function? It is so weird we have introduced eqnames, but no function at all to handle them)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128091</commentid>
    <comment_count>1</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-11-06 18:26:31 +0000</bug_when>
    <thetext>Perhaps we should also update this sentence:

&quot;The function returns a sequence of QNames, being the names of the system properties recognized by the processor, in some implementation-dependent order.&quot;

into

&quot;The function returns a sequence of QNames, being the names of the system properties recognized by the processor, in some implementation-dependent order, with implementation-dependent or empty prefixes.&quot;

(or is that common sense?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128094</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-11-07 11:31:31 +0000</bug_when>
    <thetext>Casting the QName to a string may work if the implementation and the stylesheet happen to bind the same prefixes, but this is so unreliable that I don&apos;t think we should encourage anyone to attempt it.

I agree that it makes sense to point out that the prefix component of the returned QNames is implementation-dependent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128145</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-11-11 09:07:16 +0000</bug_when>
    <thetext>I have added a clarification to the spec.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>