以文本方式查看主题 - 中文XML论坛 - 专业的XML技术讨论区 (http://bbs.xml.org.cn/index.asp) -- 『 SVG/GML/VRML/X3D/XAML 』 (http://bbs.xml.org.cn/list.asp?boardid=21) ---- 关于xml使用xslt样式显示VML代码的问题 求救! (http://bbs.xml.org.cn/dispbbs.asp?boardid=21&rootid=&id=36372) |
-- 作者:luozhifeng -- 发布时间:8/3/2006 11:58:00 PM -- 关于xml使用xslt样式显示VML代码的问题 求救! 小弟刚刚才学习XML 希望大虾们指点! WorkFlowData.xml ==================================== <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="WorkFlow.xslt"?> <Flow> <OnlySp_FlowDetail> <FlowBaseID>0</FlowBaseID> <DepartID>0</DepartID> <Name>开始节点</Name> <PriDepID> </PriDepID> <LimiteDate>0</LimiteDate> <PosX>1000px</PosX> <PosY>1400px</PosY> </OnlySp_FlowDetail> <OnlySp_FlowDetail> <FlowBaseID>0</FlowBaseID> <DepartID>-1</DepartID> <Name>结否节点</Name> <PriDepID> </PriDepID> <LimiteDate>0</LimiteDate> <PosX>5000px</PosX> <PosY>1400px</PosY> </OnlySp_FlowDetail> </Flow> =============================================== WorkFlow.xslt =============================================== <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:v="urn:schemas-microsoft-com:vml" version="1.0" > <xsl:template match="WorkFlow"> <xsl:apply-templates select="WorkFlowItem" /> <xsl:apply-templates select="Relation" /> </xsl:template> <xsl:template match="WorkFlowItem"> <xsl:element name="v:Group"> <xsl:attribute name="id">WorkFlowItemGroup</xsl:attribute> <xsl:attribute name="Style">WIDTH: 1000px; POSITION: absolute; HEIGHT: 500px;Left:<xsl:value-of select="PosX" />;Top:<xsl:value-of select="PosY" />;Z-Index:9000</xsl:attribute> <xsl:attribute name="coordsize">1000,500</xsl:attribute> <xsl:element name="v:rect"> <xsl:attribute name="id"> <xsl:value-of select="ItemID" /> </xsl:attribute> <xsl:attribute name="class">WorkFlowItem</xsl:attribute> <xsl:attribute name="style">position:absolute;WIDTH:1000px;HEIGHT:500px;</xsl:attribute> <xsl:attribute name="Title"><xsl:value-of select="LimiteDate" /></xsl:attribute> <xsl:attribute name="DepName"><xsl:value-of select="Name" /></xsl:attribute> <xsl:attribute name="LimiteDate"><xsl:value-of select="LimiteDate" /></xsl:attribute> <xsl:element name="v:fill"> <xsl:attribute name="type">Gradient</xsl:attribute> <xsl:attribute name="color">red</xsl:attribute> <xsl:attribute name="color2">yellow</xsl:attribute> <xsl:attribute name="angle">0</xsl:attribute> <xsl:attribute name="method">sigma</xsl:attribute> </xsl:element> <xsl:element name="v:shadow"> <xsl:attribute name="on">t</xsl:attribute> <xsl:attribute name="color">black</xsl:attribute> <xsl:attribute name="type">perspective</xsl:attribute> <xsl:attribute name="opacity">0.3</xsl:attribute> <xsl:attribute name="offset">2pt,3pt"</xsl:attribute> </xsl:element> <xsl:element name="v:TextBox"> <xsl:value-of select="Name" /> </xsl:element> <xsl:element name="v:stroke"> <xsl:attribute name="color">#5082B9</xsl:attribute> </xsl:element> </xsl:element> <xsl:element name="v:line"> <xsl:attribute name="Refid"><xsl:value-of select="ItemID" /></xsl:attribute> <xsl:attribute name="class">EndLine</xsl:attribute> <xsl:attribute name="Style">cursor:hand</xsl:attribute> <xsl:attribute name="from">1000,250</xsl:attribute> <xsl:attribute name="to">1150,250</xsl:attribute> <xsl:element name="v:stroke"> <xsl:attribute name="color">black</xsl:attribute> <xsl:attribute name="EndArrow">classic</xsl:attribute> </xsl:element> </xsl:element> <xsl:element name="v:line"> <xsl:attribute name="Refid"><xsl:value-of select="ItemID" /></xsl:attribute> <xsl:attribute name="class">StartLine</xsl:attribute> <xsl:attribute name="Style">Cursor:cross</xsl:attribute> <xsl:attribute name="from">-100,250</xsl:attribute> <xsl:attribute name="to">0,250</xsl:attribute> <xsl:element name="v:stroke"> <xsl:attribute name="color">black</xsl:attribute> <xsl:attribute name="StartArrow">oval</xsl:attribute> </xsl:element> </xsl:element> </xsl:element> </xsl:template> <xsl:template match="Relation"> <xsl:element name="v:polyline"> <xsl:attribute name="id">ConnectLine</xsl:attribute> <xsl:attribute name="class">NormalLine</xsl:attribute> <xsl:attribute name="style">Z-Index:-1</xsl:attribute> <xsl:attribute name="BeginShape"> <xsl:value-of select="MasterItem" /> </xsl:attribute> <xsl:attribute name="EndShape"> <xsl:value-of select="SecondItem" /> </xsl:attribute> <xsl:attribute name="points">0,0,10,10</xsl:attribute> <xsl:element name="v:stroke"> <xsl:attribute name="color">blue</xsl:attribute> <xsl:attribute name="EndArrow">classic</xsl:attribute> </xsl:element> </xsl:element> </xsl:template> </xsl:stylesheet> ==================================================== WorkFlowData.xml 怎么都不能使用到那xslt的样式 郁闷啊 |
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
78.125ms |