Subject: | Linebreaks for formatting elements occur in unexpected places |
I'm trying to reproduce an SVG file with SVG.pm that I had been
generating by another method.
One thing that I found that was not expected was the handling of the
'-elsep' element separator code.
1. With the DTD turned off (-inline=1), the XML declaration gets a
trailing 'elsep' and the svg tag gets a leading 'elsep' resulting in an
expected blank line.
2. Any element containing cdata received no 'elsep' before the start
tag, but receives an 'elsep' before the end tag. This looks really funny
on short pieces of text.
3. An element containing cdata also receives an 'indent' before the end
tag, this changes the content of the tag (for instance if xml:space is
preserve).
4. An XML comment does not get prefixed with an 'elsep' and 'indent'.
There are arguably a number of ways the 'pretty printing' could be
handled. Since the rest of your reformatting closely follows what I've
done for years, I was a little surprised at these differences.