lvstone
(lvstone)
新手上路

初级会员
UID 20213
精华
0
积分 9
帖子 9
金钱 9 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2003-5-27
状态 离线
|
[广告]: q
m
请教:xsl中如何读入html标记的属性
下面是试图读入IMG标记的属性,出错,应如何做???
--------------------------------------test.xml----------------------------------------------
<?xml version='1.0' encoding='??????'?>
<?xml-stylesheet href="test.xsl" type="text/xsl"?>
<pictures>
<pic src="1.bmp" height="21" width="21">
image1
</pic>
<pic src="2.bmp" height="21" width="21">
image2
</pic>
</pictures>
----------------------------------------test.xsl--------------------------------------------------
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="pictures">
<xsl:apply-templates select="pic" />
</xsl:template>
<xsl:template match="pic">
<xsl:value-of select="."/> <BR />
<IMG src="<xsl:value-of select="@src"/>" /> //here error how to do
<BR />
</xsl:template>
</xsl:stylesheet>
|
|