新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     >>计算机科学论坛<<     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 本版讨论SVG, GML, X3D, VRML, VML, XAML, AVALON, Batik等基于XML的图形技术,以及有关GIS的应用。
    [返回] 计算机科学论坛XML.ORG.CN讨论区 - 高级XML应用『 SVG/GML/VRML/X3D/XAML 』 → 关于xml使用xslt样式显示VML代码的问题 求救! 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 3512 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: 关于xml使用xslt样式显示VML代码的问题 求救! 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     luozhifeng 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:2
      积分:64
      门派:XML.ORG.CN
      注册:2006/7/24

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给luozhifeng发送一个短消息 把luozhifeng加入好友 查看luozhifeng的个人资料 搜索luozhifeng在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 引用回复这个贴子 回复这个贴子 查看luozhifeng的博客楼主
    发贴心情 关于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的样式 郁闷啊

       收藏   分享  
    顶(0)
      




    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2006/8/3 23:58:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2025/7/18 17:20:02

    本主题贴数1,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    42.969ms