Re: Pattern matching error in xsl:key
Dave Pawson <[email protected]>
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <CAEncD4f_uQOUuQGDBNtkQiaa7aaK=05n9xi7BGRYzdi2rcNQZg@mail.gmail.com> |
Perhaps match="changes[@from eq $source and @to eq $target]/rename" use="@from"/> I.e. match on the element, use the attributes of it? HTH On Sat, 5 Sep 2020 at 10:44, Ihe Onwuka <[email protected]> wrote: > > <versionChanges > > <changes from="4.0" to="4.1"> > <rename from="me" to="you"/> > </changes> > </versionChages> > > <xsl:param name="source" select="4.0"/> > <xsl:param name="target" select="4.1"/> > > <xsl:key name="changes" match="changes[@from eq $source and @to eq $target]/rename/*" use="@from"/> > > Warning at char 11 in xsl:key/@match on line 36 column 111 of translator.xsl: > XPTY0004 An error occurred matching pattern > {element(Q{mynamespace}changes)[((data(attribute::attribute(Q{}from))) eq > (atomizeSingleton($source))) and ((data(attribute::attribute(Q{}to))) eq > (atomizeSingleton($target)))]}: > > > _______________________________________________ > saxon-help mailing list archived at http://saxon.markmail.org/ > [email protected] > https://lists.sourceforge.net/lists/listinfo/saxon-help -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ.