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

    >> 本版讨论XSL,XSLT,XSL-FO,CSS等技术
    [返回] 计算机科学论坛XML.ORG.CN讨论区 - XML技术『 XSL/XSLT/XSL-FO/CSS 』 → xslt 中import,include 使用问题请教 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 2142 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: xslt 中import,include 使用问题请教 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     susansusan 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:0
      积分:56
      门派:XML.ORG.CN
      注册:2005/3/24

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给susansusan发送一个短消息 把susansusan加入好友 查看susansusan的个人资料 搜索susansusan在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 引用回复这个贴子 回复这个贴子 查看susansusan的博客楼主
    发贴心情 xslt 中import,include 使用问题请教

    我目前正在做一个用到xslt技术的项目,有个问题请教有经验的人士,我需要在一个xslt文件中读取两个xml文件中的内容,我采用的处理办法是一个作为主xslt,再写一个xslt(单独测试该xslt正常),在主xslt中使用<xsl:include>语法,只能输出文本,无法输出<xsl:value-of>的内容,查找资料说<xsl:include>不支持<xsl:value-of>输出,具体的解释如下:<xsl:include>effectively does a textual inclusion of the referenced stylesheet module,minus its containing <xsl:stylesheet>element.
    我换用了<xsl:import>,IE6浏览器解析报错,不知道还有没有变通的办法可以采用,请高手指点,谢谢!

       收藏   分享  
    顶(0)
      




    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2005/3/29 11:18:00
     
     doubleG 帅哥哟,离线,有人找我吗?
      
      
      威望:7
      等级:大三(面向对象是个好东东!)
      文章:591
      积分:4119
      门派:XML.ORG.CN
      注册:2004/5/27

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给doubleG发送一个短消息 把doubleG加入好友 查看doubleG的个人资料 搜索doubleG在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 引用回复这个贴子 回复这个贴子 查看doubleG的博客2
    发贴心情 
    <xsl:import href="...xsl"/>
    <xsl:include href="...xsl"/>
    Include:
    The resource located by the href attribute value is parsed as an XML document, and the children of the xsl:stylesheet element in this document replace the xsl:include element in the including document. The fact that template rules or definitions are included does not affect the way they are processed.
    import:
    Importing a stylesheet is the same as including it except that definitions and template rules in the importing stylesheet take precedence over template rules and definitions in the imported stylesheet;

    The difference:
    include:The fact that template rules or definitions are included does not affect the way they are processed.
    import:definitions and template rules in the importing stylesheet take precedence over template rules and definitions in the imported stylesheet

    读两个文件在一个xslt中就可以完成,用document("other.xml")就可以访问另一个xml文件了。

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2005/3/30 15:26:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2025/12/29 19:50:12

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

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