]> granicus.if.org Git - docbook-dsssl/commitdiff
Hopefully fixed bug #549736. Single-pass profiling should also work in FO stylesheet...
authorJirka Kosek <jirka@kosek.cz>
Wed, 15 May 2002 14:08:47 +0000 (14:08 +0000)
committerJirka Kosek <jirka@kosek.cz>
Wed, 15 May 2002 14:08:47 +0000 (14:08 +0000)
xsl/profiling/xsl2profile.xsl

index 71ba62d7ce057957a04029ec944a7d47e2f3d972..3f7bfe9c5d6bc0fa37bc4cecadf6115a78866168 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:xslo="http://www.w3.org/1999/XSL/TransformAlias"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                exclude-result-prefixes="fo"
                 version="1.0">
 
 <xsl:include href="../lib/lib.xsl"/>
@@ -88,7 +90,7 @@
   </xsl:copy>
 </xsl:template>
 
-<xsl:template match='*[contains(@*, "key(&apos;id&apos;,$rootid)")]' mode="correct">
+<xsl:template match='*[contains(@*, "key(&apos;id&apos;,$rootid)")]' mode="correct" priority="2">
   <xsl:copy>
     <xsl:for-each select="@*">
       <xsl:choose>
   </xsl:copy>
 </xsl:template>
 
+<!-- FO stylesheet has apply-templates without select, we must detect it by context -->
+<xsl:template match="fo:root//xsl:apply-templates" mode="correct">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:attribute name="select">$profiled-nodes</xsl:attribute>
+    <xsl:apply-templates mode="correct"/>
+  </xsl:copy>
+</xsl:template>
+
 <xsl:template match="*" mode="correct">
   <xsl:copy>
     <xsl:copy-of select="@*"/>