ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stan Devitt <jsdev...@stratumtek.com>
Subject Re: HTML (XML) Formatting Task
Date Wed, 14 Apr 2004 06:56:27 GMT
For html, you probably want to use Tidy. 
For xhtml (and xml in general), you can use the style task with
a style sheet something like:

<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    >
  <xsl:output xconfig:indent-amount="2" 
xmlns:xconfig="http://xml.apache.org/xslt"/>
  <xsl:output method="xml" indent="yes"/>
  <xsl:strip-space elements="*"/>
  <xsl:template match="*|node()">
    <xsl:copy>
      <xsl:apply-template select="*|node()" />
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>

Stan Devitt

Jan.Materne@rzf.fin-nrw.de wrote:

>Don´t know any, but let us know :-)
>
>BTW, I usually don´t beautify generated code - except I´ve generated only
>once and 
>after that I have to maintain it by hand...
>
>
>Jan
>
>  
>
>>-----Original Message-----
>>From: Jordan Reed [mailto:revjordanreed-ant@yahoo.com]
>>Sent: Tuesday, April 13, 2004 6:10 PM
>>To: Ant Users List
>>Subject: HTML (XML) Formatting Task
>>
>>
>>Is there an ant task out there that can format XML/HTML 
>>files?  I'm basically
>>looking for something like the Jalopy task, except it 
>>beautifies XHTML.
>>
>>-jdr
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>
>>    
>>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message