RE: [xsl] Removing XML:space from output

Subject: RE: [xsl] Removing XML:space from output
From: "Jason Macki" <jmacki@xxxxxxx>
Date: Wed, 4 Jul 2001 09:50:08 -0500
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:

		<img src='example.gif' />

...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'.)


-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: Wednesday, July 04, 2001 3:19 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] 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.


This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread