⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xml2rtf.xsl

📁 GSview 4.6 PostScript previewer。Ghostscript在MS-Windows, OS/2 and Unix下的图形化接口
💻 XSL
字号:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

<!-- 
 Convert GSview XML help to RTF for Windows Help.
 This requires some strict formatting of the XML file
 to avoid duplicate spaces in the RTF file.
-->


<!-- remove html tags -->
<xsl:output method="text" />

<xsl:template match="/">{\rtf1\ansi \deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fmodern Courier New;}}
<xsl:apply-templates />	
}
</xsl:template>

<xsl:template match="help">
<xsl:apply-templates select="topic"/>	
</xsl:template>

<xsl:template match="topic">
{<xsl:apply-templates select="browse" />
${\footnote $ <xsl:value-of select="name" />}
{\b \fs24 <xsl:value-of select="name" />}\plain\par
#{\footnote # <xsl:value-of select="@id" />}
<xsl:for-each select="key">K{\footnote K <xsl:value-of select="." />}</xsl:for-each>
<xsl:apply-templates select="body" />	
<xsl:for-each select="topic">
\par{\uldb <xsl:value-of select="name" />}{\v <xsl:value-of select="@id" />}</xsl:for-each>
}{\plain \page}
<xsl:apply-templates select="topic" />	
</xsl:template>

<xsl:template match="body">
<xsl:apply-templates />
</xsl:template>

<xsl:template match="p">
\par
\pard \plain \qj \fs20 \f0
<xsl:apply-templates />
\par
</xsl:template>

<xsl:template match="b">{\b <xsl:apply-templates />}</xsl:template>

<xsl:template match="fixed">
{\f1 \fs20 <xsl:apply-templates />}
</xsl:template>

<xsl:template match="file">
{\b <xsl:apply-templates />}
</xsl:template>

<xsl:template match="link">
{\b <xsl:apply-templates />}
</xsl:template>

<!--
<xsl:template match="browse">
+{\footnote + <xsl:apply-templates />}</xsl:template>
-->
<xsl:template match="browse">
+{\footnote + <xsl:number level="multiple" count="topic" format="01." />}</xsl:template>


</xsl:stylesheet>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -