Commit 34b7e4e1 authored by Baptiste Perraud's avatar Baptiste Perraud

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

parents e813b390 ba999e38
!input/.gitkeep
!output/.gitkeep
\ No newline at end of file
......@@ -3,11 +3,10 @@
(: For example, $author := '^Baptiste Montangé$', to search for an exact name:)
(: For example, $name := 'Montangé', to search for documents whose author named Coutant:)
(: Remark : Accents in the authors' names have been taken care of :)
<documents>{
let $name := 'Montangé'
declare function local:searchDocByAuthor($name as xs:string, $docs as node()*) as node()*
{
let $name_noAcc := translate($name, 'áàâäéèêëíìîïóòôöúùûü','aaaaeeeeiiiioooouuuu')
for $doc in //document
for $doc in $docs
return
for $author in $doc/authors/author
let $titre := $doc/titre
......@@ -15,4 +14,7 @@
where matches($author_noAcc, $name_noAcc)
group by $titre (: Avoid duplications of documents by their titre:)
return $doc
}</documents>
\ No newline at end of file
};
(: Example :)
local:searchDocByAuthor('Montangé', //document)
\ No newline at end of file
......@@ -3,9 +3,12 @@
(: For example, $name := '^NF29_HdocEtherpad$', to search for an exact name:)
(: For example, $name := 'NF29', to search for documents whose name contains 'NF29':)
<documents>{
let $name := '^NF29_HdocEtherpad$'
for $doc in //document
declare function local:searchDocByTitle($name as xs:string, $docs as node()*) as node()*
{
for $doc in $docs
where matches($doc/titre, $name, "i")
return $doc
}</documents>
\ No newline at end of file
};
(: Example :)
local:searchDocByTitle('^NF29_HdocEtherpad$', //document)
\ No newline at end of file
......@@ -14,6 +14,8 @@ This section has been written by
* Thibault BROCHETON
* Bastien FREMONDIERE
* Amélie PERDRIAUD
* Quentin KEUNEBROEK
* Alexandre GUTH
It is based on the work of Guillaume GOMEZ in 2014.
......
<map version="1.0.1">
<node ID="ID_1" TEXT=" NF29">
<edge COLOR="#9900ff"/>
<node ID="ID_2" POSITION="right" STYLE="fork" TEXT="#1 Noeud1">
<node ID="ID_11" POSITION="right" STYLE="fork" TEXT="#def D&#233;finition">
<node COLOR="#00ff00" ID="ID_12" POSITION="right" STYLE="fork" TEXT="#p Contenu 1"/>
<node ID="ID_13" POSITION="right" STYLE="fork" TEXT="#p Contenu 2">
<font BOLD="true" ITALIC="true" SIZE="12"/>
</node>
<node ID="ID_14" POSITION="right" STYLE="fork" TEXT="#p Contenu 3">
<arrowlink DESTINATION="ID_8" STARTARROW="Default"/>
</node>
</node>
<node ID="ID_5" POSITION="right" STYLE="fork" TEXT="#rmk Remarque"/>
<node ID="ID_8" POSITION="right" STYLE="fork" TEXT="#compl Compl&#233;ment"/>
<node ID="ID_9" POSITION="right" STYLE="fork" TEXT="#wrng Attention"/>
<node ID="ID_10" POSITION="right" STYLE="fork" TEXT="#ex Exemple"/>
<node ID="ID_7" POSITION="right" STYLE="fork" TEXT="#emph Emphase"/>
<node ID="ID_25" POSITION="right" STYLE="fork" TEXT="#question Ceci est l'&#233;nonc&#233; de la question">
<node ID="ID_26" POSITION="right" STYLE="fork" TEXT="#choice-correct Ceci est une bonne r&#233;ponse">
<node ID="ID_29" POSITION="right" STYLE="fork" TEXT="#explanation-choice-correct Ceci est l'explication locale de la bonne r&#233;ponse"/>
</node>
<node ID="ID_27" POSITION="right" STYLE="fork" TEXT="#choice-incorrect Ceci est une mauvaise r&#233;ponse"/>
<node ID="ID_28" POSITION="right" STYLE="fork" TEXT="#explanation Ceci est l'explication de la r&#233;ponse"/>
</node>
</node>
<node ID="ID_16" POSITION="left" STYLE="fork" TEXT="Lambda">
<node ID="ID_17" POSITION="left" STYLE="fork" TEXT="Fils 1">
<node ID="ID_19" POSITION="left" STYLE="fork" TEXT="Petit-fils 1">
<node ID="ID_20" POSITION="left" STYLE="fork" TEXT="#p Paragraphe"/>
</node>
</node>
<node ID="ID_18" POSITION="left" STYLE="fork" TEXT="Fils 2">
<node ID="ID_21" POSITION="left" STYLE="fork" TEXT="Paragraphe"/>
</node>
</node>
<node ID="ID_3" POSITION="right" STYLE="fork" TEXT="#2 Noeud2"/>
<node ID="ID_4" POSITION="right" STYLE="fork" TEXT="#intro Intro"/>
<node ID="ID_15" POSITION="right" STYLE="fork" TEXT="#conclu Conclusion">
<node ID="ID_6" POSITION="right" STYLE="fork" TEXT="#adv Conseil"/>
</node>
</node>
</map>
\ No newline at end of file
......@@ -193,6 +193,11 @@
<text/>
</element>
</optional>
<optional>
<element name="div">
<ref name="DivType"/>
</element>
</optional>
<ref name="Flow"/>
</element>
</oneOrMore>
......
......@@ -51,6 +51,8 @@
<value>choice-correct</value>
<value>choice-incorrect</value>
<value>explanation</value>
<value>explanation-choice-correct</value>
<value>explanation-choice-incorrect</value>
</choice>
</attribute>
</optional>
......
......@@ -37,5 +37,5 @@
<xsl:template match="script"/>
<!-- Ignoring divs that are not useful and that might interfere with the true xslt transformation -->
<xsl:template match="/html/body/div/div/div/div[@class!='mw-highlight mw-content-ltr']"/>
<xsl:template match="/html/body/div/div/div/div[@class!='mw-highlight mw-content-ltr' and not(descendant::table)]"/>
</xsl:stylesheet>
\ No newline at end of file
......@@ -360,11 +360,7 @@
</xsl:if>
</xsl:template>
<<<<<<< HEAD
=======
>>>>>>> 9e71c9879b4cfdf2138a088b173de4011fd5869f
<!-- Simple Tables -->
<xsl:template match="table" mode="#all">
<xsl:choose>
......@@ -500,5 +496,5 @@
<xsl:template match="div[@id='mw-navigation']/h2"/>
<!-- Ignoring divs by default: they are not relevant to us -->
<xsl:template match="div" mode="#all"/>
<xsl:template match="div[not(descendant::table)]" mode="#all"/>
</xsl:stylesheet>
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