Commit c901e8df authored by Baptiste Montange's avatar Baptiste Montange

Merge branch 'master' of ssh://gitlab.utc.fr/crozatst/hdoc

fix conflicts
parents 8b1ba4ab e90027c6
......@@ -4,8 +4,8 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:h2m="http://www.utc.fr/hdoc/hdoc_to_mongo">
<xsl:import href="../xsl-import/string.xsl"/>
<xsl:template match="/html/head" name="author-main">
<xsl:value-of select="h2m:escape-string(meta[@name='author']/@content)"/>
<xsl:template name="author-main">
<xsl:value-of select="h2m:escape-string(/html/head/meta[@name='author']/@content)"/>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
......@@ -4,7 +4,7 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:h2m="http://www.utc.fr/hdoc/hdoc_to_mongo">
<xsl:import href="../xsl-import/array.xsl"/>
<xsl:template match="/html/head" name="keyword-main">
<xsl:value-of select="h2m:array(meta[@name='keywords']/@content)"/>
<xsl:template name="keyword-main">
<xsl:value-of select="h2m:array(/html/head/meta[@name='keywords']/@content)"/>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
......@@ -4,8 +4,8 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:h2m="http://www.utc.fr/hdoc/hdoc_to_mongo">
<xsl:import href="../xsl-import/string.xsl"/>
<xsl:template match="/html/head" name="right-main">
<xsl:value-of select="h2m:escape-string(meta[@name='rights']/@content)"/>
<xsl:template name="right-main">
<xsl:value-of select="h2m:escape-string(/html/head/meta[@name='rights']/@content)"/>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
......@@ -4,7 +4,20 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:h2m="http://www.utc.fr/hdoc/hdoc_to_mongo">
<xsl:import href="../xsl-import/string.xsl"/>
<xsl:template match="/html/head" name="title-main">
<xsl:value-of select="h2m:escape-string(title/text())"/>
<xsl:template name="title-main">
<xsl:choose>
<xsl:when test="../section">
<xsl:call-template name="title-section"></xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="title-rootDocument"></xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="title-section">
<xsl:value-of select="h2m:escape-string(header/h1/text())"/>
</xsl:template>
<xsl:template name="title-rootDocument">
<xsl:value-of select="h2m:escape-string(/html/head/title/text())"/>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
......@@ -2,13 +2,14 @@
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:h2m="http://www.utc.fr/hdoc/hdoc_to_mongo">
<xsl:import href="../xsl-import/string.xsl"/>
<xsl:function name="h2m:array">
<xsl:param name="nodeset"/>
[
<xsl:for-each select="$nodeset[not(position() = last())]">
"<xsl:value-of select="."/>",
<xsl:value-of select="h2m:escape-string(.)"/>,
</xsl:for-each>
<xsl:value-of select="$nodeset[last()]"/>
<xsl:value-of select="h2m:escape-string($nodeset[last()])"/>
]
</xsl:function>
</xsl:stylesheet>
\ No newline at end of file
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