GITLAB

Snippets

Sign in
  • Sign in

meta.xslt
Add new snippet


#79 by 72f60816e60779e1cff35b00d383cb94?s=40&d=identicon doekia
← discover snippets
meta.xslt Buy Me a Coffee at ko-fi.com
raw
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <!--
        #
        # xsltproc ==stringparam iso fr meta.xslt fr/data/meta.xml
        #
        # @copyright (c)2015 - (d)oekia
        # @license LGPL
        #
        -->

        <xsl:output method="text" />
        <xsl:param name="iso"/>

        <xsl:template match="//meta">
        update ps_meta_lang ml
        inner join ps_meta m on m.id_meta = ml.id_meta and m.page = "<xsl:value-of select="./@id"/>"
        inner join ps_lang l on ml.id_lang = l.id_lang and l.iso_code = "<xsl:value-of select="$iso"/>"
        set
                ml.title="<xsl:value-of select="title"/>",
                ml.description="<xsl:value-of select="description"/>",
                ml.url_rewrite="<xsl:value-of select="url_rewrite"/>" ;
        </xsl:template>
</xsl:stylesheet>