***************************************************
price.xml
***************************************************<?xml version="1.0" encoding="gb2312"?>
<?xml-stylesheet type="text/xsl" href="Price.xsl"?>
<!DOCTYPE ProductPrice [
<!ELEMENT ProductPrice ((PriceInfo)+)>
<!ELEMENT PriceInfo (Number,Person,Price,MyTime)>
<!ELEMENT Number (#PCDATA)>
<!ELEMENT Person (#PCDATA)>
<!ELEMENT Price (#PCDATA)>
<!ELEMENT MyTime (#PCDATA)>
]>
<ProductPrice>
<PriceInfo>
<Number>1</Number>
<Person>游客</Person>
<Price>导购币</Price>
<MyTime>2005-10-9</MyTime>
</PriceInfo>
<PriceInfo>
<Number>1</Number>
<Person>游客</Person>
<Price>导购币</Price>
<MyTime>2005-10-9</MyTime>
</PriceInfo>
</ProductPrice>********************************************************************
price.xsl
********************************************************************
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<html>
<head>
<title></title>
</head>
<body>
<table border="1" width="500">
<tbody>
<tr>
<td>编号</td>
<td>上传人</td>
<td>价格</td>
<td>上传时间</td>
</tr>
<xsl:for-each select="ProductPrice/*">
<tr>
<xsl:apply-templates/>
</tr>
</xsl:for-each>
</tbody>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="Number">
<td height="100" bgcolor="#645ACB">
<xsl:value-of select="Number"></xsl:value-of>
</td>
</xsl:template>
<xsl:template match="Person">
<td height="100" bgcolor="#AD5ACB">
<xsl:value-of select="Person"></xsl:value-of>
</td>
</xsl:template>
<xsl:template match="Price">
<td height="100" bgcolor="#125ACB">
<xsl:value-of select="Price"></xsl:value-of>
</td>
</xsl:template>
<xsl:template match="MyTime">
<td height="100" bgcolor="#F453CB">
<xsl:value-of select="MyTime"></xsl:value-of>
</td>
</xsl:template>
</xsl:stylesheet>