2010-11-12 14:36:53 +00:00
|
|
|
<?xml version="1.0"?>
|
2013-05-03 14:25:37 +00:00
|
|
|
<xsl:stylesheet version="1.0"
|
|
|
|
xmlns:html="http://www.w3.org/1999/xhtml"
|
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
2010-11-12 14:36:53 +00:00
|
|
|
|
|
|
|
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:template match="/">
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:template match="@*|node()">
|
|
|
|
<xsl:copy>
|
|
|
|
<xsl:apply-templates select="@*|node()"/>
|
|
|
|
</xsl:copy>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- resolve b/i/code tags in a first pass, because they interfere with line
|
|
|
|
wrapping in the second pass -->
|
2013-05-03 14:25:37 +00:00
|
|
|
<xsl:template match="html:b">*<xsl:apply-templates/>*</xsl:template>
|
|
|
|
<xsl:template match="html:i">'<xsl:apply-templates/>'</xsl:template>
|
|
|
|
<xsl:template match="html:code">"<xsl:apply-templates/>"</xsl:template>
|
2010-11-12 14:36:53 +00:00
|
|
|
|
2013-07-08 22:37:11 +00:00
|
|
|
<!-- likewise, reformat a tags in first pass -->
|
|
|
|
<xsl:template match="html:a">
|
|
|
|
<xsl:text> </xsl:text><xsl:apply-templates/>
|
|
|
|
<xsl:if test="@href">
|
|
|
|
<xsl:text> <</xsl:text><xsl:value-of select="@href"/>
|
|
|
|
<xsl:text>></xsl:text>
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
2010-11-12 14:36:53 +00:00
|
|
|
</xsl:stylesheet>
|