This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Removing XML:space from output
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Removing XML:space from output
- From: "Jason Macki" <jmacki at iisd dot ca>
- Date: Wed, 4 Jul 2001 09:50:08 -0500
- Reply-To: xsl-list at lists dot mulberrytech dot com
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@nag.co.uk]
Sent: Wednesday, July 04, 2001 3:19 AM
To: xsl-list@lists.mulberrytech.com
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.
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