[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Grouping in match patterns

Subject: Re: Grouping in match patterns
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Jul 2020 16:02:07 -0000
Re:  Grouping in match patterns
Am 14.07.2020 um 17:33 schrieb Wendell Piez wapiez@xxxxxxxxxxxxxxx:
XSL-List friends,

Is there anything special I should know about a match pattern such as
"a / (b|c)" -- which gives me an error (in oXygen and running Saxon)?

<xsl:template match="a / (b | c)"/>

Wouldn't it be permitted by the grammar given at
https://www.w3.org/TR/xslt-30/#pattern-syntax? Production [11] would
seem to permit a parenthetical expression as a discrete step. Is there
something I am missing here?

It seems the spec indeed allows this.


Furthermore, Saxon-JS 2 doesn't complain:
https://martin-honnen.github.io/xslt3fiddle/?xslt=%3C%3Fxml+version%3D%221.0%
22+encoding%3D%22utf-8%22%3F%3E%0D%0A%3Cxsl%3Astylesheet+xmlns%3Axsl%3D%22htt
p%3A%2F%2Fwww.w3.org%2F1999%2FXSL%2FTransform%22%0D%0A++version%3D%223.0%22%0
D%0A++xmlns%3Axs%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%22%0D%0A++ex
clude-result-prefixes%3D%22%23all%22%0D%0A++expand-text%3D%22yes%22%3E%0D%0A%
0D%0A++%3Cxsl%3Amode+on-no-match%3D%22shallow-copy%22%2F%3E%0D%0A++%0D%0A++%0
D%0A++%3Cxsl%3Atemplate+match%3D%22a+%2F+%28b+%7C+c%29%22%2F%3E%0D%0A%0D%0A%0
D%0A++%3Cxsl%3Atemplate+match%3D%22%2F%22+name%3D%22xsl%3Ainitial-template%22
%3E%0D%0A++++%3Cxsl%3Anext-match%2F%3E%0D%0A++++%3Cxsl%3Acomment%3ERun+with+%
7Bsystem-property%28%27xsl%3Aproduct-name%27%29%7D+%7Bsystem-property%28%27xs
l%3Aproduct-version%27%29%7D%3C%2Fxsl%3Acomment%3E%0D%0A++%3C%2Fxsl%3Atemplat
e%3E%0D%0A++%0D%0A%3C%2Fxsl%3Astylesheet%3E%0D%0A&input=%3Croot%3E%0D%0A++%3C
a%2F%3E%0D%0A++%3Ca%3E%3Ce%2F%3E%3C%2Fa%3E%0D%0A++%3Ca%3E%3Cb%2F%3E%3C%2Fa%3E
%0D%0A++%3Ca%3E%3Cc%2F%3E%3C%2Fa%3E%0D%0A%3C%2Froot%3E%0D%0A&input-type=XML

Will need to check whether I still have that other XSLT 3 processor
Exselt and what it says.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.