Skip to content

Commit

Permalink
Add condition to avoid setting the chunk='to-content' on the DITA-Map…
Browse files Browse the repository at this point in the history
… at all XHTML based transformations scenarios. Force UTF-8 encoding for attribute replacement.
  • Loading branch information
Stefan Eike committed Jul 4, 2015
1 parent b83e7cf commit 994f5fb
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions build_transtype-reveal_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,15 @@

<target name="reveal" unless="noMap" depends="dita2reveal" />

<!-- Clean the out/reveal directory -->
<!--
Clean the out/reveal directory and determine, if the XHTML transformation is a reveal.js transformation.
If yes, set chunk="to-content" dynamically on the root map element.
-->
<target name="clean_reveal">
<delete dir="${output.dir}" />
<delete dir="${output.dir}" />
<condition property="isRevealJS">
<equals arg1="${transtype}" arg2="reveal"/>
</condition>
</target>

<!-- Meta target for reveal.js processing. -->
Expand Down Expand Up @@ -101,10 +107,10 @@


<!-- Automatically set "chunk='to-content'" on the temporary input file. -->
<target name="setchunk" description="Set @chunk to-content on the temp input bookmap">
<replace file="${dita.temp.dir}${file.separator}${dita.input.filename}" token="chunk=.to-content." value="" />
<replace file="${dita.temp.dir}${file.separator}${dita.input.filename}" token="&lt;bookmap " value="&lt;bookmap chunk='to-content' "/>
<replace file="${dita.temp.dir}${file.separator}${dita.input.filename}" token="&lt;map " value="&lt;map chunk='to-content' "/>
<target name="setchunk" description="Set @chunk to-content on the temp input bookmap" if="isRevealJS">
<replace file="${dita.temp.dir}${file.separator}${dita.input.filename}" token="chunk=.to-content." value="" encoding="UTF-8"/>
<replace file="${dita.temp.dir}${file.separator}${dita.input.filename}" token="&lt;bookmap " value="&lt;bookmap chunk='to-content' " encoding="UTF-8"/>
<replace file="${dita.temp.dir}${file.separator}${dita.input.filename}" token="&lt;map " value="&lt;map chunk='to-content' " encoding="UTF-8"/>
</target>

<!-- XSLT transformation -->
Expand Down

0 comments on commit 994f5fb

Please sign in to comment.