xsl-list
[Top] [All Lists]

[xsl] Grouping in match patterns

2020-07-14 10:33:10
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?

While it's easy enough to write "a/b | a/c", in the real world, this
isn't quite my case -- the pattern is machine-generated and the paths
are potentially complex, such as (a simple case with only two
branches):

j:map[@key='ANTHOLOGY']/j:map[@key='meta']/ (
j:array[@key='keywords']/j:string | j:string[@key='keywords'] )

Thanks for any insights --
Wendell

-- 
...Wendell Piez... ...wendell -at- nist -dot- gov...
...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org...
...github.com/wendellpiez... ...gitlab.coko.foundation/wendell...
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>