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

RE: displaying a xml via a xsl

Subject: RE: displaying a xml via a xsl
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Tue, 9 Apr 2002 10:18:57 +0100
RE:  displaying a xml via a xsl
You may be able to achieve the required indentation simply using

<xsl:output method="xml" indent="yes"/>

<xsl:template match="/"><xsl:copy-of select="."/></xsl:template>

If you really want to do the formatting yourself, use an identity template,
and produce the required amount of indentation using something like:

<xsl:for-each select="ancestor::*"><xsl:text>   </xsl:text></xsl:for-each>

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Sébastien
> Tisserant
> Sent: 08 April 2002 12:46
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  displaying a xml via a xsl
>
>
> hello
>
> i have a one-line-displayed xml
>
> and i would like it to displayed in html with indentation and
> and return-to-next-line like this one
>
> <element1 attr1="rir">
>     <element2 attr2="fgfg">fdgfdg</element2>
>     <element2>fdgfdg</element2>
>     <element2>fdgfdg</element2>
>         <element3>fdgfdg</element3>
>         <element3 attr4="fgdgdg">fdgfdg</element3>
>     <element2 attr9="dfssdf">fdgfdg</element2>
> </element1>
>
> could you help me doing this this via XSL ?
> specially how to incremente or decremente the indentation blank
>
> thanks.
>
> Sébastien
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>


 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.