In case you are using XSLT 2.0, wouldn't <xsl:next-match> be useful?
On Thu, Dec 19, 2013 at 4:35 AM, Christian Mahnke
<cmahnke(_dot_)sub(_at_)googlemail(_dot_)com> wrote:
Hi Micheal,
What would you want this construct to actually do?
My use case is as follows: I’ve got a master template, in which the template
@match="/" contains a <xsl:for-each/> over a collection(). Inside the loop I
would like to call templates from imported stylesheets, that are designed to
handle single documents. Additionally they haven’t be designed to run
together with other templates, so they contain no @mode attribute on their
template @match="/".
This way the calls to <xsl:apply-templates select=".“/> (where . is a
document node from the collection) doesn’t match the root template of the
imported stylesheet, but the root template of the master stylesheet, which
causes a unwanted loop.
I’m just looking for a way to be able to give the imported stylesheets a
higher priority when I’m looping to a collection of files.
Best,
Christian
apply-imports means "process the current node using the template that would
have matched if this one didn't". It's hard to see what that could mean when
processing a different node, i.e. one that doesn't necessarily match the
current template rule.
Michael Kay
Saxonica
On 19 Dec 2013, at 11:07, Christian Mahnke
<cmahnke(_dot_)sub(_at_)googlemail(_dot_)com> wrote:
Hi list,
is there a way (in XSLT 2.0) to get a mix of <xsl:apply-templates
select="document($file)“/> and <xsl:apply-imports/>? Something like
<xsl:apply-imports select="document($file)“/>
This doesn’t seem to be valid but would be very useful…
Best,
Christian
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they
write all patents, too? :)
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--