蛙蛙请教:如何把一个xml转换成vml图形呀 很怪事呀,难道只能用dom来访问xml文件来手工创建vml对象吗,不能用一个xslt自动把xml转换成vml图表吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可以直接用XSLT呀怎么用DOM,多此一举哟<?xml version="1.0" encoding="gb2312"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:v="urn:schemas-microsoft-com:vml"> <xsl:template match="/"> <HTML> <HEAD> <STYLE>v\:*{behavior:url(#default#VML);}</STYLE> <TITLE>图表</TITLE> </HEAD> <BODY> <xsl:apply-templates select="votes" /> </BODY> </HTML> </xsl:template> <xsl:template match="votes"> <xsl:for-each select="vote"> <xsl:for-each select="col"> <v:oval style="POSITION:relative ;Z-INDEX:3;LEFT:100px;TOP:250px;width:50;height:50;" fillcolor="{@color}" stroked="f" /> <v:textbox style="POSITION:relative ;Z-INDEX:3;LEFT:100px;TOP:250px;width:50;height:50;" > <xsl:value-of select="@color" /> <xsl:value-of select="@desc" /> <xsl:value-of select="." /> </v:textbox> </xsl:for-each> </xsl:for-each> </xsl:template></xsl:stylesheet> 这样才是真正的图表<?xml version="1.0" encoding="gb2312"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:v="urn:schemas-microsoft-com:vml"> <xsl:template match="/"> <HTML> <HEAD> <STYLE>v\:*{behavior:url(#default#VML);}</STYLE> <TITLE>图表</TITLE> </HEAD> <BODY> <xsl:apply-templates select="votes" /> </BODY> </HTML> </xsl:template> <xsl:template match="votes"> <xsl:for-each select="vote"> <xsl:for-each select="col"> <v:rect style="POSITION:relative ;Z-INDEX:3;LEFT:100px;TOP:250px;width:50;height:{.};" fillcolor="{@color}" stroked="f" />    </xsl:for-each> </xsl:for-each> </xsl:template></xsl:stylesheet> jq使用post提交后返回数据的处理问题 求教:一个JS函数问题 关于css的后代选择器? 如何让一个页面的html内容导入到另一个页面? JavaScript的函数能否返回数组?如果能,请给一个简单的例子,谢谢! *︻$▅▆▇◤ 捉拿高手!一个网页框架问题滚动问题 请大哥们教我一下 onclick="" 谢谢! 关于JS的冲突问题 如何控制只能引用本地图片或网上图片其中之一? 有实现也面保存的代码么?谢谢 怎么样得到页面中iframe当前的路径? 请问怎么打开本地的一个文件
怎么用DOM,多此一举哟<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:v="urn:schemas-microsoft-com:vml">
<xsl:template match="/">
<HTML>
<HEAD>
<STYLE>v\:*{behavior:url(#default#VML);}</STYLE>
<TITLE>图表</TITLE>
</HEAD>
<BODY>
<xsl:apply-templates select="votes" />
</BODY>
</HTML>
</xsl:template>
<xsl:template match="votes">
<xsl:for-each select="vote">
<xsl:for-each select="col">
<v:oval style="POSITION:relative ;Z-INDEX:3;LEFT:100px;TOP:250px;width:50;height:50;" fillcolor="{@color}"
stroked="f" />
<v:textbox style="POSITION:relative ;Z-INDEX:3;LEFT:100px;TOP:250px;width:50;height:50;" >
<xsl:value-of select="@color" />
<xsl:value-of select="@desc" />
<xsl:value-of select="." />
</v:textbox>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:v="urn:schemas-microsoft-com:vml">
<xsl:template match="/">
<HTML>
<HEAD>
<STYLE>v\:*{behavior:url(#default#VML);}</STYLE>
<TITLE>图表</TITLE>
</HEAD>
<BODY>
<xsl:apply-templates select="votes" />
</BODY>
</HTML>
</xsl:template>
<xsl:template match="votes">
<xsl:for-each select="vote">
<xsl:for-each select="col">
<v:rect style="POSITION:relative ;Z-INDEX:3;LEFT:100px;TOP:250px;width:50;height:{.};" fillcolor="{@color}"
stroked="f" />
  
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>