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

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

parents ca4fef53 4eb565a8
...@@ -10,6 +10,21 @@ ...@@ -10,6 +10,21 @@
</xsl:template> </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, <!--Identity template,
provides default behavior that copies all content into the output --> provides default behavior that copies all content into the output -->
<xsl:template match="@*|node()"> <xsl:template match="@*|node()">
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
<xsl:template match="ul"> <xsl:template match="ul">
<ul> <ul>
<xsl:apply-templates select="*"/> <xsl:apply-templates select="*"/>
</ul><br/> </ul>
</xsl:template> </xsl:template>
<xsl:template match="ol"> <xsl:template match="ol">
<ol> <ol>
<xsl:apply-templates select="*"/> <xsl:apply-templates select="*"/>
</ol><br/> </ol>
</xsl:template> </xsl:template>
<xsl:template match="@*|node()"> <xsl:template match="@*|node()">
......
...@@ -48,8 +48,14 @@ ...@@ -48,8 +48,14 @@
<xsl:apply-templates select="*"/> <xsl:apply-templates select="*"/>
</ol> </ol>
</xsl:template> </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:template match="page">
<xsl:apply-templates select="@*|node()"/> <xsl:apply-templates select="@*|node()"/>
</xsl:template> </xsl:template>
...@@ -59,4 +65,4 @@ ...@@ -59,4 +65,4 @@
<xsl:apply-templates select="@*|node()"/> <xsl:apply-templates select="@*|node()"/>
</xsl:copy> </xsl:copy>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>
\ No newline at end of file
{
"url" : "http://172.25.31.252:28017/test",
"collection" : "nf29"
}
\ No newline at end of file
...@@ -4,74 +4,27 @@ ...@@ -4,74 +4,27 @@
<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js" ></script> <script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js" ></script>
<script type="text/javascript"> <script type="text/javascript">
jQuery("document").ready(function () { jQuery("document").ready(function () {
var myData = [{ $.getJSON('config.json', function (config) {
"title": $.ajax({
"XSLT (oprations avances): expressions rgulires et fichiers texte" url: config.url + "/" + config.collection + "/",
, type: 'get',
"authors": dataType: 'jsonp',
"Karim El Aktaa (Contributions: Stphane Crozat et les tudiants de NF29)" jsonp: 'jsonp', // mongod is expecting the parameter name to be called "jsonp"
, cache: false,
"keywords": success: function (myData) {
[ for (var item in myData.rows) {
var model = jQuery("div[name='toFill']").first().clone();
"XSL" 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")
"XSLT" model.appendTo(jQuery("body").first());
, }
},
"XSL-XSLT" error: function (XMLHttpRequest, textStatus, errorThrown) {
, console.log('error', errorThrown + " " + textStatus);
}
"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());
}
}); });
</script> </script>
</head> </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