Annotation of kupuMPIWG/apache-lenya/lenya/sitetree2kupulibrary.xsl, revision 1.1

1.1     ! dwinter     1: <?xml version="1.0" encoding="UTF-8" ?>
        !             2: 
        !             3: <!--
        !             4:   Transform lenya Sitetree to Kupu's library format
        !             5:   for usage in the link drawer.
        !             6:   
        !             7:   @version $Id: sitetree2kupulibrary.xsl 8771 2005-01-31 19:05:00Z gregor $
        !             8: -->
        !             9: 
        !            10: <xsl:stylesheet version="1.0"
        !            11:   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        !            12:   xmlns:dc="http://purl.org/dc/elements/1.1/"
        !            13:   xmlns:li="http://apache.org/cocoon/lenya/info/1.0"
        !            14:  >
        !            15: 
        !            16: <xsl:param name="resource-icon-url"/>
        !            17: <xsl:param name="resource-path-url"/>
        !            18: 
        !            19: <xsl:template match="/">
        !            20:   <collection>
        !            21:     <uri>FIXME URI</uri>
        !            22:     <icon></icon>
        !            23:     <title>Page Image Library</title>
        !            24:     <description>Images related to page or document.</description>
        !            25:     <items>
        !            26:       <xsl:apply-templates select="//li:asset"/>
        !            27:     </items>
        !            28:   </collection>
        !            29: </xsl:template>
        !            30: 
        !            31: <xsl:template match="li:asset">
        !            32:   <xsl:variable name="resource-url">
        !            33:     <xsl:value-of select="concat($resource-path-url, dc:source)"/>
        !            34:   </xsl:variable> 
        !            35:   
        !            36:   <resource id="{$resource-url}">
        !            37:     <title><xsl:value-of select="dc:source"/></title>
        !            38:     <uri><xsl:value-of select="$resource-url"/></uri>
        !            39:     <icon><xsl:value-of select="$resource-icon-url"/></icon>
        !            40:     <description><xsl:value-of select="dc:title"/></description>
        !            41:     <preview><xsl:value-of select="$resource-url"/></preview>
        !            42:     <size><xsl:value-of select="dc:extent"/>&#160;kb</size>
        !            43:   </resource>
        !            44: </xsl:template>
        !            45: 
        !            46: <xsl:template match="@*|node()">
        !            47:   <xsl:copy>
        !            48:     <xsl:apply-templates select="@*|node()"/>
        !            49:   </xsl:copy>
        !            50: </xsl:template> 
        !            51: 
        !            52: </xsl:stylesheet>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>