LOM_Plone.xsl
Affichage des données de métadonnées
LOM_Plone.xsl — XML document, 8 kB (8622 bytes)
Contenu du fichier
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:lom="http://ltsc.ieee.org/xsd/LOM" xmlns:xpath="http://www.w3.org/2003/05/xpath-functions" version="1.0"> <xsl:output encoding="UTF-8" indent="yes" media-type="text/html" method="html" omit-xml-declaration="yes"/> <xsl:preserve-space elements="*"/> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="lom:lom"> <h1> <xsl:value-of select="lom:general/lom:title"/> </h1> <table> <tr> <td>Description</td> <td> <xsl:value-of select="lom:general/lom:description"/> </td> </tr> <tr> <td>Lien vers la donnée</td> <td> <xsl:variable name="url_data" select="substring-after(lom:technical/lom:location, '/db/')"/> <xsl:if test="lom:technical/lom:format = 'text/xml'"> <a href="prepublication/db/{$url_data}"> <xsl:choose> <xsl:when test="string-length(lom:general/lom:title) > 0"> <xsl:value-of select="lom:general/lom:title"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="lom:technical/lom:location"/> </xsl:otherwise> </xsl:choose> </a> </xsl:if> <xsl:if test="lom:technical/lom:format != 'text/xml'"> <a href="{$url_data}"> <xsl:choose> <xsl:when test="string-length(lom:general/lom:title) > 0"> <xsl:value-of select="lom:general/lom:title"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="lom:technical/lom:location"/> </xsl:otherwise> </xsl:choose> </a> </xsl:if> </td> </tr> <tr> <td>Adresse de la donnée</td> <td> <xsl:value-of select="lom:technical/lom:location"/> </td> </tr> <tr> <td>Langue</td> <td> <xsl:value-of select="lom:general/lom:language"/> </td> </tr> <tr> <td> Mots clés </td> <td> <xsl:for-each select="lom:general/lom:keyword"> <xsl:value-of select="lom:string"/> <xsl:if test="position() < last()"> <xsl:text>, </xsl:text> </xsl:if> </xsl:for-each> </td> </tr> <tr> <td>Contributeur(s)</td> <td> <table> <xsl:for-each select="lom:lifeCycle/lom:contribute"> <tr> <td> <xsl:value-of select="lom:entity"/> <xsl:text> (</xsl:text> <xsl:value-of select="lom:role/lom:value"/> <xsl:if test="lom:date/lom:dateTime != ''"> <xsl:text>, </xsl:text> <xsl:value-of select="lom:date/lom:dateTime"/> </xsl:if> <xsl:text>)</xsl:text> </td> </tr> </xsl:for-each> </table> </td> </tr> <tr> <td>Méta-métadonnée</td> <td> <table> <xsl:for-each select="lom:metaMetadata/lom:contribute"> <tr> <td> <xsl:value-of select="lom:entity"/> <xsl:text> (</xsl:text> <xsl:value-of select="lom:role/lom:value"/> <xsl:if test="lom:date/lom:dateTime != ''"> <xsl:text>, </xsl:text> <xsl:value-of select="lom:date/lom:dateTime"/> </xsl:if> <xsl:text>)</xsl:text> </td> </tr> </xsl:for-each> </table> </td> </tr> <tr> <td>Format de la donnée</td> <td> <xsl:value-of select="lom:technical/lom:format"/> </td> </tr> <tr> <td>Taille de la donnée</td> <td> <xsl:if test="number(lom:technical/lom:size) < 1024"> <xsl:value-of select="lom:technical/lom:size"/> <xsl:text> octets</xsl:text> </xsl:if> <xsl:if test="number(lom:technical/lom:size) >= 1024 and number(lom:technical/lom:size) < 1024*1024"> <xsl:value-of select="round(number(lom:technical/lom:size) div 1024)"/> <xsl:text> Ko</xsl:text> </xsl:if> <xsl:if test="number(lom:technical/lom:size) >= 1024*1024 and number(lom:technical/lom:size) < 1024*1024*1024"> <xsl:value-of select="round(number(lom:technical/lom:size) div 1024 div 1024)"/> <xsl:text> Mo</xsl:text> </xsl:if> <xsl:if test="number(lom:technical/lom:size) >= 1024*1024*1024"> <xsl:value-of select="round(number(lom:technical/lom:size) div 1024 div 1024 div 1024)"/> <xsl:text> Go</xsl:text> </xsl:if> </td> </tr> <tr> <td>Niveau(x) du public visé</td> <td> <xsl:for-each select="lom:educational/lom:typicalAgeRange/lom:string"> <xsl:value-of select="."/> <xsl:if test="position() < last()"> <xsl:text>, </xsl:text> </xsl:if> </xsl:for-each> </td> </tr> <tr> <td>Classification</td> <td> <table> <xsl:for-each select="lom:classification/lom:taxonPath"> <tr> <td> <b> <xsl:text>(</xsl:text> <xsl:value-of select="lom:source/lom:string"/> <xsl:text>)</xsl:text> </b> </td> <td> <xsl:for-each select="lom:taxon"> <xsl:value-of select="lom:entry/lom:string"/> <xsl:if test="position() < last()"> <xsl:text> >> </xsl:text> </xsl:if> </xsl:for-each> </td> </tr> </xsl:for-each> </table> </td> </tr> <xsl:if test="lom:rights/lom:copyrightAndOtherRestrictions/lom:value = 'yes'"> <tr> <td>Droits</td> <td> <xsl:value-of select="lom:rights/lom:description/lom:string"/> </td> </tr> </xsl:if> </table> </xsl:template> </xsl:stylesheet>