Skip to content
GitLab
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
664b8ccb
Commit
664b8ccb
authored
Dec 17, 2015
by
Zangdar1111
Browse files
add order
parent
aabccf05
Changes
1
Hide whitespace changes
Inline
Side-by-side
mindmapping_to_hdoc/xslt/sect.xsl
View file @
664b8ccb
...
...
@@ -49,7 +49,7 @@
<header><h1>
Introduction
</h1>
<xsl:element
name=
"div"
>
<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>
</header>
</xsl:element>
...
...
@@ -63,7 +63,7 @@
<footer>
<xsl:element
name=
"div"
>
<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>
</footer>
</xsl:element>
...
...
@@ -95,7 +95,7 @@
<!-- Paragraph -->
<xsl:template
match=
"node[contains(@TEXT, '#p')]"
priority=
"2"
>
<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:template>
...
...
@@ -104,9 +104,9 @@
<xsl:element
name=
"a"
>
<xsl:attribute
name=
"href"
>
<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: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:template>
...
...
@@ -146,4 +146,11 @@
</xsl:otherwise>
</xsl:choose>
</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>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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