mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Preserve text with styles inside lists, discard styles
This commit is contained in:
parent
cb5ee32664
commit
40a89ac81e
@ -86,7 +86,11 @@ Breakers
|
||||
</xsl:template>
|
||||
-->
|
||||
|
||||
<xsl:template name="apply-styles" match="w:r[descendant::strong|descendant::em|descendant::u|descendant::span]">
|
||||
<xsl:template match="w:r[descendant::strong|descendant::em|descendant::u|descendant::span]">
|
||||
<xsl:call-template name="apply-styles"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="apply-styles">
|
||||
<xsl:for-each select="node()|@*[not(w:rPr)]">
|
||||
<xsl:choose>
|
||||
<xsl:when test="descendant::strong|descendant::em|descendant::u|descendant::span" >
|
||||
@ -210,9 +214,23 @@ Breakers
|
||||
<w:t>·</w:t><w:tab/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</w:r><w:r>
|
||||
<w:t><xsl:value-of select="normalize-space(text())" /></w:t>
|
||||
</w:r>
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(child::*)=0">
|
||||
<xsl:variable name="text">
|
||||
<xsl:value-of select="substring-after(text(),' ')"/>
|
||||
</xsl:variable>
|
||||
<w:r><w:t>
|
||||
<xsl:value-of select="normalize-space($text)"/>
|
||||
</w:t></w:r>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- Strip out styles, they would need to be processed-->
|
||||
<w:r><w:t>
|
||||
<xsl:value-of select = "normalize-space(child::*)"/>
|
||||
</w:t></w:r>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</w:p>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
@ -208,9 +208,23 @@ Breakers
|
||||
<w:t>·</w:t><w:tab/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</w:r><w:r>
|
||||
<w:t><xsl:value-of select="normalize-space(text())" /></w:t>
|
||||
</w:r>
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(child::*)=0">
|
||||
<xsl:variable name="text">
|
||||
<xsl:value-of select="substring-after(text(),' ')"/>
|
||||
</xsl:variable>
|
||||
<w:r><w:t>
|
||||
<xsl:value-of select="normalize-space($text)"/>
|
||||
</w:t></w:r>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- Strip out styles, they would need to be processed-->
|
||||
<w:r><w:t>
|
||||
<xsl:value-of select = "normalize-space(child::*)"/>
|
||||
</w:t></w:r>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</w:p>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
Loading…
Reference in New Issue
Block a user