[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: "Norman Tovey-Walsh ndw@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Jul 2020 16:34:37 -0000
Re:  Grouping in match patterns
> It seems the spec indeed allows this.
> Furthermore, Saxon-JS 2 doesn't complain:

Saxon 10.1 does:

Error at xsl:template on line 14 column 35 of out.xsl:
  XTSE0340  Cannot convert the expression
  {homCheck(child::element(Q{}a)/(child::element(Q{}b) |
child::element(Q{}c)))} to a pattern
Errors were reported during stylesheet compilation

I havenbt tried to do any more investigation than that.

Herebs the stylesheet. The error above arises from attempting to process
itself:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                exclude-result-prefixes="xs"
                version="3.0">

<random xmlns="http://example.com">
  <no-namespace xmlns="">
    <a><b/></a>
    <a><c/></a>
  </no-namespace>
</random>

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

<xsl:template match="element()">
  <xsl:copy>
    <xsl:apply-templates select="@*,node()"/>
  </xsl:copy>
</xsl:template>

</xsl:stylesheet>



                                        Be seeing you,
                                          norm

--
Norman Tovey-Walsh <ndw@xxxxxxxxxx>
https://nwalsh.com/

> In the life of saints, technically so called, the spiritual facilities
> are strong, but what gives the impression of extravagance proves
> usually on examination to be a relative deficiency of
> intellect.--William James

[demime 1.01d removed an attachment of type application/pgp-signature which had a name of signature.asc]

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.