[thelist] [XHTML] XSLT from within an XHTML document

Scott Wehrenberg swehren at gmail.com
Fri Feb 25 16:01:32 CST 2005


On Fri, 25 Feb 2005 09:56:16 -0600, Jacques Capesius
<Jacques.Capesius at compellent.com> wrote:
 > I'm hoping to harness the power of XSLT from within XHTML to do some
> transformations and other silliness to a webpage before showing it to
> the user. I know that you can specify an XSL sheet from within an XML
> document like the following...

I'm not really an expert in this area, as I'm just beginning to really
learn about XSLT, but here's how I understand things. XHTML is in a
grey area caused by the transition from HTML 4.01 -> XHTML. If you
serve it up with type html/text I believe the browsers will always
treat it as HTML and won't apply your XSLT. If you serve it as
text/xml+application (I think that's the correct type), then they'll
treat it as XML and apply the XSLT. There are a number of other
problems which can crop up when serving XHTML as XML depending on how
you use it.


More information about the thelist mailing list