Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
XSweet
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Julien Tremblay McLellan
XSweet
Commits
fe6d1644
Commit
fe6d1644
authored
Oct 05, 2017
by
Wendell Piez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now numbering footnotes and endnotes in separate sequences viz #113
parent
8a259a9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
applications/docx-extract/handle-notes.xsl
applications/docx-extract/handle-notes.xsl
+6
-2
No files found.
applications/docx-extract/handle-notes.xsl
View file @
fe6d1644
...
...
@@ -10,6 +10,10 @@
<!-- Indent should really be no, but for testing. -->
<xsl:output
method=
"xml"
indent=
"no"
omit-xml-declaration=
"yes"
/>
<xsl:param
as=
"xs:string"
name=
"footnote-format"
>
a
</xsl:param>
<xsl:param
as=
"xs:string"
name=
"endnote-format"
>
1
</xsl:param>
<!-- Copy everything by default. -->
<xsl:template
match=
"node() | @*"
>
<xsl:copy>
...
...
@@ -98,13 +102,13 @@
<xsl:template
match=
"a[@class='endnoteReference']"
mode=
"get-number"
>
<xsl:for-each
select=
"key('endnoteRef-by-href',@href)[1]"
>
<xsl:number
level=
"any"
count=
"a[@class='endnoteReference'][xsw:is-first-enref(.)]"
/>
<xsl:number
level=
"any"
format=
"{$endnote-format}"
count=
"a[@class='endnoteReference'][xsw:is-first-enref(.)]"
/>
</xsl:for-each>
</xsl:template>
<xsl:template
match=
"a[@class='footnoteReference']"
mode=
"get-number"
>
<xsl:for-each
select=
"key('footnoteRef-by-href',@href)[1]"
>
<xsl:number
level=
"any"
count=
"a[@class='footnoteReference'][xsw:is-first-fnref(.)]"
/>
<xsl:number
level=
"any"
format=
"{$footnote-format}"
count=
"a[@class='footnoteReference'][xsw:is-first-fnref(.)]"
/>
</xsl:for-each>
</xsl:template>
...
...
Write
Preview
Markdown
is supported
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