高手在么??急切想问一个关于xml和xsl的问题!!!
我简直要火死了。请高手帮忙!!
xml如下:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="module.xsl"?>
<Keywords>
<Keyword name="userName" origin="dynamic" dynamicSource="Database" script="select userName from Employee where userId='001' " id="3">
<FormProperty tag="input">
<PreTitle titleAttribute="characters">
<Characters>Applicant :</Characters>
</PreTitle>
<Type>text</Type>
<Size>22</Size>
</FormProperty>
<DBProperty>
<Type>varchar</Type>
<Length>50</Length>
<AllowNull>true</AllowNull>
</DBProperty>
</Keyword>
<Keyword name="priority" id="15">
<FormProperty tag="input">
<SufTitle titleAttribute="image">
<Image src="test.gif" width="200" height="50" border="0"/>
</SufTitle>
<Type>text</Type>
<Size>22</Size>
</FormProperty>
<DBProperty>
<Type>varchar</Type>
<Length>50</Length>
<AllowNull>true</AllowNull>
</DBProperty>
</Keyword>
</Keywords>
xsl如下:
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="Keywords">
<html>
<body>
<form name="Vacation" method="post" action="action" accept-charset="gb2312">
<table width="80%" border="1" cellspacing="2" cellpadding="2">
<xsl:apply-templates/>
</table>
</form>
</body>
</html>
</xsl:template>
<xsl:template match="Keyword[@name='userName']">
<tr>
<td>
<xsl:value-of select="Keyword/FormProperty/PreTitle/Characters"/>
</td>
<td>
<xsl:element name="input">
<xsl:attribute name="type">text</xsl:attribute>
<xsl:attribute name="name">id</xsl:attribute>
<xsl:attribute name="value"></xsl:attribute>
</xsl:element>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
为什么用ie浏览器打开该xml,只是空白一片,也不报错!!真要活死了,请高手帮我看看!!