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

RE: change number of indent blanks from default=3 to

Subject: RE: change number of indent blanks from default=3 to 2 ?
From: "Praveen Chauhan" <praveen.chauhan@xxxxxxxxxxxxxx>
Date: Tue, 3 Aug 2010 15:04:55 +0530
RE:  change number of  indent blanks from default=3 to
Hi Ben,

You can also use oXygen XML Editor
Options>Preferences>Format>Indent Size

For set the indentatin in XML.

Regards
Praveen Kumar Chauhan

-----Original Message-----
From: Matthieu Ricaud-Dussarget [mailto:matthieu.ricaud@xxxxxxxxx]
Sent: Tuesday, August 03, 2010 2:37 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  change number of indent blanks from default=3 to 2 ?

This is an identity transformation, I think the indentation you get is just
because of the <xsl:output indent="yes" ... />, and I'm not sure but I guess
that default indentation 3 is made by the xslt processor you use.

It might be possible with some <xsl:text/> elements to make what you want
using XSLT but why not using an xml IDE to do it ?
I'm thinking about jedit which has an xml plugin, you can indent with, in
the general preferences you can also choose the indent width.

Hope this help,
Regards

Le 03/08/2010 10:35, Ben Stover a icrit :
> I applied the following simple XSLT script onto a given XML doc which let
me indent the tags according to their hierarchy level.
>
> The number of blanks used for each level is by default 3.
> How can I change this to 2
>
> Even better: Is it possible to leave the indention for the top most 3
levels at 3 and change it only for all deeper levels to 2?
>
> Ben
>
> <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
>
> 	<xsl:output indent="yes" method="xml"/>
>
> 	<xsl:template match="@* | node()">
> 		<xsl:copy>
> 			<xsl:apply-templates/>
> 		</xsl:copy>
> 	</xsl:template>
> </xsl:stylesheet>
>
>
>


--
Matthieu Ricaud
IGS-CP
Service Livre numirique

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.