Commit fef97b84 authored by Raphaël's avatar Raphaël

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

parents ca4fef53 4eb565a8
......@@ -10,6 +10,21 @@
</xsl:template>
<xsl:template match="//ul[parent::ul or parent::ol]" priority="1">
<li>
<ul>
<xsl:apply-templates select="*"/>
</ul>
</li>
</xsl:template>
<xsl:template match="//ol[parent::ul or parent::ol]" priority="1">
<li>
<ol>
<xsl:apply-templates select="*"/>
</ol>
</li>
</xsl:template>
<!--Identity template,
provides default behavior that copies all content into the output -->
<xsl:template match="@*|node()">
......
......@@ -6,12 +6,12 @@
<xsl:template match="ul">
<ul>
<xsl:apply-templates select="*"/>
</ul><br/>
</ul>
</xsl:template>
<xsl:template match="ol">
<ol>
<xsl:apply-templates select="*"/>
</ol><br/>
</ol>
</xsl:template>
<xsl:template match="@*|node()">
......
......@@ -48,8 +48,14 @@
<xsl:apply-templates select="*"/>
</ol>
</xsl:template>
<xsl:template match="h1 | h2 | h3 | h4 | h5 | h6">
Titre (non pris en compte pour l'instant) :
<xsl:apply-templates select="@*|node()"/>
</xsl:template>
<xsl:template match="code">
Code (non pris en compte pour l'instant) :
<xsl:apply-templates select="@*|node()"/>
</xsl:template>
<xsl:template match="page">
<xsl:apply-templates select="@*|node()"/>
</xsl:template>
......@@ -59,4 +65,4 @@
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
</xsl:stylesheet>
{
"url" : "http://172.25.31.252:28017/test",
"collection" : "nf29"
}
\ No newline at end of file
......@@ -4,74 +4,27 @@
<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js" ></script>
<script type="text/javascript">
jQuery("document").ready(function () {
var myData = [{
"title":
"XSLT (oprations avances): expressions rgulires et fichiers texte"
,
"authors":
"Karim El Aktaa (Contributions: Stphane Crozat et les tudiants de NF29)"
,
"keywords":
[
"XSL"
,
"XSLT"
,
"XSL-XSLT"
,
"Expression rgulire"
]
,
"rights":
"by-sa"
,
"introduction":
"XSL-XSLT est un langage de programmation qui permet notamment de manipuler des documents XML. Ce module a pour but de vous apporter des connaissances plus approfondies sur ce langage que vous connaissez dj: l'utilisation de document non XML et d'expressions rgulires."
},
{
"title":
"XSLT (oprations avances): expressions rgulires et fichiers texte"
,
"authors":
"Karim El Aktaa (Contributions: Stphane Crozat et les tudiants de NF29)"
,
"keywords":
[
"XSL"
,
"XSLT"
,
"XSL-XSLT"
,
"Expression rgulire"
]
,
"rights":
"by-sa"
,
"introduction":
"XSL-XSLT est un langage de programmation qui permet notamment de manipuler des documents XML. Ce module a pour but de vous apporter des connaissances plus approfondies sur ce langage que vous connaissez dj: l'utilisation de document non XML et d'expressions rgulires."
}]
for (var item in myData) {
var model = jQuery("div[name='toFill']").first().clone();
model.find("a[name='link']").attr("href", "title.html#" + encodeURI(JSON.stringify(myData[item])));
model.find("span[name='title']").text(myData[item].title);
model.css("display", "block")
model.appendTo(jQuery("body").first());
}
$.getJSON('config.json', function (config) {
$.ajax({
url: config.url + "/" + config.collection + "/",
type: 'get',
dataType: 'jsonp',
jsonp: 'jsonp', // mongod is expecting the parameter name to be called "jsonp"
cache: false,
success: function (myData) {
for (var item in myData.rows) {
var model = jQuery("div[name='toFill']").first().clone();
model.find("a[name='link']").attr("href", "title.html#" + encodeURI(JSON.stringify(myData.rows[item])));
model.find("span[name='title']").text(myData.rows[item].title);
model.css("display", "block")
model.appendTo(jQuery("body").first());
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
console.log('error', errorThrown + " " + textStatus);
}
});
});
});
</script>
</head>
......
npm link mongodb
\ 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