forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ferdin...@apache.org
Subject svn commit: r627063 - /forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
Date Tue, 12 Feb 2008 19:52:35 GMT
Author: ferdinand
Date: Tue Feb 12 11:52:32 2008
New Revision: 627063

URL: http://svn.apache.org/viewvc?rev=627063&view=rev
Log:
Fixed problems of id-attributes not being copied in all elements and missing for reference.

Modified:
    forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl

Modified: forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
URL: http://svn.apache.org/viewvc/forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl?rev=627063&r1=627062&r2=627063&view=diff
==============================================================================
--- forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
(original)
+++ forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
Tue Feb 12 11:52:32 2008
@@ -468,6 +468,7 @@
     <xsl:template
         match="notice">
         <fo:block
+            id="{@id}"
             font-size="10pt"
             text-align="left"
             space-before="20pt"
@@ -623,6 +624,7 @@
             <xsl:when
                 test="ancestor::li and not(preceding-sibling::*)">
                 <fo:block
+                    id="{@id}"
                     space-after="4pt"
                     font-family="serif">
                     <xsl:call-template
@@ -633,6 +635,7 @@
             
             <xsl:otherwise>
                 <fo:block
+                    id="{@id}"
                     space-before="4pt"
                     space-after="4pt"
                     font-family="serif">
@@ -649,6 +652,7 @@
             name="color"
             select="//skinconfig/colors/color[@name='code']/@value" />
         <fo:block
+            id="{@id}"
             font-family="monospace"
             font-size="8pt"
             padding="6pt"
@@ -667,6 +671,7 @@
     <xsl:template
         match="ol|ul">
         <fo:list-block
+            id="{@id}"
             provisional-distance-between-starts="18pt"
             provisional-label-separation="3pt"
             text-align="start">
@@ -676,6 +681,7 @@
     <xsl:template
         match="ol/li">
         <fo:list-item>
+            <xsl:copy-of select="@id"/>
             <xsl:if
                 test="not(following-sibling::li[1])">
                 <xsl:attribute
@@ -702,7 +708,7 @@
   unfortunately allows -->
     <xsl:template
         match="ul/ul | ul/ol | ol/ul | ol/ol">
-        <fo:list-item>
+        <fo:list-item id="{@id}">
             <fo:list-item-label
                 end-indent="label-end()">
                 <fo:block />
@@ -719,6 +725,7 @@
     <xsl:template
         match="ul/li">
         <fo:list-item>
+            <xsl:copy-of select="@id"/>
             <xsl:if
                 test="not(following-sibling::li[1])">
                 <xsl:attribute
@@ -739,7 +746,7 @@
     </xsl:template>
     <xsl:template
         match="dl">
-        <fo:list-block
+        <fo:list-block id="{@id}"
             provisional-distance-between-starts="18pt"
             provisional-label-separation="3pt"
             text-align="start">
@@ -748,7 +755,7 @@
     </xsl:template>
     <xsl:template
         match="dt">
-        <fo:list-item>
+        <fo:list-item id="{@id}">
             <fo:list-item-label
                 end-indent="label-end()">
                 <fo:block />
@@ -764,7 +771,7 @@
     </xsl:template>
     <xsl:template
         match="dd">
-        <fo:list-item>
+        <fo:list-item id="{@id}">
             <fo:list-item-label
                 end-indent="label-end()">
                 <fo:block />
@@ -780,6 +787,7 @@
     <xsl:template
         match="strong">
         <fo:inline
+            id="{@id}"
             font-weight="bold">
             <xsl:apply-templates />
         </fo:inline>
@@ -787,13 +795,13 @@
     <xsl:template
         match="em">
         <fo:inline
-            font-style="italic">
+            font-style="italic" id="{@id}">
             <xsl:apply-templates />
         </fo:inline>
     </xsl:template>
     <xsl:template
         match="code">
-        <fo:inline
+        <fo:inline id="{@id}"
             font-family="monospace">
             <xsl:apply-templates />
         </fo:inline>
@@ -804,6 +812,7 @@
             name="color"
             select="//skinconfig/colors/color[@name='warning']/@value" />
         <fo:block
+            id="{@id}"
             margin-left="0.25in"
             margin-right="0.25in"
             padding-left="3pt"
@@ -855,6 +864,7 @@
             name="color"
             select="//skinconfig/colors/color[@name='note']/@value" />
         <fo:block
+            id="{@id}"
             margin-left="0.25in"
             margin-right="0.25in"
             padding-left="3pt"
@@ -907,6 +917,7 @@
             name="color"
             select="//skinconfig/colors/color[@name='fixme']/@value" />
         <fo:block
+            id="{@id}"
             margin-left="0.25in"
             margin-right="0.25in"
             padding-left="3pt"
@@ -1000,16 +1011,10 @@
         match="figure|img">
         <fo:block
             text-align="center">
+            
             <xsl:call-template
                 name="insertPageBreaks" />
-            <xsl:if
-                test="normalize-space(@id)!=''">
-                <xsl:attribute
-                    name="id">
-                    <xsl:value-of
-                        select="@id" />
-                </xsl:attribute>
-            </xsl:if>
+            <xsl:copy-of select="@id"/>
             <!-- Make relative paths absolute -->
             <xsl:variable
                 name="imgpath">
@@ -1141,7 +1146,7 @@
             name="column-width">
             <xsl:value-of
                 select="6.25 div number($max-number-columns)" />in </xsl:variable>
-        <fo:table>
+        <fo:table id="{@id}">
             <fo:table-column>
                 <xsl:attribute
                     name="column-width">
@@ -1184,7 +1189,7 @@
     </xsl:template>
     <xsl:template
         match="tr">
-        <fo:table-row>
+        <fo:table-row id="{@id}">
             <xsl:apply-templates />
         </fo:table-row>
     </xsl:template>
@@ -1196,7 +1201,7 @@
         <xsl:variable
             name="background-color"
             select="$border-color" />
-        <fo:table-cell
+        <fo:table-cell id="{@id}"
             padding-before="4pt"
             padding-after="4pt"
             padding-start="4pt"
@@ -1235,6 +1240,7 @@
             name="background-color"
             select="//skinconfig/colors/color[@name = 'table-cell']/@value" />
         <fo:table-cell
+            id="{@id}"
             padding-before="4pt"
             padding-after="4pt"
             padding-start="4pt"
@@ -1264,7 +1270,8 @@
     </xsl:template>
     <xsl:template
         match="br">
-        <fo:block />
+        <fo:block
+            id="{@id}" />
     </xsl:template>
     <xsl:template
         match="legal">
@@ -1373,12 +1380,13 @@
     <!-- ====================================================================== -->
     <xsl:template
         match="citation">
-        <fo:inline> [<xsl:value-of
+        <fo:inline id="{@id}"> [<xsl:value-of
                 select="@def" />] </fo:inline>
     </xsl:template>
     <xsl:template
         match="p[@class='quote']">
         <fo:block
+            id="{@id}"
             padding="3pt"
             margin="0"
             space-before="4pt"
@@ -1454,6 +1462,9 @@
             </fo:block>
         </xsl:if>
     </xsl:template>
+    
+    
+    
     <!-- ====================================================================== -->
     <!-- Temporary section - subject to change on short notice  -->
     <!-- ====================================================================== -->
@@ -1465,4 +1476,6 @@
    here. To find out why this is done this way, read the comments
    attached to issue FOR-433. -->
     </xsl:template>
+    
+    
 </xsl:stylesheet>



Mime
View raw message