Skip to content

Commit a96e142

Browse files
committed
Fix #1 - Handle templated classes.
1 parent 90ffa30 commit a96e142

File tree

6 files changed

+822
-1
lines changed

6 files changed

+822
-1
lines changed

Customization/xsl/class.xsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<li class="- topic/li ">
7171
<xsl:call-template name="add-link">
7272
<xsl:with-param name="type" select="'topic'"/>
73-
<xsl:with-param name="href" select="concat('#', .)"/>
73+
<xsl:with-param name="href" select="concat('#', encode-for-uri(.))"/>
7474
<xsl:with-param name="text" select="."/>
7575
</xsl:call-template>
7676
</li>

test/templated-base/build.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<!--
3+
This file is part of the DITA-OT Doxygen Plug-in project.
4+
See the accompanying LICENSE file for applicable licenses.
5+
-->
6+
<project basedir="." default="unit-test">
7+
<import file="../bootstrap.xml"/>
8+
<description>
9+
Expect that a class with a templated base class is generated to DITA
10+
</description>
11+
<target name="unit-test">
12+
<property name="file" value="${basedir}/out/templated.xml"/>
13+
<exec-transtype transtype="dita"/>
14+
<xmltask
15+
expandEntityReferences="false"
16+
dest="${file}"
17+
outputter="simple"
18+
source="${file}"
19+
>
20+
<xmlcatalog>
21+
<dtd publicId="-//OASIS//DTD DITA Topic//EN" location="../fake.dtd"/>
22+
</xmlcatalog>
23+
</xmltask>
24+
<compare-output suffix=".xml" result="${file}"/>
25+
</target>
26+
</project>

test/templated-base/document.ditamap

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE bookmap PUBLIC "-//OASIS//DTD DITA BookMap//EN" "bookmap.dtd">
3+
<bookmap>
4+
<appendices>
5+
<topicmeta>
6+
<navtitle>Appendices</navtitle>
7+
</topicmeta>
8+
<appendix format="dita" href="topic.dita">
9+
<topicref format="doxygen" type="topic" href="templated.xml"/>
10+
</appendix>
11+
</appendices>
12+
</bookmap>
13+
14+

0 commit comments

Comments
 (0)