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

    >> 本版讨论XSL,XSLT,XSL-FO,CSS等技术
    [返回] 中文XML论坛 - 专业的XML技术讨论区XML.ORG.CN讨论区 - XML技术『 XSL/XSLT/XSL-FO/CSS 』 → [求助]xslt排序问题求指教 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 7642 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: [求助]xslt排序问题求指教 举报  打印  推荐  IE收藏夹 
       本主题类别: 样式表技术(XSL, XSLT, XSL-FO, CSS)    
     ljuyx 帅哥哟,离线,有人找我吗?
      
      
      等级:大一(高数修炼中)
      文章:17
      积分:114
      门派:XML.ORG.CN
      注册:2012/5/9

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

    源码
    <xsl:template match="/">
     <xsl:choose>
      <xsl:when test="xml/@action='1'"><xsl:call-template name="match_1"/></xsl:when>
      <xsl:when test="xml/@action='2'"><xsl:call-template name="match_2"/></xsl:when>
      <xsl:when test="xml/@action='3'"><xsl:call-template name="match_3"/></xsl:when>
      <xsl:when test="xml/@action='4'"><xsl:call-template name="match_4"/></xsl:when>
      <xsl:when test="xml/@action='5'"><xsl:call-template name="match_5"/></xsl:when>
      <xsl:when test="xml/@action='6'"><xsl:call-template name="match_6"/></xsl:when>
      <xsl:otherwise><xsl:call-template name="other"/></xsl:otherwise>
     </xsl:choose>
    </xsl:template>
    <xsl:template name="match_1">
    <xsl:for-each select="//data">
    <li id="img"><a href="/link.asp?id={@id}" target="{@target}" title="{@content}"><img src="{@logourl}" alt="{@content}" /></a></li>
    </xsl:for-each>
    </xsl:template>
    <xsl:template name="match_2">
    <xsl:for-each select="//data">
    <li id="txt"><a href="/link.asp?id={@id}" target="{@target}" title="{@content}"><xsl:value-of select="@title"/></a></li>
    </xsl:for-each>
    </xsl:template>
    <xsl:template name="match_3">
    <xsl:for-each select="//data"><ul>
    <li id="img"><a href="/link.asp?id={@id}" target="{@target}" title="{@content}"><img src="{@logourl}" alt="{@content}" /></a></li>
    <li><a href="/link.asp?id={@id}" target="{@target}" title="{@content}"><xsl:value-of select="@title"/></a></li><li id="time"><xsl:value-of select="@addtime"/></li></ul>
    </xsl:for-each>
    </xsl:template>
    <xsl:template name="match_4">
    <xsl:for-each select="//data">
    <ul><li id="txt"><a href="/link.asp?id={@id}" target="{@target}"><xsl:value-of select="@title"/></a></li><li id="note"><xsl:value-of select="@content"/></li><li id="hits"><xsl:value-of select="@views"/></li></ul>
    </xsl:for-each>
    </xsl:template>
    <xsl:template name="match_5">
    <xsl:for-each select="//data">
    <ul><li id="img"><xsl:choose><xsl:when test="@logourl=''"><img src="/images/nophoto.gif"/></xsl:when><xsl:otherwise><a href="/link.asp?id={@id}" target="{@target}"><img src="{@logourl}"/></a></xsl:otherwise></xsl:choose></li><li id="note"><xsl:value-of select="@content"/></li><li id="hits"><xsl:value-of select="@views"/></li></ul>
    </xsl:for-each>
    </xsl:template>
    <xsl:template name="match_6">
    <xsl:for-each select="//data">
    <ul><li id="tit"><span><input type="checkbox" name="id" value="{@id}"/> <a href="/link.asp?id={@id}" target="{@target}"><xsl:value-of select="@title"/></a></span>时间:<xsl:value-of select="@addtime"/></li><li id="img"><xsl:choose><xsl:when test="@logourl=''"><img src="/images/nophoto.gif"/></xsl:when><xsl:otherwise><a href="/link.asp?id={@id}" target="{@target}"><img src="{@logourl}"/></a></xsl:otherwise></xsl:choose></li><li id="note"><font id="fontls">简介:</font><xsl:value-of select="@content"/></li></ul>
    </xsl:for-each>
    </xsl:template>
    <xsl:template name="other">
    </xsl:template>
    </xsl:stylesheet>
    这里显示的结果是一个六列的列表,现在我想把6列扩成10列改怎么修改呢?求指点!!!

       收藏   分享  
    顶(0)
      




    ----------------------------------------------
    <A href="http://www.sh365anmo.com.com/">上海上门按摩</A> <A href="http://www.need007.com/">私家侦探</A> <A href="http://www.lovetan.net/">婚恋交友</A> <A href="http://www.sh-bm.net/">Q690</A> <A href="http://www.qjweige.com/">西力士</A>

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2012/5/9 16:07:00
     
     ljuyx 帅哥哟,离线,有人找我吗?
      
      
      等级:大一(高数修炼中)
      文章:17
      积分:114
      门派:XML.ORG.CN
      注册:2012/5/9

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给ljuyx发送一个短消息 把ljuyx加入好友 查看ljuyx的个人资料 搜索ljuyx在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 引用回复这个贴子 回复这个贴子 查看ljuyx的博客2
    发贴心情 
    没有人回帖吗?我晕

    ----------------------------------------------
    <A href="http://www.sh365anmo.com.com/">上海上门按摩</A> <A href="http://www.need007.com/">私家侦探</A> <A href="http://www.lovetan.net/">婚恋交友</A> <A href="http://www.sh-bm.net/">Q690</A> <A href="http://www.qjweige.com/">西力士</A>

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2012/5/10 9:59:00
     
     ljuyx 帅哥哟,离线,有人找我吗?
      
      
      等级:大一(高数修炼中)
      文章:17
      积分:114
      门派:XML.ORG.CN
      注册:2012/5/9

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给ljuyx发送一个短消息 把ljuyx加入好友 查看ljuyx的个人资料 搜索ljuyx在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 引用回复这个贴子 回复这个贴子 查看ljuyx的博客3
    发贴心情 
    这么多天了,还是没有人来,心碎了....

    ----------------------------------------------
    <A href="http://www.sh365anmo.com.com/">上海上门按摩</A> <A href="http://www.need007.com/">私家侦探</A> <A href="http://www.lovetan.net/">婚恋交友</A> <A href="http://www.sh-bm.net/">Q690</A> <A href="http://www.qjweige.com/">西力士</A>

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2012/5/15 11:53: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/27 17:18:51

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

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