使用 xsl:attribute和 xsl:element

<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template math="/">
<html>
<head>
<style>
.b

  
   
  filter:invert();
}
</style>
</head>
<body>

<h3 align="center">使用 xsl:attribute和 xsl:element  <hr/></h3>
<div class="b">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="X_Agent/机构主页"/>
</xsl:attribute>

<xsl:element name="img">
<xsl:attribute name="src">
<xsl:value-of select="X_Agent/机构标志"/>
</xsl:attribute>
</xsl:element>
</xsl:element>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet


<?xml version="1.0" encoding="gb2312"?>
<?xml-stylesheet type="text/xsl" href="attribute.xsl"?>
<X_Agent>
<机构名称>X_Agent</机构名称>
<机构标志>gw.bmp</机构标志>
<机构主页>http://www.csdn.net</机构主页>
</X_Agent>

posted on 2005-04-27 10:18  gwazy  阅读(1308)  评论(0编辑  收藏  举报

导航