XSL cleanups

This commit is contained in:
Kovid Goyal 2013-04-05 08:28:54 +05:30
parent c680f51d52
commit 12b5fbf81f

View File

@ -357,7 +357,7 @@
<xsl:apply-templates/> <xsl:apply-templates/>
</xsl:template> </xsl:template>
<xsl:template match="rtf:table"> <xsl:template match="rtf:table">
<xsl:element name="table"> <xsl:element name="table">
<xsl:attribute name="id"> <xsl:attribute name="id">
<xsl:value-of select="generate-id(.)"/> <xsl:value-of select="generate-id(.)"/>
@ -390,7 +390,6 @@
<xsl:output method = "xml"/> <xsl:output method = "xml"/>
<xsl:key name="style-types" match="rtf:paragraph-definition" use="@style-number"/> <xsl:key name="style-types" match="rtf:paragraph-definition" use="@style-number"/>
@ -415,13 +414,11 @@
</xsl:template> </xsl:template>
<xsl:template match="rtf:page-break"> <xsl:template match="rtf:page-break">
<xsl:element name="br"> <br style = "page-break-after:always"/>
<xsl:attribute name="style">page-break-after:always</xsl:attribute>
</xsl:element>
</xsl:template> </xsl:template>
<xsl:template match="rtf:hardline-break"> <xsl:template match="rtf:hardline-break">
<xsl:element name="br"/> <br/>
</xsl:template> </xsl:template>
<xsl:template match="rtf:rtf-definition|rtf:font-table|rtf:color-table|rtf:style-table|rtf:page-definition|rtf:list-table|rtf:override-table|rtf:override-list|rtf:list-text"/> <xsl:template match="rtf:rtf-definition|rtf:font-table|rtf:color-table|rtf:style-table|rtf:page-definition|rtf:list-table|rtf:override-table|rtf:override-list|rtf:list-text"/>
@ -445,7 +442,7 @@
</xsl:template> </xsl:template>
<xsl:template match = "rtf:field-block"> <xsl:template match = "rtf:field-block">
<xsl:apply-templates/> <xsl:apply-templates/>
</xsl:template> </xsl:template>
<xsl:template match = "rtf:field[@type='hyperlink']"> <xsl:template match = "rtf:field[@type='hyperlink']">
@ -472,9 +469,7 @@
</xsl:template> </xsl:template>
<xsl:template match="rtf:pict"> <xsl:template match="rtf:pict">
<xsl:element name="img"> <img src = "{@num}"/>
<xsl:attribute name="src"><xsl:value-of select="@num" /></xsl:attribute>
</xsl:element>
</xsl:template> </xsl:template>
<xsl:template match="*"> <xsl:template match="*">