[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Indenting Blocks in HTML Output
Why not passing the indentation as parameter to the statement_list
template? Is it correct, that the statements can be deeper then 1 level
and the indentation shell grow with the deepness?
<xsl:template match="statement[ *[1]/self::startblock and *[2]/self::statement_list and *[3]/self::endblock ]"> <xsl:param name="indent" select="''"/> <xsl:value-of select="$indent"/> <xsl:apply-templates select="*[1]"/> <xsl:apply-templates select="*[2]"> <xsl:with-param name="indent" select="concat($indent, '    ')"/> </xsl:apply-templates> <xsl:value-of select="$indent"/> <xsl:apply-templates select="*[3]"/> </xsl:template> <xsl:template match="statement_list"> <xsl:param name="indent" select="''"/> <xsl:apply-template name="stament"> <xsl:with-param name="indent" select="$indent"/> </xsl:apply-template> </xsl:template> Regards, Joerg xml@xxxxxxxxxxxxxxxxxxxxx wrote: Hi, XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|