This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26649 - [XSLT30] EBNF for package-version and package version range syntax
Summary: [XSLT30] EBNF for package-version and package version range syntax
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-24 13:57 UTC by Abel Braaksma
Modified: 2014-09-05 14:31 UTC (History)
0 users

See Also:


Attachments

Description Abel Braaksma 2014-08-24 13:57:39 UTC
First reported by mail in https://lists.w3.org/Archives/Member/w3c-xsl-wg/2014Aug/0009.html (member only), recreated here for trackability.

Partial copy from that mail, only covering the actual proposal:

(where I use angle brackets, it is defined in XPath).

Syntax for version (xsl:package/@package-version):

PackageVersion   ::= NumericVersion ("-" VersionNamedPart)?
VersionNamedPart ::= <NCName>
NumericVersion   ::= <IntegerLiteral> ("." <IntegerLiteral>)*

Syntax for version ranges (xsl:use-package/@package-version):

PackageVersionRange ::= AnyVersion | VersionRanges
AnyVersion          ::= "*"
VersionRanges       ::= VersionRange (<S>? "," <S>? VersionRange)*
VersionRange        ::= (PackageVersion? <S> "to" <S>)? SingleVersionRange
SingleVersionRange  ::= PackageVersion | VersionGreater | VersionComponent
VersionGreater      ::= PackageVersion "+"
VersionComponent    ::= PackageVersion ".*"

Inasmuch as I could verify by hand, the syntax above matches the syntax in the specification, with one exception, the EBNF allows for "1.2 to 3.4+", which is currently not allowed by the spec (it only allows "1.2 to 3.4" or "1.2 to 3.4.*"). But I don't think this change is bad per se, I even think it is more consistent.
Comment 1 Michael Kay 2014-09-05 10:53:33 UTC
The WG accepted the proposal to use EBNF syntax. I have applied this with minor editorial changes, nad have rewritten the section describing the semantics of the different version ranges to match the new style.

I haven't included the syntax change to permit "1 to 3.4+". I wasn't sure what it was supposed to mean, other than being another way of writing "1+".
Comment 2 Abel Braaksma 2014-09-05 14:28:07 UTC
Well, the comment on "1.2 to 3.4+" was meant to signify that the current text (prior to introducing EBNF) does not mention it, nor does it explicitly forbid it. With the EBNF, that syntax becomes explicitly allowed.

Of course, like you wrote, it is just a clumsy way of writing "1.2+". If we want to explicitly disallow that syntax, I can alter the EBNF. But I think allowing it is fine, the explanation of the syntax is clear enough and not having an example of this edge case does not hurt.
Comment 3 Abel Braaksma 2014-09-05 14:31:04 UTC
> I haven't included the syntax change to permit "1 to 3.4+".

Missed that, please ignore my prev. comment. 

Just as well, if we explicitly forbid it by the EBNF (but I haven't seen your changes yet), it is perhaps cleaner. But that was the whole point of adding the EBNF: making it (very) explicit ;).