[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Server Side Including an XSL Formatted XML

Subject: Re: [xsl] Server Side Including an XSL Formatted XML
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 18 Jan 2005 17:36:32 GMT

If you are wanting the XSLT to execute on the client's browser, then
your server has to serve a well formed XML file with the stylesheet PI
at the top. The fact that the document that is served came from various
places on your filesystem put together by server side includes isn't
"known" to the browser. So your serevr side includes have to produce a
well formed XML (not HTML) file such that when you "view source" in teh
browser it is a well formed XML file starting with the xml-stylesheet
PI. the stylesheet must then convert the whole document (not just the
part included from your xml file) to html. Both the document and the
style file will need to be served with a suitable mime type eg
application.xml not text/html (mozilla won't dislay anything at all if
the mime types are wrong, IE is less fussy).

Alternatively (and probably better) you can do the transform on the
server (details depending on your server configuration) so that you 
transform your xml to html, and include teh generated html into teh rest
of your document with ssi. That way teh result will work with far more
browsers as they do not need to have XSLT support.


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

Current Thread