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

    >> 本版讨论XSL,XSLT,XSL-FO,CSS等技术
    [返回] 中文XML论坛 - 专业的XML技术讨论区XML.ORG.CN讨论区 - XML技术『 XSL/XSLT/XSL-FO/CSS 』 → xml文件经翻译后页面显示完成但是空白没有东东是怎么回事? 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 4488 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: xml文件经翻译后页面显示完成但是空白没有东东是怎么回事? 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     Cindylm 美女呀,离线,快来找我吧!
      
      
      等级:大一(猛啃高等数学)
      文章:19
      积分:120
      门派:XML.ORG.CN
      注册:2004/4/25

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给Cindylm发送一个短消息 把Cindylm加入好友 查看Cindylm的个人资料 搜索Cindylm在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 引用回复这个贴子 回复这个贴子 查看Cindylm的博客楼主
    发贴心情 xml文件经翻译后页面显示完成但是空白没有东东是怎么回事?

    我的xml文件用xsl文件翻译后,用IE打开,结果没有错误信息,浏览器下方显示完成,但是页面空白,我想要显示的文字,按钮都没有,这是为什么那?

       收藏   分享  
    顶(0)
      




    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2004/4/28 20:48:00
     
     admin 帅哥哟,离线,有人找我吗?
      
      
      
      威望:9
      头衔:W3China站长
      等级:计算机硕士学位(管理员)
      文章:5255
      积分:18406
      门派:W3CHINA.ORG
      注册:2003/10/5

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给admin发送一个短消息 把admin加入好友 查看admin的个人资料 搜索admin在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 点击这里发送电邮给admin  访问admin的主页 引用回复这个贴子 回复这个贴子 查看admin的博客2
    发贴心情 
    因为代码写错了呗..

    贴出来让大家给你找找问题吧

    ----------------------------------------------

    -----------------------------------------------

    第十二章第一节《用ROR创建面向资源的服务》
    第十二章第二节《用Restlet创建面向资源的服务》
    第三章《REST式服务有什么不同》
    InfoQ SOA首席编辑胡键评《RESTful Web Services中文版》
    [InfoQ文章]解答有关REST的十点疑惑

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2004/4/29 0:30:00
     
     Cindylm 美女呀,离线,快来找我吧!
      
      
      等级:大一(猛啃高等数学)
      文章:19
      积分:120
      门派:XML.ORG.CN
      注册:2004/4/25

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给Cindylm发送一个短消息 把Cindylm加入好友 查看Cindylm的个人资料 搜索Cindylm在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 引用回复这个贴子 回复这个贴子 查看Cindylm的博客3
    发贴心情 
    xml文件:
    <?xml version="1.0" encoding="GB2312"?>
    <?xml:stylesheet type="text/xsl" href="component.xsl"?>
    <page>
     <head>
      <title>组件测试</title>
     </head>
     <body>
      <bgcolor>#66CCFF</bgcolor>

      <component>
       
       <ButtonType>
        <id>button1</id>
        <value>提示</value>
        <type>button</type>
        <onclickevent>have()</onclickevent>
       </ButtonType>
      </component>

      <component>
       
       <StaticTextType>
        <id>text1</id>
        <size>6</size>
        <content>测试成功</content>
       </StaticTextType>
      </component>

     </body>

    </page>

    xsl文件:
    <?xml version="1.0" encoding="GB2312"?>

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <!--根模板-->
    <xsl:template match="/">
     <html>
       <head>
        <title><xsl:value-of select="title"/></title>
       </head>
       
      
      
       <xsl:apply-templates select="body"/>
      
     </html>
    </xsl:template>

    <!--body模板-->
    <xsl:template match="body">
     <body>
     <bgcolor><xsl:value-of select="bgcolor"/></bgcolor>
     <xsl:apply-templates select="component"/>
     </body>
    </xsl:template>

    <!--component模板-->
    <xsl:template match="component">
        <xsl:for-each  select="*">
            <xsl:choose>
                 <xsl:when test="starts-with(.,'Button')">
      <xsl:apply-templates  select="ButtonType"/>
                 </xsl:when>
                 <xsl:when test="starts-with(.,'StaticText')">
      <xsl:apply-templates  select=" StaticTextType"/>
                 </xsl:when>
            </xsl:choose>
        </xsl:for-each>
    </xsl:template>

    <!--button模板-->
    <xsl:template match="ButtonType">
       <xsl:element name="input">
           <xsl:attribute name="name"><xsl:value-of select="id"/>
           </xsl:attribute>
          <xsl:attribute name="type"><xsl:value-of select="type"/>
          </xsl:attribute>
          <xsl:attribute name="value"><xsl:value-of select="value"/>
          </xsl:attribute>
       </xsl:element>
    </xsl:template>

    <!--Text模板-->
    <xsl:template match="StaticTextType">
       <xsl:element name="input">
           <xsl:attribute name="name"><xsl:value-of select="id"/>
           </xsl:attribute>
          <xsl:attribute name="size"><xsl:value-of select="size"/>
          </xsl:attribute>
          <xsl:attribute name="value"><xsl:value-of select="content"/>
          </xsl:attribute>
       </xsl:element>
    </xsl:template>

    </xsl:stylesheet>

    问题出在哪儿呢。。。?

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2004/4/29 9:15:00
     
     sam 帅哥哟,离线,有人找我吗?
      
      
      头衔:日夜灌水W3C
      等级:大三暑假(ITELS考了7分!)
      文章:198
      积分:969
      门派:XML.ORG.CN
      注册:2004/3/24

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给sam发送一个短消息 把sam加入好友 查看sam的个人资料 搜索sam在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 访问sam的主页 引用回复这个贴子 回复这个贴子 查看sam的博客4
    发贴心情 
    <?xml version="1.0" encoding="GB2312"?>

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <!--根模板-->
    <xsl:template match="/">
    <html>
       <head>
        <title><xsl:value-of select="//title"/></title>
       </head>
       
      
      
       <xsl:apply-templates select="//body"/>
      
    </html>
    </xsl:template>

    <!--body模板-->
    <xsl:template match="body">
    <body>
    <bgcolor><xsl:value-of select="bgcolor"/></bgcolor>
    <xsl:apply-templates select="component"/>
    </body>
    </xsl:template>

    <!--component模板-->
    <xsl:template match="component">
        <xsl:for-each  select="*">
            <xsl:choose>
                 <xsl:when test="starts-with(.,'Button')">
      <xsl:apply-templates  select="ButtonType"/>
                 </xsl:when>
                 <xsl:when test="starts-with(.,'StaticText')">
      <xsl:apply-templates  select=" StaticTextType"/>
                 </xsl:when>
            </xsl:choose>
        </xsl:for-each>
    </xsl:template>

    <!--button模板-->
    <xsl:template match="ButtonType">
       <xsl:element name="input">
           <xsl:attribute name="name"><xsl:value-of select="id"/>
           </xsl:attribute>
          <xsl:attribute name="type"><xsl:value-of select="type"/>
          </xsl:attribute>
          <xsl:attribute name="value"><xsl:value-of select="value"/>
          </xsl:attribute>
       </xsl:element>
    </xsl:template>

    <!--Text模板-->
    <xsl:template match="StaticTextType">
       <xsl:element name="input">
           <xsl:attribute name="name"><xsl:value-of select="id"/>
           </xsl:attribute>
          <xsl:attribute name="size"><xsl:value-of select="size"/>
          </xsl:attribute>
          <xsl:attribute name="value"><xsl:value-of select="content"/>
          </xsl:attribute>
       </xsl:element>
    </xsl:template>

    </xsl:stylesheet>

    ----------------------------------------------
    http://www.xml.org.cn/uploadFace/3819_20044191991837196.gif^_^

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2004/4/29 11:59:00
     
     Cindylm 美女呀,离线,快来找我吧!
      
      
      等级:大一(猛啃高等数学)
      文章:19
      积分:120
      门派:XML.ORG.CN
      注册:2004/4/25

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给Cindylm发送一个短消息 把Cindylm加入好友 查看Cindylm的个人资料 搜索Cindylm在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 引用回复这个贴子 回复这个贴子 查看Cindylm的博客5
    发贴心情 
    标题显示的出来,但是页面仍然是空白的
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2004/4/29 15:04:00
     
     sam 帅哥哟,离线,有人找我吗?
      
      
      头衔:日夜灌水W3C
      等级:大三暑假(ITELS考了7分!)
      文章:198
      积分:969
      门派:XML.ORG.CN
      注册:2004/3/24

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给sam发送一个短消息 把sam加入好友 查看sam的个人资料 搜索sam在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 访问sam的主页 引用回复这个贴子 回复这个贴子 查看sam的博客6
    发贴心情 
    <?xml version="1.0" encoding="GB2312"?>

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <!--根模板-->
    <xsl:template match="/">
    <html>
       <head>
        <title><xsl:value-of select="//title"/></title>
       </head>
       
      
      
       <xsl:apply-templates select="//body"/>
      
    </html>
    </xsl:template>

    <!--body模板-->
    <xsl:template match="body">
    <body>
    <xsl:attribute name="bgcolor"><xsl:value-of select="bgcolor"/></xsl:attribute>
    <xsl:apply-templates select="component"/>
    </body>
    </xsl:template>

    <!--component模板-->
    <xsl:template match="component">
        <xsl:for-each  select="*">
            <xsl:choose>
                 <xsl:when test="starts-with(name(),'Button')">
      <xsl:apply-templates select="."/>
                 </xsl:when>
                 <xsl:when test="starts-with(name(),'StaticText')">
      <xsl:apply-templates select="."/>
                 </xsl:when>

            </xsl:choose>
        </xsl:for-each>
    </xsl:template>

    <!--button模板-->
    <xsl:template match="ButtonType">
       <xsl:element name="input">
           <xsl:attribute name="name"><xsl:value-of select="id"/>
           </xsl:attribute>
          <xsl:attribute name="type"><xsl:value-of select="type"/>
          </xsl:attribute>
          <xsl:attribute name="value"><xsl:value-of select="value"/>
          </xsl:attribute>
       </xsl:element>
    </xsl:template>

    <!--Text模板-->
    <xsl:template match="StaticTextType">
       <xsl:element name="input">
           <xsl:attribute name="name"><xsl:value-of select="id"/>
           </xsl:attribute>
          <xsl:attribute name="size"><xsl:value-of select="size"/>
          </xsl:attribute>
          <xsl:attribute name="value"><xsl:value-of select="content"/>
          </xsl:attribute>
       </xsl:element>
    </xsl:template>

    </xsl:stylesheet>

    ----------------------------------------------
    http://www.xml.org.cn/uploadFace/3819_20044191991837196.gif^_^

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2004/4/29 15:33:00
     
     wh010607 美女呀,离线,快来找我吧!
      
      
      等级:大一新生
      文章:9
      积分:84
      注册:2003/11/27

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给wh010607发送一个短消息 把wh010607加入好友 查看wh010607的个人资料 搜索wh010607在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 引用回复这个贴子 回复这个贴子 查看wh010607的博客7
    发贴心情 
    我以前也碰到这样的问题,大多因为Match定位错误,找不到数据所致
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2004/4/29 17:14:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2024/4/28 16:38:21

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

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