Commit 664b8ccb authored by Zangdar1111's avatar Zangdar1111

add order

parent aabccf05
......@@ -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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment