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

Re: Equal rights for xsl:next-match & co

Subject: Re: Equal rights for xsl:next-match & co
From: Ihe Onwuka <ihe.onwuka@xxxxxxxxx>
Date: Fri, 17 May 2013 18:44:23 +0100
Re:  Equal rights for xsl:next-match & co
On Fri, May 17, 2013 at 4:40 PM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
> On 17 May 2013 16:20, Ihe Onwuka <ihe.onwuka@xxxxxxxxx> wrote:
>> It would seem that xsl:next-match and xsl:apply-imports are of the
>> same genre as xsl;apply-templates in that they all result in XSLT
>> going off to search for a template rule to apply.
>>
>> Of the trio only xsl:apply-templates accepts and processes a mode parameter.
>>
>> Supposing I do xsl:next-match within a modal template rule. Why
>> shouldn't that restrict potential matching templates to those of the
>> same mode.
>>
>> Are we looking at some sort of lacuna here or have I overlooked something.
>
> xsl:next-match returns the next template in match priority order, so
> changing the mode doesn't really make sense there.  If you need to do
> that, just do <xsl:apply-templates select="." mode=" the other mode"/>
>

It's not about changing to some other mode. It's about whether
<xsl:next-match> should respect the modality of the  "calling
template" when looking for a matching template rule.

In that scenario your suggestion reduces to <xsl:apply-template
select="." mode="theSame mode"/> which is no good.

The comments apply equally to apply-imports and that doesn't have a
mode attribute.

To exemplify in

<xsl:template match="*" mode="X">
  <xsl:next-match/>
</xsl:template>

should the next-match be restricted to rules in mode X and if it isn't
whether it is legit to want it to be.... (I would have thought so).

If next-match and apply-imports were not treated as  second class
citizens  they would have a mode parameter and the question wouldn't
arise.

Since they don't it looks to me like there is a legit semantic question here.

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.