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
798a47f5
Commit
798a47f5
authored
Dec 15, 2016
by
Nyashes
Browse files
h2m: ajout de fonction et correction
parent
10ebbd75
Changes
7
Hide whitespace changes
Inline
Side-by-side
hdoc_to_mongo/subroutines/author.xsl
View file @
798a47f5
<?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"
/>
"
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
>
<xsl:import
href=
"../xsl-import/string.xsl"
/>
<xsl:template
match=
"/html/head"
name=
"author-main"
>
<xsl:value-of
select=
"h2m:escape-string(meta[@name='author']/@content)"
/>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
hdoc_to_mongo/subroutines/keyword.xsl
View file @
798a47f5
<?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"
>
xmlns:h2m=
"http://www.utc.fr/hdoc/hdoc_to_mongo"
>
<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
match=
"/html/head"
name=
"keyword-main"
>
<xsl:value-of
select=
"h2m:array(meta[@name='keywords']/@content)"
/>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
hdoc_to_mongo/subroutines/right.xsl
0 → 100644
View file @
798a47f5
<?xml version="1.0" encoding="UTF-8"?>
<?target hdoc/content.xml ?>
<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"
>
<xsl:import
href=
"../xsl-import/string.xsl"
/>
<xsl:template
match=
"/html/head"
name=
"right-main"
>
<xsl:value-of
select=
"h2m:escape-string(meta[@name='rights']/@content)"
/>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
hdoc_to_mongo/subroutines/title.xsl
0 → 100644
View file @
798a47f5
<?xml version="1.0" encoding="UTF-8"?>
<?target hdoc/content.xml ?>
<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"
>
<xsl:import
href=
"../xsl-import/string.xsl"
/>
<xsl:template
match=
"/html/head"
name=
"title-main"
>
<xsl:value-of
select=
"h2m:escape-string(title/text())"
/>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
hdoc_to_mongo/xsl-import/string.xsl
0 → 100644
View file @
798a47f5
<?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:escape-string"
>
<xsl:param
name=
"value"
/>
"
<xsl:value-of
select=
"replace($value, '"', '\\"')"
/>
"
</xsl:function>
</xsl:stylesheet>
\ No newline at end of file
hdoc_to_mongo/xsl-import/test.html
deleted
100644 → 0
View file @
10ebbd75
<?xml version="1.0" encoding="UTF-8"?>
[
1,
2,
3
]
\ No newline at end of file
hdoc_to_mongo/xsl-import/test.xml
deleted
100644 → 0
View file @
10ebbd75
<?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
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