?? 5.txt
字號:
例程5-1
<?xml-stylesheet type="text/xml" href="#style1"?>
<doc>
<head>
<xsl:stylesheet id="style1" version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:import href="doc.xsl"/>
<xsl:template match="id(''''foo'''')">
<fo:block font-weight="bold">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="xsl:stylesheet">
<!-- ignore -->
</xsl:template>
</xsl:stylesheet>
</head>
<body>
<para id="foo">
...
</para>
</body>
</doc>
例程5-2
<?xml version="1.0"?>
<investment>
<type>stock</type>
<name>Microsoft</name>
<price type="high">100</price>
<price type="low">94</price>
</investment>
例程5-3
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="investment">
<xsl:element name="{type}">
<xsl:attribute name="name" >
<xsl:value-of select="name"/>
</xsl:attribute>
<xsl:for-each select="price">
<xsl:attribute name="{@type}" >
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:for-each>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -