Ok, so I don't like the macro thing. Also the RTF is +30MB.
Being curious as to how all this is possible when you start from perfectly ordered data in an xml I started coding some XSL (My second go at it) and i'm making a bit of progress.
I think this is a better option (compared to converting from RTF) because:
- I start from XML which has the document structure
- I will be converting more documentation in the same format
- I learn some XML and XSL
However, I still have to find a way to convert XML + XSL to EPUB
The document structure is:
/
/XmlExport.xml = a list with links to all topics
/en-us = a folder with all topics in seperate xml files
/en = a folder with all images
the XSL for the XmlExport.xml is :
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited by CAJAC -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<ul>
<xsl:for-each select="export/node">
<li> <xsl:value-of select="@title" /> </li>
<ul>
<xsl:for-each select="node/topic">
<li><a>
<xsl:attribute name="href">
<xsl:value-of select="@href" />
</xsl:attribute>
<xsl:value-of select="@title" /></a></li>
</xsl:for-each>
</ul>
</xsl:for-each>
</ul>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Next I will try to create an XSL file for the individual topics..