prepare_img_link_metadata.xsl 726 Bytes
Newer Older
Aghiles's avatar
Aghiles committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    exclude-result-prefixes="xs"
    version="2.0">
    <xsl:output encoding="UTF-8"/>

    <xsl:template match="html">
        <images>
            <xsl:apply-templates select=".//a[img]"/>
        </images>
    </xsl:template>
    <xsl:template match="a[img]">
        <image>
            <link>
                <xsl:text>https://fr.wikipedia.org</xsl:text><xsl:value-of select="@href"/>             
            </link>
            <ref>
                <xsl:value-of select="./img/@src"/>
            </ref>
        </image>
    </xsl:template>
    
  
</xsl:stylesheet>