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

RE: Removing XML:space from output

Subject: RE: Removing XML:space from output
From: "Jason Macki" <jmacki@xxxxxxx>
Date: Wed, 4 Jul 2001 09:50:08 -0500
xml spacing
You're right.  I had misunderstood the meaning and use of xml:space.
What I really wanted to do was to preserve the spacing *between* tags in
the output document.

When the output element of a stylesheet is set to method='xml' and
indent='yes', the folowing:

	<td><img src='example.gif' /></td>

becomes transformed into this:

	<td>
		<img src='example.gif' />
	</td>

...which introduces unwanted spacing.  Changing the method to "html"
would remove spacing between inline elements, but this would change my
XHTML page into HTML.  What I was wondering is if there was a way to use
"indent='yes'" to make the page readable, preserve the spacing between
inline elements (the way it does when the output method='html') and
still keep the page as XHTML.

(If you're wondering how I became so mixed up earlier, I tried using
xml:space='preserve' in my inline elements, leaving the output method as
'html', not 'xml'.  When I applied the tranformation, I thought that it
had done what I wanted, but it was just following the indentation rule
for 'html'.)

Thanks,
  Jason



-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: Wednesday, July 04, 2001 3:19 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Removing XML:space from output



> For example:
> 
> <td xml:space='preserve'><img src='example.gif' /></td>
> 
> And I get the following:

but why would you put xml:space at that position?
There is no space to preserve within the scope of that
attribuute as the td element contains no white space character data.


David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 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.