]> granicus.if.org Git - docbook-dsssl/commitdiff
Moved profiling stage out of templates. This make possible to reuse profiled content...
authorJirka Kosek <jirka@kosek.cz>
Tue, 6 Dec 2005 21:43:12 +0000 (21:43 +0000)
committerJirka Kosek <jirka@kosek.cz>
Tue, 6 Dec 2005 21:43:12 +0000 (21:43 +0000)
I don't know why this was not on the top level before. Maybe some XSLT processors choked on it. I hope this will be OK now.

xsl/profiling/xsl2profile.xsl

index dfdbd00f7ed498e1162e89f683a663bdc0e2ac2e..41fcc7cf703ccf4116c3715dcf65c787d50c67d0 100644 (file)
 <xsl:template match="xsl:template[@match='/' or @name='hhc-main' or @name='hhp-main']">
   <xsl:if test="@match='/'">
     <xslo:include href="../profiling/profile-mode.xsl"/>
-  </xsl:if>
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
     <xslo:variable name="profiled-content">
-      <xslo:apply-templates select="." mode="profile"/>
+      <xslo:apply-templates select="/" mode="profile"/>
     </xslo:variable>
     <xslo:variable name="profiled-nodes" select="exslt:node-set($profiled-content)"/>
-
+  </xsl:if>
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
     <xsl:apply-templates mode="correct"/>
   </xsl:copy>
 </xsl:template>