Skip to content
GitLab
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
1a183443
Commit
1a183443
authored
Dec 31, 2016
by
Nyashes
Browse files
h2m: ajout des namespaces (catégorie de mot-clés)
parent
cd3189b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
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
Supports
Markdown
0%
Try again
or
attach a new 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