This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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: "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." I couldn't find normatively whether this is illegal, though: <xsl:use-package name="" version="*" /> 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'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: "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." With something like this (added sentences): "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."
(also editorial) I just noticed that we should probably mention that leading and trailing whitespace are removed. I.e., these should be equal: <xsl:use-package name="urn:test" /> <xsl:use-package name=" urn:test " />
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.
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 "". Frankly, I think there is no problem here that needs fixing.
I think you are right. We use the term "unnamed package" 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.
Closing as INVALID, as per today's telcon's decision.