1 Star 0 Fork 28

gisinaction/discoverx2-webapp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
viewentry.xsl 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
腾硕软件 提交于 2015-04-03 00:21 +08:00 . 初始提交
<?xml version="1.0" encoding="gbk"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/entries">
<table class="portletentrytbl">
<colgroup>
<xsl:apply-templates select="title"/>
</colgroup>
<xsl:apply-templates select="entry"/>
</table>
</xsl:template>
<xsl:template match="title">
<col>
<xsl:if test="position()!=last()">
<xsl:attribute name="width">
<xsl:value-of select="./width"/>
</xsl:attribute>
</xsl:if>
</col>
</xsl:template>
<xsl:template match="entry">
<xsl:if test="position()&lt;=2">
<tr class="portletentrytr">
<xsl:apply-templates select="column"/>
</tr>
</xsl:if>
</xsl:template>
<xsl:template match="column">
<xsl:param name="idx"><xsl:value-of select="position()"/></xsl:param>
<td>
<xsl:if test="position()=last()">
<xsl:attribute name="class">
<xsl:value-of select="'last'"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="position()=1">
<xsl:attribute name="class">
<xsl:value-of select="'first'"/>
</xsl:attribute>
</xsl:if>
<a target="_blank">
<xsl:attribute name="href">
<xsl:value-of select="'document.jsp?unid='"/><xsl:value-of select="../@unid"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="concat(../../title[number($idx)]/name,'')"/><xsl:value-of select="./text"/>
</xsl:attribute>
<xsl:choose>
<xsl:when test="contains(./text,':')">
<xsl:value-of select="substring(./text,1,10)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="./text"/>
</xsl:otherwise>
</xsl:choose>
</a>
</td>
</xsl:template>
</xsl:stylesheet>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/springjava/discoverx2-webapp.git
git@gitee.com:springjava/discoverx2-webapp.git
springjava
discoverx2-webapp
discoverx2-webapp
master

搜索帮助