Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hdoc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Stephane Crozat
hdoc
Commits
c901e8df
Commit
c901e8df
authored
Dec 15, 2016
by
Baptiste Montange
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://gitlab.utc.fr/crozatst/hdoc
fix conflicts
parents
8b1ba4ab
e90027c6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
10 deletions
+24
-10
hdoc_to_mongo/subroutines/author.xsl
hdoc_to_mongo/subroutines/author.xsl
+2
-2
hdoc_to_mongo/subroutines/keyword.xsl
hdoc_to_mongo/subroutines/keyword.xsl
+2
-2
hdoc_to_mongo/subroutines/right.xsl
hdoc_to_mongo/subroutines/right.xsl
+2
-2
hdoc_to_mongo/subroutines/title.xsl
hdoc_to_mongo/subroutines/title.xsl
+15
-2
hdoc_to_mongo/xsl-import/array.xsl
hdoc_to_mongo/xsl-import/array.xsl
+3
-2
No files found.
hdoc_to_mongo/subroutines/author.xsl
View file @
c901e8df
...
...
@@ -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
hdoc_to_mongo/subroutines/keyword.xsl
View file @
c901e8df
...
...
@@ -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
hdoc_to_mongo/subroutines/right.xsl
View file @
c901e8df
...
...
@@ -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
hdoc_to_mongo/subroutines/title.xsl
View file @
c901e8df
...
...
@@ -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
hdoc_to_mongo/xsl-import/array.xsl
View file @
c901e8df
...
...
@@ -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
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