W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2014

[Bug 26443] New: [XSLT30] xsl:use-package/@package-version is defined as a token, but can take any string, and appears to act as regex (?)

From: <bugzilla@jessica.w3.org>
Date: Mon, 28 Jul 2014 16:32:06 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-26443-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26443

            Bug ID: 26443
           Summary: [XSLT30] xsl:use-package/@package-version is defined
                    as a token, but can take any string, and appears to
                    act as regex (?)
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: minor
          Priority: P2
         Component: XSLT 3.0
          Assignee: mike@saxonica.com
          Reporter: abel.braaksma@xs4all.nl
        QA Contact: public-qt-comments@w3.org

We are trying to understand the text under section 3.6.1 Dependencies between
Packages. The current relevant text is as follows:

> The value of the package-version attribute consists of a prefix 
> and a suffix separated by a hash sign (#); if there is no hash 
> sign, the entire string is used as the prefix, and the suffix is 
> empty; if there is more than one hash sign, the first one is taken 
> as the separator and others as part of the suffix; if the hash sign 
> is the last character in the string then a suffix of ".*" is 
> assumed. The pattern matches a package version if the package 
> version can be divided into two substrings such that the first 
> substring matches the prefix literally (using codepoint comparison), 
> and the second substring matches the suffix considered as a regular 
> expression (matched according to the rules of the matchesFO30 function 
> with the $flags argument set to a zero length string). Thus the
> version pattern 3.1 matches version 3.1 only; the pattern 3.1# 
> matches 3.1, 3.1.2, and 3.17; the pattern 3.1#(\.\d+)? matches 3.1 and
> 3.1.5; and the pattern 3.1#(\.\d+)* matches 3.1, 3.1.5, and 3.1.5.2.

Issues:
- @package-version is defined as type token, but not so on xsl:package and not
so in the XSL XSD Schema (in both cases it is xs:string)
- the text above uses example values like "3.1#(\.\d+)*", but the text does not
explicitly say that the value is regular expression
- all examples talk of digits and dots. However, I think/assume that letters
are allowed, such as package-version="1.4.3b" or "1.4.3-beta".
- should the value indeed be interpreted as a regex, i.e. that
package-version="[a-z]+" is allowed and matches "alfa" and "gamma"?
- Or perhaps the intend of the text is to show how "#" can be expanded as a
regular expression, and that, apart from the "#"-sign, no other metacharacters
are interpreted as metacharacters, they are just literals. In which case some
examples in the text should be fixed.

On a second and third read, it looks like it is meant as a production of
something like:

PackageVersion ::= Prefix ("#" Suffix)?
Prefix ::= [^#x23]*
Suffix ::= regExp

Where Prefix is any valid Char, except the hash-sign and regExp matches the
production of regular expressions in XPath/XSD.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Monday, 28 July 2014 16:32:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:47 UTC