Author: ferdinand
Date: Thu Feb 14 06:05:17 2008
New Revision: 627749
URL: http://svn.apache.org/viewvc?rev=627749&view=rev
Log:
improved copying of @id so that no empty id-attributes are created.
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=627749&r1=627748&r2=627749&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
Thu Feb 14 06:05:17 2008
@@ -468,7 +468,6 @@
<xsl:template
match="notice">
<fo:block
- id="[EMAIL PROTECTED]"
font-size="10pt"
text-align="left"
space-before="20pt"
@@ -478,6 +477,7 @@
border-bottom="0.25pt solid"
padding-before="6pt"
padding-after="6pt">
+ <xsl:copy-of select="@id"/>
<xsl:call-template
name="insertPageBreaks" />
<!-- insert i18n stuff here --> NOTICE: <xsl:apply-templates />
@@ -485,8 +485,9 @@
</xsl:template>
<xsl:template
match="anchor">
- <fo:block
- id="[EMAIL PROTECTED]" />
+ <fo:block>
+ <xsl:copy-of select="@id"/>
+ </fo:block>
<xsl:apply-templates />
</xsl:template>
@@ -627,9 +628,9 @@
<xsl:when
test="ancestor::li and not(preceding-sibling::*)">
<fo:block
- id="[EMAIL PROTECTED]"
space-after="4pt"
font-family="serif">
+ <xsl:copy-of select="@id"/>
<xsl:call-template
name="insertPageBreaks" />
<xsl:apply-templates />
@@ -638,10 +639,10 @@
<xsl:otherwise>
<fo:block
- id="[EMAIL PROTECTED]"
space-before="4pt"
space-after="4pt"
font-family="serif">
+ <xsl:copy-of select="@id"/>
<xsl:call-template
name="insertPageBreaks" />
<xsl:apply-templates />
@@ -655,7 +656,6 @@
name="color"
select="//skinconfig/colors/[EMAIL PROTECTED]'code']/@value" />
<fo:block
- id="[EMAIL PROTECTED]"
font-family="monospace"
font-size="8pt"
padding="6pt"
@@ -666,6 +666,7 @@
white-space-treatment="preserve"
wrap-option="wrap"
text-align="start">
+ <xsl:copy-of select="@id"/>
<xsl:call-template
name="insertPageBreaks" />
<xsl:apply-templates />
@@ -674,10 +675,10 @@
<xsl:template
match="ol|ul">
<fo:list-block
- id="[EMAIL PROTECTED]"
provisional-distance-between-starts="18pt"
provisional-label-separation="3pt"
text-align="start">
+ <xsl:copy-of select="@id"/>
<xsl:apply-templates />
</fo:list-block>
</xsl:template>
@@ -711,7 +712,8 @@
unfortunately allows -->
<xsl:template
match="ul/ul | ul/ol | ol/ul | ol/ol">
- <fo:list-item id="[EMAIL PROTECTED]">
+ <fo:list-item>
+ <xsl:copy-of select="@id"/>
<fo:list-item-label
end-indent="label-end()">
<fo:block />
@@ -749,16 +751,18 @@
</xsl:template>
<xsl:template
match="dl">
- <fo:list-block id="[EMAIL PROTECTED]"
+ <fo:list-block
provisional-distance-between-starts="18pt"
provisional-label-separation="3pt"
text-align="start">
+ <xsl:copy-of select="@id"/>
<xsl:apply-templates />
</fo:list-block>
</xsl:template>
<xsl:template
match="dt">
- <fo:list-item id="[EMAIL PROTECTED]">
+ <fo:list-item>
+ <xsl:copy-of select="@id"/>
<fo:list-item-label
end-indent="label-end()">
<fo:block />
@@ -774,7 +778,8 @@
</xsl:template>
<xsl:template
match="dd">
- <fo:list-item id="[EMAIL PROTECTED]">
+ <fo:list-item>
+ <xsl:copy-of select="@id"/>
<fo:list-item-label
end-indent="label-end()">
<fo:block />
@@ -790,22 +795,24 @@
<xsl:template
match="strong">
<fo:inline
- id="[EMAIL PROTECTED]"
font-weight="bold">
+ <xsl:copy-of select="@id"/>
<xsl:apply-templates />
</fo:inline>
</xsl:template>
<xsl:template
match="em">
<fo:inline
- font-style="italic" id="[EMAIL PROTECTED]">
+ font-style="italic">
+ <xsl:copy-of select="@id"/>
<xsl:apply-templates />
</fo:inline>
</xsl:template>
<xsl:template
match="code">
- <fo:inline id="[EMAIL PROTECTED]"
+ <fo:inline
font-family="monospace">
+ <xsl:copy-of select="@id"/>
<xsl:apply-templates />
</fo:inline>
</xsl:template>
@@ -815,7 +822,6 @@
name="color"
select="//skinconfig/colors/[EMAIL PROTECTED]'warning']/@value" />
<fo:block
- id="[EMAIL PROTECTED]"
margin-left="0.25in"
margin-right="0.25in"
padding-left="3pt"
@@ -830,6 +836,7 @@
border-color="{$color}"
background-color="{$color}"
color="#ffffff">
+ <xsl:copy-of select="@id"/>
<xsl:call-template
name="insertPageBreaks" />
<xsl:choose>
@@ -867,7 +874,6 @@
name="color"
select="//skinconfig/colors/[EMAIL PROTECTED]'note']/@value" />
<fo:block
- id="[EMAIL PROTECTED]"
margin-left="0.25in"
margin-right="0.25in"
padding-left="3pt"
@@ -882,6 +888,7 @@
border-end-style="solid"
border-color="{$color}"
background-color="{$color}">
+ <xsl:copy-of select="@id"/>
<xsl:call-template
name="insertPageBreaks" />
<xsl:choose>
@@ -920,7 +927,6 @@
name="color"
select="//skinconfig/colors/[EMAIL PROTECTED]'fixme']/@value" />
<fo:block
- id="[EMAIL PROTECTED]"
margin-left="0.25in"
margin-right="0.25in"
padding-left="3pt"
@@ -935,6 +941,7 @@
border-end-style="solid"
border-color="{$color}"
background-color="{$color}">
+ <xsl:copy-of select="@id"/>
<xsl:call-template
name="insertPageBreaks" />
<!-- insert i18n stuff here --> FIXME (<xsl:value-of
@@ -971,6 +978,7 @@
color="{$color}"
text-decoration="underline"
internal-destination="{substring(@href,2)}">
+ <xsl:copy-of select="@id"/>
<xsl:apply-templates />
</fo:basic-link>
</xsl:when>
@@ -1002,6 +1010,7 @@
color="{$color}"
text-decoration="underline"
external-destination="{$href}">
+ <xsl:copy-of select="@id"/>
<xsl:apply-templates />
</fo:basic-link>
<xsl:if
@@ -1149,7 +1158,8 @@
name="column-width">
<xsl:value-of
select="6.25 div number($max-number-columns)" />in
</xsl:variable>
- <fo:table id="[EMAIL PROTECTED]" table-layout="fixed" width="100%">
+ <fo:table table-layout="fixed" width="100%">
+ <xsl:copy-of select="@id"/>
<fo:table-column>
<xsl:attribute
name="column-width">
@@ -1192,7 +1202,8 @@
</xsl:template>
<xsl:template
match="tr">
- <fo:table-row id="[EMAIL PROTECTED]">
+ <fo:table-row>
+ <xsl:copy-of select="@id"/>
<xsl:apply-templates />
</fo:table-row>
</xsl:template>
@@ -1204,7 +1215,7 @@
<xsl:variable
name="background-color"
select="$border-color" />
- <fo:table-cell id="[EMAIL PROTECTED]"
+ <fo:table-cell
padding-before="4pt"
padding-after="4pt"
padding-start="4pt"
@@ -1212,6 +1223,7 @@
color="#FFFFFF"
background-color="{$background-color}"
border="1pt solid {$border-color}">
+ <xsl:copy-of select="@id"/>
<xsl:if
test="@colspan!=''">
<xsl:attribute
@@ -1243,13 +1255,13 @@
name="background-color"
select="//skinconfig/colors/[EMAIL PROTECTED] =
'table-cell']/@value" />
<fo:table-cell
- id="[EMAIL PROTECTED]"
padding-before="4pt"
padding-after="4pt"
padding-start="4pt"
padding-end="4pt"
background-color="{$background-color}"
border="1pt solid {$border-color}">
+ <xsl:copy-of select="@id"/>
<xsl:if
test="@colspan!=''">
<xsl:attribute
@@ -1273,8 +1285,9 @@
</xsl:template>
<xsl:template
match="br">
- <fo:block
- id="[EMAIL PROTECTED]" />
+ <fo:block>
+ <xsl:copy-of select="@id"/>
+ </fo:block>
</xsl:template>
<xsl:template
match="legal">
@@ -1383,13 +1396,12 @@
<!--
====================================================================== -->
<xsl:template
match="citation">
- <fo:inline id="[EMAIL PROTECTED]"> [<xsl:value-of
+ <fo:inline><xsl:copy-of select="@id"/> [<xsl:value-of
select="@def" />] </fo:inline>
</xsl:template>
<xsl:template
match="[EMAIL PROTECTED]'quote']">
<fo:block
- id="[EMAIL PROTECTED]"
padding="3pt"
margin="0"
space-before="4pt"
@@ -1397,6 +1409,7 @@
background-color="#f0f0f0"
font-family="serif"
font-style="italic">
+ <xsl:copy-of select="@id"/>
<xsl:call-template
name="insertPageBreaks" />
<xsl:apply-templates />