[EMAIL PROTECTED] wrote:
After many edits , my XSL files become not well-arranged. Does exist some
(freeware) program, which can in my XSL, XML, FO files align all starting
and ending tags back together ? For example:

<A>
<B>text     </B><C>

text</C></A>

-------------
<A>
  <B>text</B>
  <C>text</C>
</A>

or

<A>
  <B>
  text
  </B>
  <C>
  text
  </C>
</A>

There are a lot of pretty-print tools, but probably the simplest one is xslt stylesheet that indents result and normalizes spaces:


<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
    <xsl:output indent="yes"/>
    <xsl:template match="@* | node()">
        <xsl:copy>
            <xsl:apply-templates select="@* | node()"/>
        </xsl:copy>
    </xsl:template>
    <xsl:template match="text()">
        <xsl:value-of select="normalize-space()"/>
    </xsl:template>
</xsl:stylesheet>

--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to