Bug 20874 - [XSLT 3.0] doubled curlies in AVTs and TVTs
Summary: [XSLT 3.0] doubled curlies in AVTs and TVTs
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Member-only Editors Drafts
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
Reported: 2013-02-05 11:10 UTC by Michael Kay
Modified: 2013-02-12 18:31 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kay 2013-02-05 11:10:03 UTC
We currently describe the way curly brackets are escaped in a different way from the way XQuery does it, and there is one practical consequence of the difference: we have a rule that when the expression ends in "}", this must be separated from the delimiting "}" by a space, while XQuery has no such rule.

The point is a little academic, since the result of the expression is always atomized, and the only expressions that can end in "}" (map constructors and function literals) cannot be atomized. But other expressions ending in "}" might be introduced in the future.

When AVTs were introduced in 1.0, it was feasible to scan the text looking for the closing "}" delimiter, taking care to avoid catching a "}" that appeared inside a string literal, and then pass the text found within the braces to the XPath parser. The syntax of XPath has become too complicated for this to be a feasible approach anymore; you need to parse the XPath expression and then check whether the character that follows it is a closing "}". This makes the rule that a final "}" in the XPath expression must be separated by whitespace from the delimiting "}" nothing more than a nuisance, so I propose that we change it.

I would suggest introducing a grammar similar to that used in XQuery:

CVT ::= ((Char - '{}') | '{{' | '}}' | ('{' Expr '}') )*

Test case cvt-016 is affected.
Comment 1 Michael Kay 2013-02-11 12:56:11 UTC
The WG agreed to make this change.
Comment 2 Michael Kay 2013-02-12 18:31:40 UTC
Change applied (draft N).