Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephane Crozat
hdoc
Commits
c901e8df
Commit
c901e8df
authored
Dec 15, 2016
by
Baptiste Montange
Browse files
Merge branch 'master' of
ssh://gitlab.utc.fr/crozatst/hdoc
fix conflicts
parents
8b1ba4ab
e90027c6
Changes
5
Hide whitespace changes
Inline
Side-by-side
hdoc_to_mongo/subroutines/author.xsl
View file @
c901e8df
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
>
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
>
<xsl:import
href=
"../xsl-import/string.xsl"
/>
<xsl:import
href=
"../xsl-import/string.xsl"
/>
<xsl:template
match=
"/html/head"
name=
"author-main"
>
<xsl:template
name=
"author-main"
>
<xsl:value-of
select=
"h2m:escape-string(meta[@name='author']/@content)"
/>
<xsl:value-of
select=
"h2m:escape-string(
/html/head/
meta[@name='author']/@content)"
/>
</xsl:template>
</xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>
\ No newline at end of file
hdoc_to_mongo/subroutines/keyword.xsl
View file @
c901e8df
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
>
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
>
<xsl:import
href=
"../xsl-import/array.xsl"
/>
<xsl:import
href=
"../xsl-import/array.xsl"
/>
<xsl:template
match=
"/html/head"
name=
"keyword-main"
>
<xsl:template
name=
"keyword-main"
>
<xsl:value-of
select=
"h2m:array(meta[@name='keywords']/@content)"
/>
<xsl:value-of
select=
"h2m:array(
/html/head/
meta[@name='keywords']/@content)"
/>
</xsl:template>
</xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>
\ No newline at end of file
hdoc_to_mongo/subroutines/right.xsl
View file @
c901e8df
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
>
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
>
<xsl:import
href=
"../xsl-import/string.xsl"
/>
<xsl:import
href=
"../xsl-import/string.xsl"
/>
<xsl:template
match=
"/html/head"
name=
"right-main"
>
<xsl:template
name=
"right-main"
>
<xsl:value-of
select=
"h2m:escape-string(meta[@name='rights']/@content)"
/>
<xsl:value-of
select=
"h2m:escape-string(
/html/head/
meta[@name='rights']/@content)"
/>
</xsl:template>
</xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>
\ No newline at end of file
hdoc_to_mongo/subroutines/title.xsl
View file @
c901e8df
...
@@ -4,7 +4,20 @@
...
@@ -4,7 +4,20 @@
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
>
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
>
<xsl:import
href=
"../xsl-import/string.xsl"
/>
<xsl:import
href=
"../xsl-import/string.xsl"
/>
<xsl:template
match=
"/html/head"
name=
"title-main"
>
<xsl:template
name=
"title-main"
>
<xsl:value-of
select=
"h2m:escape-string(title/text())"
/>
<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:template>
</xsl:stylesheet>
</xsl:stylesheet>
\ No newline at end of file
hdoc_to_mongo/xsl-import/array.xsl
View file @
c901e8df
...
@@ -2,13 +2,14 @@
...
@@ -2,13 +2,14 @@
<xsl:stylesheet
version=
"2.0"
<xsl:stylesheet
version=
"2.0"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
>
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
>
<xsl:import
href=
"../xsl-import/string.xsl"
/>
<xsl:function
name=
"h2m:array"
>
<xsl:function
name=
"h2m:array"
>
<xsl:param
name=
"nodeset"
/>
<xsl:param
name=
"nodeset"
/>
[
[
<xsl:for-each
select=
"$nodeset[not(position() = last())]"
>
<xsl:for-each
select=
"$nodeset[not(position() = last())]"
>
"
<xsl:value-of
select=
"
.
"
/>
"
,
<xsl:value-of
select=
"
h2m:escape-string(.)
"
/>
,
</xsl:for-each>
</xsl:for-each>
<xsl:value-of
select=
"$nodeset[last()]"
/>
<xsl:value-of
select=
"
h2m:escape-string(
$nodeset[last()]
)
"
/>
]
]
</xsl:function>
</xsl:function>
</xsl:stylesheet>
</xsl:stylesheet>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment