Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hdoc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Stephane Crozat
hdoc
Commits
1a183443
Commit
1a183443
authored
Dec 31, 2016
by
Nyashes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h2m: ajout des namespaces (catégorie de mot-clés)
parent
cd3189b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
hdoc_to_mongo/web/title.html
hdoc_to_mongo/web/title.html
+3
-1
hdoc_to_mongo/xsl/subroutines/keyword.xsl
hdoc_to_mongo/xsl/subroutines/keyword.xsl
+24
-1
No files found.
hdoc_to_mongo/web/title.html
View file @
1a183443
...
...
@@ -9,7 +9,9 @@
jQuery
(
"
#spData
"
).
append
(
"
<p>Auteur(s) :
"
+
myData
.
authors
+
"
</p>
"
);
jQuery
(
"
#spData
"
).
append
(
"
<p>License de droits d'usage :
"
+
myData
.
rights
+
"
</p>
"
);
jQuery
(
"
#spData
"
).
append
(
""
);
jQuery
(
"
#rwData
"
).
append
(
"
<p>non classs :
"
+
myData
.
keywords
.
join
(
"
,
"
)
+
"
</p>
"
);
if
(
myData
.
keywords
.
_
.
length
>
0
)
jQuery
(
"
#rwData
"
).
append
(
"
<p>non classs :
"
+
myData
.
keywords
.
_
.
join
(
"
,
"
)
+
"
</p>
"
);
if
(
myData
.
keywords
.
content
.
length
>
0
)
jQuery
(
"
#rwData
"
).
append
(
"
<p>content :
"
+
myData
.
keywords
.
content
.
join
(
"
,
"
)
+
"
</p>
"
);
if
(
myData
.
keywords
.
topic
.
length
>
0
)
jQuery
(
"
#rwData
"
).
append
(
"
<p>topic :
"
+
myData
.
keywords
.
topic
.
join
(
"
,
"
)
+
"
</p>
"
);
jQuery
(
"
#introduction
"
).
text
(
myData
.
introduction
);
...
...
hdoc_to_mongo/xsl/subroutines/keyword.xsl
View file @
1a183443
...
...
@@ -5,6 +5,29 @@
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
>
<xsl:import
href=
"../xsl-import/array.xsl"
/>
<xsl:template
name=
"keyword-main"
>
<xsl:value-of
select=
"h2m:array(/html/head/meta[@name='keywords']/@content)"
/>
{
_:
<xsl:value-of
select=
"h2m:array(/html/head/meta[@name='keywords']/@content)"
/>
,
content:
<xsl:call-template
name=
"keyword-content"
/>
,
topic:
<xsl:call-template
name=
"keyword-topic"
/>
}
</xsl:template>
<xsl:template
name=
"keyword-content"
>
[
<xsl:if
test=
"/html/head/meta[@name='generator']/@content = 'HdocConverter/wikipedia'"
>
wiki,
</xsl:if>
<xsl:if
test=
"//@data-hdoc-type = 'exercice'"
>
exercice,
</xsl:if>
text
<!-- TODO: faire un switch pour tester si on index pas une image par exemple -->
]
</xsl:template>
<xsl:template
name=
"keyword-topic"
>
[
<xsl:if
test=
"/html/head/meta[@name='keywords']/@content[contains('XML', .)]"
>
XML
</xsl:if>
<!-- TODO: faire une taxonomie des sujets, récupérer les keywords présents dedans -->
]
</xsl:template>
</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