[lxml-dev] Overriding whitespace normalization under XSLT
Lee Brown
leebrown at leebrown.org
Sat Mar 17 14:10:19 CET 2007
Greetings!
With regards to the snippet below, the "missing" space is valid XHTML but
not valid HTML according specifications preceding HTML 4.01.
Provided that it won't break your consumer's browser agents, setting the
DOCTYPE to HTML 4.01 Strict or to XHTML 1.0 Strict and omitting the leading
XML declaration should cause this to render correctly in most modern
browsers.
If you must support older browsers, try adding a closing </img> tag.
Technically, that's invalid HTML as well, but most of the older browsers
will parse it anyway.
Best Regards,
Lee E. Brown
(leebrown at leebrown.org)
-----Original Message-----
From: lxml-dev-bounces at codespeak.net [mailto:lxml-dev-bounces at codespeak.net]
On Behalf Of Stefan Behnel
Sent: Saturday, March 17, 2007 1:33 AM
To: Nathan R. Yergler
Cc: lxml-dev at codespeak.net
Subject: Re: [lxml-dev] Overriding whitespace normalization under XSLT
Nathan R. Yergler wrote:
> The part that's problematic is this line:
>
> <a rel="license" href="{$license-uri}"><img alt="Creative
Commons
> License" style="border-width:0" src="{$license-button}" /></a><br/>
>
> Note that there is a space between the closing quote of the src
> attribute on the image tag and the "/>" closing bracket. When we
> process the transform, we consistently end up with
>
> <a rel="license" href="..."><img alt="Creative Commons
License"
> style="border-width:0" src="..."/></a><br/>
>
> (note the space has been removed)
That's perfectly well-formed XHTML. But rumour has it that some browsers
can't handle that. It's just not old-style HTML-ish enough.
Stefan
_______________________________________________
lxml-dev mailing list
lxml-dev at codespeak.net
http://codespeak.net/mailman/listinfo/lxml-dev
More information about the lxml-dev
mailing list