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

Re: xsl:mode and priorities question

Subject: Re: xsl:mode and priorities question
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 3 Feb 2020 17:06:04 -0000
Re:  xsl:mode and priorities question
I think the answer is that despite there being two xsl:mode declarations,
there is only one mode, and the properties/attributes of that mode (such as
on-no-match) are determined by the highest-precedence definition. In this case
the two definitions of the mode are identical so there is no ambiguity.

Because there is only one mode named foo, there is no ambiguity as to which
template rules it contains.

Michael Kay
Saxonica

> On 3 Feb 2020, at 14:52, Christophe Marchand cmarchand@xxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Hello,
>
> XSL 3.0, imports and modes.
>
> main.xsl declares a mode, and imports imported.xsl, that declares the same
mode and defines a template in that mode :
>
> main.xsl:
> <xsl:mode name="foo" on-no-match="shallow-copy"/>
> <xsl:import href="imported.xsl"/>
>
> imported.xsl
> <xsl:mode name="foo" on-no-match="shallow-copy"/>
> <xsl:template match="bar" mode="foo" />
>
> If I process bar.xml, which is just <bar/>, in foo mode, what should I
expect :
>
> A shallow-copy, defined by foo mode in main.xsl, or an empty-sequence by
template match in imported.xsl ?
>
> Does xsl:import precedence applies to modes matching also, or only to
template matching ?
>
> Best,
> Christophe

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.