[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Formating to text
> The problem here is indeed to keep control over the horizontal position > and current value of the indentation to generate the line breaks while > running through the tree. > Updatable variables are eagerly missing here and I don't see how you can > easily perform this task which would be trivial with any procedural > language. > Have I missed something ? Can you do it instead by counting the depth of the node that you are handling? You could use the ancestor:: axis, or a subset of what you find along there, i.e., write a template named 'indent' which will indent n spaces per level, and call it with: <xsl:call-template name="indent"> <xsl:with-param name="level" select="count(ancestor::*)"/> </xsl:call-template> Steve 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
|