Commit 48e18fcb authored by Gregory's avatar Gregory

fix JSON structure with commas

parent caa2e203
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
<!-- Extraction des informations du head --> <!-- Extraction des informations du head -->
<xsl:template match="head"> <xsl:template match="head">
"title" : "<xsl:value-of select="title/text()"/>" "title" : "<xsl:value-of select="title/text()"/>",
"keywords" : [ "keywords" : [
<xsl:for-each select="meta[@name='keywords']"> <xsl:for-each select="meta[@name='keywords']">
"<xsl:value-of select="@content"/>"<xsl:if test="position() != last()">,</xsl:if> "<xsl:value-of select="@content"/>"<xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each> </xsl:for-each>
] ],
<xsl:apply-templates select="meta"/> <xsl:apply-templates select="meta"/>
</xsl:template> </xsl:template>
...@@ -40,11 +40,11 @@ ...@@ -40,11 +40,11 @@
</xsl:template> </xsl:template>
<xsl:template match="meta[@name='date']"> <xsl:template match="meta[@name='date']">
"date" : "<xsl:value-of select="@content"/>" "date" : "<xsl:value-of select="@content"/>",
</xsl:template> </xsl:template>
<xsl:template match="meta[@name='rights']"> <xsl:template match="meta[@name='rights']">
"rights" : "<xsl:value-of select="@content"/>" "rights" : "<xsl:value-of select="@content"/>",
</xsl:template> </xsl:template>
......
Markdown is supported
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