以文本方式查看主题 - 中文XML论坛 - 专业的XML技术讨论区 (http://bbs.xml.org.cn/index.asp) -- 『 SVG/GML/VRML/X3D/XAML 』 (http://bbs.xml.org.cn/list.asp?boardid=21) ---- 求gmltosvg的xsl (http://bbs.xml.org.cn/dispbbs.asp?boardid=21&rootid=&id=12255) |
-- 作者:molester -- 发布时间:11/23/2004 3:22:00 PM -- 求gmltosvg的xsl 谁有这方面的资料啊? |
-- 作者:wenmier -- 发布时间:12/9/2004 3:02:00 PM -- 自己写吧,哪有现成的呀? |
-- 作者:wenmier -- 发布时间:12/13/2004 9:16:00 AM -- 这里有一个,看看改改能不能用: <?xml version="1.0" encoding="UTF-8"?> <xsl:transform xmlns:xsl="http:\\www.w3.org\1999\XSL\Transform" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:pre1="http://www.opengis.net/examples" xmlns:gml="http://www.opengis.net/gml"> <xsl:output method="xml" doctype-system="http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd " doctype-public="-//W3C//DTD SVG 20000303 Stylable//EN"/> <xsl:variable name="viewBox Value"> <xsl:value-of select="fn:tokenize(*/gml:boundedBy/gml:Box/gml:coordinates)"/> </xsl:variable> <xsl:template match="/"> <xsl:element name="svg"> <xsl:attribute name="viewBox"><xsl:value-of select="$viewBoxValue"/></xsl:attribute> <!--apply template to each GML geometry property--> <xsl:apply-templates select="//pre1:cityMember/gml:centerLineOf"/> </xsl:element> </xsl:template> <xsl:template match="pre1:cityMember/gml:centerLineOf"> <xsl:element name="path"> <xsl:attribute name="style">stroke-width:fill:none;stroke:rgb(69,34,118);</xsl:attribute> <xsl:attribute name="d"><xsl:value-of select="fn:tokenize(./gml:coordinates)"/> </xsl:attribute> </xsl:element> </xsl:template> </xsl:transform> |
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
78.125ms |