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

Re: Problem with empty spaces

Subject: Re: Problem with empty spaces
From: "Sam D. Chuparkoff" <sdc@xxxxxxxxxx>
Date: Thu, 21 Jul 2005 15:32:45 -0400
blank space in xml
On Thu, 2005-07-21 at 12:48 +0500, Lakshmi narayana wrote:
> Hi List,
> 
> In my XSLT, I converted some of the child nodes vales as attributes to the
> parent. In the resultant XML file, I am getting empty spaces in place
> of child nodes which are not added. How can I eliminate the white space.
> for eg:

If you're providing input and output (a good idea), you should provide
the xsl you used as well, and probably the processor.

You'll notice a lot of the xsl posted here starts with something like:

  <xsl:output method="xml" indent="yes"/>
  <xsl:strip-space elements="*"/>

What you're probably looking for is xsl:strip-space .

sdc

> input xml looks like this:
> <A>
> 	<ch name="ch1" value="1"/>
> 	<ch name="ch2" value="2"/>
> 	<ch name="ch3" value="3"/>
> 	<B>
> 		<ch name="ch4" value="4"/>
> 		<ch name="ch5" value="5"/>
> 	</B>
> </A>
> 
> Output XML looks like this:
> <A ch1="1" ch2="2" ch3="3">
> 
> 
> 
> 	<B ch4="4" ch5="5" />
> </A>
> 
> Thanks,
> Laxmi Narayana

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.