Re: [xsl] XHTML and xml:space

Subject: Re: [xsl] XHTML and xml:space
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Thu, 31 Jul 2008 16:02:56 +0100
> When transforming xhtml documents, I found out that sometimes an
> xml:space="preserve" attribute is added.
> If the xhtml document has doctype XHTML Basic 1.0, the attribute is
> added. If the doctype is XHTML 1.0 Strict, it isn't.
> Why this difference, and how do I prevent it?

The are probably defaulted by the DTD.  To prevent them just add a
no-op template:

<xsl:template match="@xml:space"/>

Andrew Welch

Current Thread