Skip to content
GitLab
Menu
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
8720195b
Commit
8720195b
authored
Dec 22, 2016
by
qkeunebr
Browse files
Merge branch 'master' of gitlab.utc.fr:crozatst/hdoc
parents
d9754b20
34b7e4e1
Changes
11
Show whitespace changes
Inline
Side-by-side
hdoc_to_basex/.gitignore
0 → 100644
View file @
8720195b
!input/.gitkeep
!output/.gitkeep
\ No newline at end of file
hdoc_to_basex/basex/xquery/XQueryFunctions.hq
0 → 100644
View file @
8720195b
hdoc_to_basex/basex/xquery/searchDocByAuthor.hq
View file @
8720195b
...
...
@@ -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
//
doc
ument
for $doc in
$
doc
s
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
hdoc_to_basex/basex/xquery/searchDocByTitle.hq
View file @
8720195b
...
...
@@ -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
//
doc
ument
declare function local:searchDocByTitle($name as xs:string, $docs as node()*) as node()*
{
for $doc in
$
doc
s
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
hdoc_to_basex/input/.gitkeep
0 → 100644
View file @
8720195b
hdoc_to_basex/output/.gitkeep
0 → 100644
View file @
8720195b
hdoc_to_basex/sample/result_bush.hdoc
0 → 100644
View file @
8720195b
File added
hdoc_to_basex/sample/result_oracle.hdoc
0 → 100644
View file @
8720195b
File added
hdoc_to_basex/
input
/sample.hdoc
→
hdoc_to_basex/
sample
/sample.hdoc
View file @
8720195b
File moved
hdoc_to_pdf/samples/sample.hdoc
0 → 100644
View file @
8720195b
File added
wikipedia_to_hdoc/xslt/prepare_wiki_to_hdoc.xsl
View file @
8720195b
...
...
@@ -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
Write
Preview
Supports
Markdown
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