See docx4j/src/pptx4j/java/org/pptx4j/convert/out/svginhtml/pptx2svginhtml.xslt
Copy that and change the root template:
- Code: Select all
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<head>
so it is producing svg not html, and change
- Code: Select all
<xsl:template match="p:txBody">
:
<div style="position: absolute; width:{$cx}px; height:{$cy}px; left:{$x}px; top:{$y}px;">
<xsl:apply-templates select="a:p"/>
</div>
:
</xsl:template>
so it inserts svg for text, instead of that html.
You can create the svg in the xsl:template itself, or in an extension function. The template for p:cxnSp is an example of creating svg in an extension function.
Interested to hear how it works out, a year or so on