Subject: Re: [xsl] Question about xsl:apply-imports From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 11 Sep 2009 08:37:48 -0700 |
xsl:import is pretty awesome, let me say that right off.
But it sometimes yields surprising results.
I have a stylesheet called rendereddocument.xsl that imports a number of other stylesheets using the xsl:import instructions:
<xsl:import href="inc/baseline.xsl"/> <xsl:import href="inc/application-tabs.xsl"/> <xsl:import href="inc/fields.xsl"/> <xsl:import href="inc/search-criteria.xsl"/> <xsl:import href="inc/search-fields.xsl"/> <xsl:include href="../../override/xslt/customization.xsl"/>
in fields.xsl, I have a template defined as follows:
<xsl:template match="rm:document"> ...
and in rendereddocument.xsl I have two templates that are defined as follows:
<xsl:template match="rm:document" priority="-0.1"> ...
<xsl:template match="rm:associated" priority="-0.1"> ... <xsl:apply-imports/> ...
In the last template, there's an xsl:imports instruction. The element on which this template is matching, rm:associated, has rm:document children. It's my understanding that xsl:apply-imports should elect to apply the xsl:template defined in fields.xsl, not in rendereddocument.xsl.
However, this isn't what's happening. Instead, the template matching rm:document defined in rendereddocument.xsl is being applied.
Any help would be most appreciated. Let me know if you need to see all the files. Last time, the issue was glaringly apparent from just the first email. ;)
-- Interested in these classes? http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Question about xsl:apply-impo, Bill French | Thread | Re: [xsl] Question about xsl:apply-, Wendell Piez |
Re: [xsl] XSLT 1.0: How to apply-te, Alain Gilbert | Date | Re: [xsl] Question about xsl:apply-, Wendell Piez |
Month |