Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hdoc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Stephane Crozat
hdoc
Commits
9fb7f670
Commit
9fb7f670
authored
Dec 15, 2016
by
Nyashes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h2m: ajout des fonction author, keyword, h2m:array()
parent
75c39a3c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
0 deletions
+57
-0
hdoc_to_mongo/subroutines/author.xsl
hdoc_to_mongo/subroutines/author.xsl
+14
-0
hdoc_to_mongo/subroutines/keyword.xsl
hdoc_to_mongo/subroutines/keyword.xsl
+13
-0
hdoc_to_mongo/xsl-import/array.xsl
hdoc_to_mongo/xsl-import/array.xsl
+14
-0
hdoc_to_mongo/xsl-import/test.html
hdoc_to_mongo/xsl-import/test.html
+7
-0
hdoc_to_mongo/xsl-import/test.xml
hdoc_to_mongo/xsl-import/test.xml
+9
-0
No files found.
hdoc_to_mongo/subroutines/author.xsl
0 → 100644
View file @
9fb7f670
<?xml version="1.0" encoding="UTF-8"?>
<?target hdoc/content.xml ?>
<?main author-main?>
<xsl:stylesheet
version=
"2.0"
xpath-default-namespace=
"http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
xmlns:h2ma=
"http://www.utc.fr/hdoc/hdoc_to_mongo/author"
>
<xsl:import
href=
"../xsl-import/array.xsl"
/>
<xsl:template
match=
"text()"
></xsl:template>
<xsl:template
match=
"/html/head"
>
authors: "
<xsl:value-of
select=
"meta[@name='author']/@content"
/>
"
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
hdoc_to_mongo/subroutines/keyword.xsl
0 → 100644
View file @
9fb7f670
<?xml version="1.0" encoding="UTF-8"?>
<?target hdoc/content.xml ?>
<?main author-main?>
<xsl:stylesheet
version=
"2.0"
xpath-default-namespace=
"http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
xmlns:h2ma=
"http://www.utc.fr/hdoc/hdoc_to_mongo/author"
>
<xsl:import
href=
"../xsl-import/array.xsl"
/>
<xsl:template
match=
"text()"
></xsl:template>
<xsl:template
match=
"/html/head"
>
keywords:
<xsl:value-of
select=
"h2m:array(meta[@name='keywords']/@content)"
/>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
hdoc_to_mongo/xsl-import/array.xsl
0 → 100644
View file @
9fb7f670
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
version=
"2.0"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
>
<xsl:function
name=
"h2m:array"
>
<xsl:param
name=
"nodeset"
/>
[
<xsl:for-each
select=
"$nodeset[not(position() = last())]"
>
"
<xsl:value-of
select=
"."
/>
",
</xsl:for-each>
<xsl:value-of
select=
"$nodeset[last()]"
/>
]
</xsl:function>
</xsl:stylesheet>
\ No newline at end of file
hdoc_to_mongo/xsl-import/test.html
0 → 100644
View file @
9fb7f670
<?xml version="1.0" encoding="UTF-8"?>
[
1,
2,
3
]
\ No newline at end of file
hdoc_to_mongo/xsl-import/test.xml
0 → 100644
View file @
9fb7f670
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="array.xsl"?>
<root>
<ul>
<li
value=
"1"
/>
<li
value=
"2"
/>
<li
value=
"3"
/>
</ul>
</root>
\ No newline at end of file
Write
Preview
Markdown
is supported
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