add thumburl parameter, change thumbnail loop

This commit is contained in:
wlx 2011-09-22 03:00:00 +00:00
parent 14cc6c73f5
commit 2399fcef8f
1 changed files with 19 additions and 6 deletions

View File

@ -3,7 +3,7 @@
xsl:extension-element-prefixes="php"
>
<xsl:output method="html" encoding="utf-8" indent="no"/>
<xsl:param name="id" select="defaultstring"/>
<xsl:param name="thumburl" select="defaultstring"/>
<xsl:param name="abstract" select="defaultstring"/>
<xsl:template match="/">
<div id="uuid" style="color:red"><u>
@ -159,14 +159,27 @@
</xsl:for-each>
</ol>
</li>
</ol>
<div style="text-align:center;">
<xsl:if test="//Metadata/dataIdInfo/graphOver[bgFileName!='' and bgFileName!='http://heihe.westgis.ac.cn/water/thumb.jpg']">
<img width="600" height="400" class="figure" align="center"><xsl:attribute name="src">http://westdc.westgis.ac.cn:8080/geonetwork/srv/cn/graphover.show?id=<xsl:value-of select='$id'/>%26fname=<xsl:value-of select='//Metadata/dataIdInfo/graphOver[1]/bgFileName'/>%26access=public</xsl:attribute></img>
<li><h4 style="background-color:#DEE2E4">缩略图</h4></li>
<div style="text-align:center;">
<xsl:for-each select="//Metadata/dataIdInfo/graphOver">
<xsl:variable name="imgurl" select="concat('http://westdc.westgis.ac.cn/gndata/',$thumburl,'/',bgFileName)"/>
<img class="figure" align="center">
<xsl:attribute name="src">
<xsl:value-of select="$imgurl" disable-output-escaping="yes"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="bgFileDesc"/>
</xsl:attribute>
</img>
</xsl:for-each>
<xsl:if test="//Metadata/dataIdInfo/graphOver[bgFileName!='' and bgFileName!='http://heihe.westgis.ac.cn/water/thumb.jpg']">
<img width="600" height="400" class="figure" align="center"><xsl:attribute name="src">http://test.westgis.ac.cn:8080/geonetwork/srv/cn/graphover.show?id=<xsl:value-of select='$id'/>&amp;fname=<xsl:value-of select='//Metadata/dataIdInfo/graphOver[1]/bgFileName'/>&amp;access=public</xsl:attribute></img>
</xsl:if>
<xsl:if test="//Metadata/dataIdInfo/graphOver[bgFileName='' or bgFileName='http://heihe.westgis.ac.cn/water/thumb.jpg']">
<img class="figure" align="center"><xsl:attribute name="src">http://westdc.westgis.ac.cn/images/nothumb.png</xsl:attribute></img>
</xsl:if>
</div>
</div>
</ol>
</xsl:template>
</xsl:stylesheet>