diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2009-10-13 17:13:39 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2009-10-13 17:13:39 +0000 |
commit | 928e650d8c781448ca2c18cb74908592dcadf0bb (patch) | |
tree | bfc2f72708041da23d5960f731f1e01cd8e2209c /src/java | |
parent | 26cd587bf66b2895575a231e8a94d8d1b2721b23 (diff) | |
download | xmlgraphics-fop-928e650d8c781448ca2c18cb74908592dcadf0bb.tar.gz xmlgraphics-fop-928e650d8c781448ca2c18cb74908592dcadf0bb.zip |
Re-format addPtr.xsl to make it readable.
Also add a ptr attribute to fo:table-and-caption and fo:table-caption, even if they are not supported, in order to avoid a crash.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_Accessibility@824845 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/fop/accessibility/addPtr.xsl | 55 |
1 files changed, 43 insertions, 12 deletions
diff --git a/src/java/org/apache/fop/accessibility/addPtr.xsl b/src/java/org/apache/fop/accessibility/addPtr.xsl index f619817cd..35645906a 100644 --- a/src/java/org/apache/fop/accessibility/addPtr.xsl +++ b/src/java/org/apache/fop/accessibility/addPtr.xsl @@ -16,15 +16,46 @@ limitations under the License. --> <!-- $Id$ --> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:foi="http://xmlgraphics.apache.org/fop/internal"> -<xsl:template match="fo:block|fo:block-container"><xsl:call-template name="addPtr"/></xsl:template> -<xsl:template match="fo:list-block|fo:list-item|fo:list-item-label|fo:list-item-body"><xsl:call-template name="addPtr"/></xsl:template> -<xsl:template match="fo:table|fo:table-body|fo:table-header|fo:table-footer|fo:table-row|fo:table-cell"><xsl:call-template name="addPtr"/></xsl:template> -<xsl:template match="fo:inline|fo:wrapper|fo:basic-link|fo:character"><xsl:call-template name="addPtr"/></xsl:template> -<xsl:template match="fo:instream-foreign-object|fo:external-graphic"><xsl:call-template name="addPtr"/></xsl:template> -<xsl:template match="fo:page-number|fo:page-number-citation|fo:page-number-citation-last"><xsl:call-template name="addPtr"/></xsl:template> -<xsl:template match="fo:footnote|fo:footnote-body"><xsl:call-template name="addPtr"/></xsl:template> -<xsl:template match="fo:marker"><xsl:call-template name="addPtr"/></xsl:template> -<xsl:template name="addPtr"><xsl:element name="{name()}" namespace="{namespace-uri()}"><xsl:apply-templates select="@*"/><xsl:attribute name="foi:ptr"><xsl:value-of select="generate-id()"/></xsl:attribute><xsl:apply-templates/></xsl:element></xsl:template> -<xsl:template match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template> -</xsl:stylesheet>
\ No newline at end of file +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:foi="http://xmlgraphics.apache.org/fop/internal"> + <xsl:template match="fo:block|fo:block-container"> + <xsl:call-template name="addPtr"/> + </xsl:template> + <xsl:template match="fo:list-block|fo:list-item|fo:list-item-label|fo:list-item-body"> + <xsl:call-template name="addPtr"/> + </xsl:template> + <xsl:template match="fo:table-and-caption|fo:table-caption|fo:table|fo:table-body|fo:table-header|fo:table-footer|fo:table-row|fo:table-cell"> + <xsl:call-template name="addPtr"/> + </xsl:template> + <xsl:template match="fo:inline|fo:wrapper|fo:basic-link|fo:character"> + <xsl:call-template name="addPtr"/> + </xsl:template> + <xsl:template match="fo:instream-foreign-object|fo:external-graphic"> + <xsl:call-template name="addPtr"/> + </xsl:template> + <xsl:template match="fo:page-number|fo:page-number-citation|fo:page-number-citation-last"> + <xsl:call-template name="addPtr"/> + </xsl:template> + <xsl:template match="fo:footnote|fo:footnote-body"> + <xsl:call-template name="addPtr"/> + </xsl:template> + <xsl:template match="fo:marker"> + <xsl:call-template name="addPtr"/> + </xsl:template> + <xsl:template name="addPtr"> + <xsl:element name="{name()}" namespace="{namespace-uri()}"> + <xsl:apply-templates select="@*"/> + <xsl:attribute name="foi:ptr"> + <xsl:value-of select="generate-id()"/> + </xsl:attribute> + <xsl:apply-templates/> + </xsl:element> + </xsl:template> + <xsl:template match="@*|node()"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> +</xsl:stylesheet> |