<?xml-stylesheet type="text/css" href="cd_catalog.css"?>
在 XML 中,有 5 个预定义的实体引用:
< | < | 小于 |
> | > | 大于 |
& | & | 和号 |
' | ' | 省略号 |
" | " | 引号 |
使用 XSLT 显示 XML
<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="simple.xsl"?>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!--
Edited with XML Spy v2007 (http://www.altova.com)
--> <script>f(clean);</script>
-
<
html xsl:version
="
1.0
"
xmlns:xsl
="
http://www.w3.org/1999/XSL/Transform
"
xmlns
="
http://www.w3.org/1999/xhtml
">
-
<
body style
="
font-family:Arial,helvetica,sans-serif;font-size:12pt; background-color:#EEEEEE
">
<
xsl:value-of
select
="
name
" />
</
span
>
-
<
xsl:value-of
select
="
price
" />
</
div
>
<
xsl:value-of
select
="
description
" />
(
<
xsl:value-of
select
="
calories
" />
calories per serving)
</
span
>
</
div
>
</
xsl:for-each
>
</
body
>
</
html
>