[xslt] LibXSLT adding annoying whitespace



(sorry for the repost...I forgot to subscribe first)

I'm an AxKit user, and only use LibXSLT through XML::LibXSLT from Matt
Sergeant, so forgive me if this is a FAQ (I dug through mail archives, and
couldn't find any relevant topics however).

I'm using:
LibXML2 2.3.10
LibXSLT 0.11.0
XML::LibXSLT 1.06

I have a stylesheet with straight HTML inside the templates.  The tags in
question in the XSL template look like:

<td><img/><a><img/></a><br/><img/></td>

I took out the attributes, because they aren't important in this context.
When this is processed through AxKit (and thus LibXSLT), the resulting
output is:
<td>
<img>
<a><img></a>
<br>
<img>
</td>

This extra whitespace (the \n's) are causing the HTML to render incorrectly
(these images are supposed to fit exactly, as they're broken up from a
larger image).  I've tried everything I could think of, but no matter how I
try, I can't get rid of the extra whitespace.

This is what I'm trying to accomplish:
I want:      and instead, I'm getting:
+--+--+       +--+ +--+
|  |  |       |  | |  |
+--+--+       +--+ +--+
|     |       +------+
+-----+       |      |
              +------+

Has anyone experienced this before?  If so, is there a workaround?  Have I
found a bug?

--man
Michael A. Nachbaur
"What happens if a big asteroid hits the Earth?  Judging from realistic
simulations involving a sledge hammer and a common laboratory frog, we
can assume it will be pretty bad." - Dave Barry




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]