[xslt] Weird whitespace after XSL transformation



Hello there,

I have a weird problem on one of my sites where I use XSLT (through PHP 5's libxslt bindings) to do the templating part. The site where I have the problems is my personal weblog, and it has a single XSLT-stylesheet which creates XHTML from an Atom-like internal XML format.

The actual problem is that on one of my pages, I get very nicely formatted output XHTML (with lined out tabs etc.), while on the other I just get a jumble of (largely identical) XML output. This poses problems, however, since whitespace is significant in XHTML. This is also why it shows up in my design (the problem is with the tags I use; on the one page they're nicely formatted with a space in between, on the other one they're merged together without any whitespace).

These are the pages I'm talking about:

XHTML: http://manuzhai.nl/weblog/
XML: http://manuzhai.nl/weblog/?transform=false

XHTML: http://manuzhai.nl/weblog/comments/revival/
XML: http://manuzhai.nl/weblog/comments/revival/?transform=false

In the XML source, look at the <category> elements; these seem to be formatted similarly in both source pages. In the XHTML source, you can look for <a href="/weblog/tag/*/">.

I hope this is the right place for such a question, that someone can tell me why this happens and that I can fix it from within PHP.

Thanks in advance,

Manuzhai



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