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
cdc7cd5f
Commit
cdc7cd5f
authored
Dec 10, 2016
by
Esquilax76
Browse files
link creation correction
parent
0570cead
Changes
1
Hide whitespace changes
Inline
Side-by-side
hdoc_to_neo4j/xsl/hdoc_to_neo4j.xsl
View file @
cdc7cd5f
...
...
@@ -7,8 +7,6 @@
<xsl:output
method=
"text"
indent=
"no"
/>
<xsl:template
match=
"/"
>
<xsl:apply-templates/>
</xsl:template>
...
...
@@ -16,18 +14,17 @@
<xsl:template
match=
"head"
/>
<xsl:template
match=
"body"
>
<xsl:apply-templates
select=
"
/
/section"
/>
<xsl:apply-templates
select=
"
.
/section"
/>
</xsl:template>
<xsl:template
match=
"body/section"
>
MERGE (
`
<xsl:value-of
select=
"./header/h1"
/>
`
:Item {
title:"
<xsl:value-of
select=
"./header/h1"
/>
"
});
MERGE (
i
:Item {title:"
<xsl:value-of
select=
"./header/h1"
/>
"});
<xsl:apply-templates
select=
"./section"
/>
</xsl:template>
<xsl:template
match=
"body/section/section"
>
MERGE (
`
<xsl:value-of
select=
"./header/h1"
/>
`
:Item {
title:"
<xsl:value-of
select=
"./header/h1"
/>
"
});
MATCH (
`
<xsl:value-of
select=
"./header/h1"
/>
`:Item), (`
<xsl:value-of
select=
"parent::section/header/h1"
/>
`:Item
)
CREATE (
`
<xsl:value-of
select=
"./header/h1"
/>
`)-[:LIEN]-> (`
<xsl:value-of
select=
"parent::section/header/h1"
/>
`
);
MERGE (
i
:Item {title:"
<xsl:value-of
select=
"./header/h1"
/>
"});
MATCH (
l1:Item {title:"
<xsl:value-of
select=
"./header/h1"
/>
"}), (l2:Item {title:"
<xsl:value-of
select=
"parent::section/header/h1"
/>
"}
)
CREATE (
l1)-[:LIEN]->(l2
);
</xsl:template>
</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