📄 clean.xsl
字号:
<?xml version="1.0"?><!-- Copyright (C) 2006 Ferdinand Prantl <prantl@users.sourceforge.net> -->
<!-- All rights reserved. -->
<!-- -->
<!-- This work is licensed under a Creative Commons Attribution 2.5 --><!-- License. See the attached file LICENSE for more information. --><!-- See also http://creativecommons.org/licenses/by/2.5/. --><!-- -->
<!-- See http://domino-javadoc.sourceforge.net for the most recent version -->
<!-- and more information. -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="utf-8" />
<xsl:template match="description | table | row | cell | see">
<xsl:element name="{name()}">
<xsl:apply-templates />
</xsl:element>
</xsl:template>
<xsl:template match="paragraph">
<xsl:apply-templates select="*" />
</xsl:template>
<xsl:template match="code">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="paragraph[code]">
<xsl:if test="not(preceding-sibling::paragraph[1]/code)">
<xsl:text disable-output-escaping="yes"><code></xsl:text>
</xsl:if>
<xsl:apply-templates select="*" />
<xsl:if test="not(following-sibling::paragraph[1]/code)">
<xsl:text disable-output-escaping="yes"></code></xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="paragraph[item]">
<xsl:if test="not(preceding-sibling::paragraph[1]/item)">
<xsl:text disable-output-escaping="yes"><list>
</xsl:text>
</xsl:if>
<xsl:apply-templates select="*" />
<xsl:if test="not(following-sibling::paragraph[1]/item)">
<xsl:text disable-output-escaping="yes">
</list></xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="text">
<xsl:if test="not(preceding-sibling::text)">
<xsl:element name="{name()}">
<xsl:apply-templates select="../text" mode="join" />
</xsl:element>
</xsl:if>
</xsl:template>
<xsl:template match="title">
<xsl:if test="not(preceding-sibling::title)">
<xsl:element name="{name()}">
<xsl:apply-templates select="../title" mode="join" />
</xsl:element>
</xsl:if>
</xsl:template>
<xsl:template match="item">
<xsl:if test="not(preceding-sibling::item)">
<xsl:element name="{name()}">
<xsl:apply-templates select="../item" mode="join" />
</xsl:element>
</xsl:if>
</xsl:template>
<xsl:template match="item | text | title" mode="join">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="link">
<xsl:element name="{name()}">
<xsl:attribute name="id"><xsl:value-of select="@id" /></xsl:attribute>
<xsl:apply-templates />
</xsl:element>
</xsl:template>
</xsl:stylesheet>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -