Subject: RE: [xsl] Re: Indendation(in HTML) corresposing to the heirarchy in an XML Doc. From: Jarno.Elovirta@xxxxxxxxx Date: Tue, 24 Jun 2003 10:08:30 +0300 |
Hi, > My 'inputs' look like this when i converted to HTML: > > Inputs: > > id;getImage;binField;contractName;packageName; > > This is how I want them to look like: > > Inputs > <icon>id > <icon>binField > <icon>anotherContainer > <icon>contractName > <icon>getImage > <icon>packageName > . . > . . > > The XML is a normal XML which follows this tag heirarchy. Thank you in > advance. It would have helped if you had shown us your actual XML input, but you can get the indentation level e.g. with <xsl:attribute name="style"> <xsl:value-of select="concat('margin-left:', 'count(ancestor::*) * 2, 'em'"/> </xsl:attribute> or <xsl:for-each select="ancestor::*"> </xsl:for-each> or just generate div elements to reconstruct the hierarchy and use the same left margin for all of them, i.e. <div> <div> <img ...>anotherContainer <div> <img ...>contractName and so forth. Cheers, Jarno - VNV Nation: Chosen XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Indendation(in HTML) corr, Ahsan | Thread | [xsl] Re: Recursing in XSLT, Ahsan |
[xsl] Problems with XSLT and Memory, David Bonilla Fuerte | Date | RE: [xsl] Looping in XSLT(old quest, Zink, Juergen |
Month |