<?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>29808</bug_id>
          
          <creation_ts>2016-09-05 03:13:20 +0000</creation_ts>
          <short_desc>[XSLT30] (editorial) xsl:use-package and using unnamed packages</short_desc>
          <delta_ts>2016-09-08 16:45:55 +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>editorial</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>127292</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-09-05 03:13:20 +0000</bug_when>
    <thetext>It is understandable that we disallow unnamed packages as library packages, but it is unclear what error should be raised. I suggest XTSE3000.

Under 3.5 Packages we say this:

&quot;Unnamed packages are allowed, but they can only be used as the “top level” of an application; they cannot be the target of an xsl:use-package declaration in another package.&quot;

I couldn&apos;t find normatively whether this is illegal, though:

&lt;xsl:use-package name=&quot;&quot; version=&quot;*&quot; /&gt;

Since an empty URI is also a legal (relative) URI, and we only say in the text that the name must be codepoint-equal, it would work that this actually loads an unnamed package (which would then subsequently fail because of the rule in 3.5).

I don&apos;t think we intend to allow this to happen. I suggest therefore an editorial clarification, for instance on the xsl:use-package/@name attribute, which can then consequently specify the error we would like to assign.

For instance, we could replace this:

&quot;The used package must have a name that is an exact match for the name in the name attribute (using codepoint comparison), and its explicit or implicit package-version must match the version range given in the package-version attribute.&quot;

With something like this (added sentences):

&quot;The used package must have a name that is an exact match for the name in the name attribute (using codepoint comparison), and its explicit or implicit package-version must match the version range given in the package-version attribute. If the value of the name attribute is the empty string, or exists entirely of whitespace, it designates the unnamed package. However, the empty package may only appear as top-level package: err:XTSE3000.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127295</commentid>
    <comment_count>1</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-09-05 12:24:16 +0000</bug_when>
    <thetext>(also editorial) 

I just noticed that we should probably mention that leading and trailing whitespace are removed. I.e., these should be equal:

&lt;xsl:use-package name=&quot;urn:test&quot; /&gt;
&lt;xsl:use-package name=&quot;   urn:test   &quot; /&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127299</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-09-05 15:44:25 +0000</bug_when>
    <thetext>Re comment 1, we have a general statement in 2.2:

Except where the set of allowed values of an attribute is specified using the italicized name string or char, leading and trailing whitespace in the attribute value is ignored. In the case of an attribute value template, this applies to the effective value obtained when the attribute value template is expanded.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127330</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-09-07 22:49:05 +0000</bug_when>
    <thetext>We say under xsl:package that the name attribute if present must be an absolute URI.

We say under xsl:use-package that the name of the package must be an exact match for the value of xsl:use-package/@name using codepoint comparison.

That cannot be the case if the package has no name. There is no suggestion anywhere that an unnamed package has a name equal to &quot;&quot;.

Frankly, I think there is no problem here that needs fixing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127334</commentid>
    <comment_count>4</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-09-08 08:26:41 +0000</bug_when>
    <thetext>I think you are right. We use the term &quot;unnamed package&quot; and I read that somehow as meaning a package with a name equal to the empty string.

But that cannot be right. Either the name is *absent*, or the name is (possibly?) something compiler generated. Either way, it cannot be referenced, per your explanation in comment#3.

That, with your comment#2, leads me to conclude we should close this one as INVALID.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127339</commentid>
    <comment_count>5</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-09-08 16:45:55 +0000</bug_when>
    <thetext>Closing as INVALID, as per today&apos;s telcon&apos;s decision.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>