Subject: Re: [xsl] Calling a template before any other templates From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 11 Apr 2012 13:37:20 -0400 |
Hi. I am trying to do something in XSLT 2.0 that requires that some of my templates know what the result of other templates is (or will be). I want to run a process that writes a file before any other templates run and then be able to refer to that file during the rest of the processing.
If I call a template from the first template like the following, can I rely on it being completed before any other templates are applied? Is there a reliable way to perform an operation before any templates are applied?
<xsl:template match="/"> <xsl:call-template name="this.template.must.be.first" /> <xsl:apply-templates/> </xsl:template>
<xsl:template match="/"> <xsl:apply-templates> <xsl:with-param name="myStuff" tunnel="yes"> <xsl:call-template name="blah"/> </xsl:with-param> </xsl:apply-templates> </xsl:template>
<xsl:template match="x"> <xsl:param name="myStuff" tunnel="yes"/>
.... $myStuff/y/z .... </xsl:template>
-- Public XSLT, XSL-FO, UBL and code list classes in Europe -- May 2012 Contact us for world-wide XML consulting and instructor-led training Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Calling a template before any, Peter Desjardins | Thread | Re: [xsl] Calling a template before, Peter Desjardins |
[xsl] Calling a template before any, Peter Desjardins | Date | Re: [xsl] Calling a template before, Peter Desjardins |
Month |