- Timestamp:
- 2012-08-09T11:38:09+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/transform/config_format.xsl
r26043 r26092 215 215 216 216 <!-- if this gsf:metadata is a child of a document node then we want to get the metadata for that node --> 217 <xsl:template match="gsf:metadata"> 217 <xsl:template match="gsf:metadata"> 218 <xsl:if test="not(@hidden = 'true')"> 219 <!-- set hidden=true on a gsf:metadata so that it gets retrieved from the server but not displayed --> 220 <xsl:variable name="meta_name"><xsl:call-template name="getMetadataName"/></xsl:variable> 221 <xsl:variable name="separator"><xsl:choose><xsl:when test="@separator"><xsl:value-of disable-output-escaping='yes' select="@separator"/></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose></xsl:variable> 222 <xslt:for-each><xsl:attribute name="select"> 223 <xsl:if test="@type='collection'">/page/pageResponse/collection/</xsl:if>metadataList/metadata[@name='<xsl:value-of select="$meta_name"/>'<xsl:if test="@lang"><xsl:text> and @lang=</xsl:text><xsl:value-of select="@lang"/></xsl:if><xsl:text>]</xsl:text></xsl:attribute> 224 <xslt:if test="position()>1"><xsl:value-of select="$separator"/></xslt:if> 225 <xsl:choose> 226 <xsl:when test="@format"> 227 <xslt:value-of disable-output-escaping='yes' select="util:{@format}(., /page/@lang )"/> 228 </xsl:when> 229 <xsl:otherwise> 230 <xslt:value-of disable-output-escaping='yes' select="."/> 231 </xsl:otherwise> 232 </xsl:choose> 233 </xslt:for-each> 234 </xsl:if> 235 </xsl:template> 236 237 <xsl:template name="getMetadataName"> 238 <xsl:if test='@select'> 239 <xsl:value-of select='@select'/> 240 <xsl:text>_</xsl:text> 241 </xsl:if> 242 <xsl:value-of select="@name"/> 243 </xsl:template> 244 245 <xsl:template match="gsf:metadata-last"> 218 246 <xslt:variable name="langAtt"><xsl:value-of select="@lang"/></xslt:variable> 219 <xsl t:if test="not(@hidden = 'true')">247 <xsl:if test="not(@hidden = 'true')"> 220 248 <xslt:value-of disable-output-escaping="yes"> 221 249 <xsl:attribute name="select"> … … 244 272 </xsl:attribute> 245 273 </xslt:value-of> 246 </xsl t:if>274 </xsl:if> 247 275 </xsl:template> 248 276 … … 329 357 <xsl:template match="gsf:switch"> 330 358 <xsl:variable name="meta-name"><xsl:apply-templates select="gsf:metadata" mode="get-metadata-name"/></xsl:variable> 331 <xslt:variable name="meta"><xsl:choose><xsl:when test="@preprocess"><xslt:value-of select="util:{@preprocess}((.//metadataList)[last()]/metadata[@name='{$meta-name}'] )"/></xsl:when><xsl:otherwise><xslt:value-of select="(.//metadataList)[last()]/metadata[@name='{$meta-name}']"/></xsl:otherwise></xsl:choose></xslt:variable>359 <xslt:variable name="meta"><xsl:choose><xsl:when test="@preprocess"><xslt:value-of select="util:{@preprocess}((.//metadataList)[last()]/metadata[@name='{$meta-name}'], /page/@lang )"/></xsl:when><xsl:otherwise><xslt:value-of select="(.//metadataList)[last()]/metadata[@name='{$meta-name}']"/></xsl:otherwise></xsl:choose></xslt:variable> 332 360 <xslt:choose> 333 361 <xsl:for-each select="gsf:when">
Note:
See TracChangeset
for help on using the changeset viewer.