Commit 200ec902 authored by Jean-Baptiste Martin's avatar Jean-Baptiste Martin
Browse files

fix the <meta name="keywords"/> tag process according to Opale's schema

parent 9e132fb5
......@@ -5,6 +5,7 @@
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
......@@ -25,7 +26,12 @@
<xsl:apply-templates select="./h:meta"/>
<xsl:apply-templates select="//h:meta[@name='keywords']"/> <!-- Keywords tag is processed separatly -->
<xsl:apply-templates select="./h:meta[@name != 'keywords']"/>
<!-- Author: in case several authors are specified, we don't want to get an error for not respecting the schema -->
<xsl:if test="./h:meta[@name='author']">
......@@ -58,17 +64,27 @@
The keywords tag is processed separatly
because according to the Hdoc Rng schema
there might be multiple <meta name="keywords" tags
This allow us to treat all the different tags
and merge them according to Opale schema
<xsl:template match="h:meta[@name='keywords']" priority="1">
<xsl:for-each select="fn:tokenize(./@content,',')">
<xsl:value-of select="normalize-space(.)"/>
<xsl:template match="h:meta[@name]">
<xsl:when test="./@name = 'description'"/> <!-- Unsupported : Opale doesn't provide any description metadata. -->
<xsl:when test="./@name = 'keywords'"> <!-- This is the least to do, since there's no specific format for keywords in hdoc. -->
<sp:keywd><xsl:value-of select="./@content"/></sp:keywd>
<xsl:when test="./@name = 'keywords'"/> <!-- Done above -->
<xsl:when test="./@name = 'author'"/> <!-- Done above -->
<xsl:when test="./@name = 'rights'">
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment