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
7421b945
Commit
7421b945
authored
Dec 17, 2015
by
aperdria
Browse files
Merge branch 'mindmapping' of gitlab.utc.fr:crozatst/hdoc into mindmapping
parents
614e95f8
664b8ccb
Changes
1
Hide whitespace changes
Inline
Side-by-side
mindmapping_to_hdoc/xslt/sect.xsl
View file @
7421b945
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
<header><h1>
Introduction
</h1>
<header><h1>
Introduction
</h1>
<xsl:element
name=
"div"
>
<xsl:element
name=
"div"
>
<xsl:attribute
name=
"data-hdoc-type"
>
introduction
</xsl:attribute>
<xsl:attribute
name=
"data-hdoc-type"
>
introduction
</xsl:attribute>
<xsl:value-of
select=
"utc:string-remove-all(child::*[contains(@TEXT, '#intro')][1]/@TEXT, '#intro ')"
/>
<xsl:value-of
select=
"utc:string-remove-
order(utc:string-remove-
all(child::*[contains(@TEXT, '#intro')][1]/@TEXT, '#intro ')
)
"
/>
</xsl:element>
</xsl:element>
</header>
</header>
</xsl:element>
</xsl:element>
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
<footer>
<footer>
<xsl:element
name=
"div"
>
<xsl:element
name=
"div"
>
<xsl:attribute
name=
"data-hdoc-type"
>
conclusion
</xsl:attribute>
<xsl:attribute
name=
"data-hdoc-type"
>
conclusion
</xsl:attribute>
<xsl:value-of
select=
"utc:string-remove-all(child::*[contains(@TEXT, '#conclu')][1]/@TEXT, '#conclu ')"
/>
<xsl:value-of
select=
"utc:string-remove-
order(utc:string-remove-
all(child::*[contains(@TEXT, '#conclu')][1]/@TEXT, '#conclu ')
)
"
/>
</xsl:element>
</xsl:element>
</footer>
</footer>
</xsl:element>
</xsl:element>
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
<!-- Paragraph -->
<!-- Paragraph -->
<xsl:template
match=
"node[contains(@TEXT, '#p')]"
priority=
"2"
>
<xsl:template
match=
"node[contains(@TEXT, '#p')]"
priority=
"2"
>
<xsl:element
name=
"p"
>
<xsl:element
name=
"p"
>
<xsl:value-of
select=
"utc:string-remove-all(@TEXT, '#p ')"
/>
<xsl:value-of
select=
"utc:string-remove-
order(utc:string-remove-
all(@TEXT, '#p ')
)
"
/>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:template>
...
@@ -104,9 +104,9 @@
...
@@ -104,9 +104,9 @@
<xsl:element
name=
"a"
>
<xsl:element
name=
"a"
>
<xsl:attribute
name=
"href"
>
<xsl:attribute
name=
"href"
>
<xsl:text>
#
</xsl:text>
<xsl:text>
#
</xsl:text>
<xsl:value-of
select=
"utc:string-remove-all(@TEXT, '#a ')"
/>
<xsl:value-of
select=
"utc:string-remove-
order(utc:string-remove-
all(@TEXT, '#a ')
)
"
/>
</xsl:attribute>
</xsl:attribute>
<xsl:value-of
select=
"utc:string-remove-all(@TEXT, '#a ')"
/>
<xsl:value-of
select=
"utc:string-remove-
order(utc:string-remove-
all(@TEXT, '#a ')
)
"
/>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:template>
...
@@ -146,4 +146,11 @@
...
@@ -146,4 +146,11 @@
</xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:choose>
</xsl:template>
</xsl:template>
<xsl:function
name=
"utc:string-remove-order"
as=
"xs:string"
>
<xsl:param
name=
"text"
as=
"xs:string?"
/>
<xsl:variable
name=
"text2"
select=
"string($text)"
/>
<xsl:value-of
select=
"replace($text2,'#[1-9][0-9]* ','')"
></xsl:value-of>
</xsl:function>
</xsl:stylesheet>
</xsl:stylesheet>
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