[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Re: Indendation(in HTML) corresposing to the heira

Subject: RE: 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
heira
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::*">&#xA0;</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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.