Code: Select all
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="no" encoding="utf-8"/>
</xsl:stylesheet>
which can be run with:
Code: Select all
sudo apt-get install libsaxon-java
java -jar /usr/share/java/saxon.jar -o text.txt drawing.svg svg2txt.xsl
However, I have the following questions:
How can I get new lines in my output after each text element in the same node? Now they are all concatenated together. E.g. now <text>Hi</text><text>there.<text> results in Hithere.
How can I get no more than two consecutive new lines in the output? I.e. not more than one blank line.
What are the benefits of the second transformation from http://www.w3.org/2002/05/svg2stuff.html