Re: Simple CopyOf XSLT translation
| From: | Jochem Maas | Date: | Wed, 02 Nov 2005 11:07:00 +0000 |
| Subject: | Re: Simple CopyOf XSLT translation | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-224940@lists.php.net to get a copy of this message | ||
Torgny Bjers wrote:
Quoting Andy Pieters <mailings@vlaamse-kern.com>:good for them for complaining, getting paid to build websites and then not test them on the most widely used browser is extremely arrogant - I assume your a firefox bigot :-) (just like me).Hi list I made an entire site in xhtml for a client but now complaints are comming from the m$ explorer front. Broken layouts, long loading times etc.
by all means, but its like using a sledgehammer to crack a walnut. nothing in IE stops it from rendering XHTML. given the use of XHTML you should be using CSS to style the page ... its your CSS that need addressing (and possibly the XHTML is not _completely_ valid) IHMO (x)HTML without a css file (or inline <style>) _should_ look like shit because it is merely defining a logical structure for the content (like a book has chapters and pages) which has nothing to do with display fo that information (that a book has pages and chapters says nothing about whether it looks good). depending on your level of purism you might try changing the DOCTYPE declaration (or dropping it altogether) to see how that affects the rendering mode of different browsers.Would it be possible for php to do the xslt translation?
I would suggest its hit and miss - what if an Opera (for instance) user is spoofing his uger-agent as IE? besides the chance that you can reasonably create xslt for generating flawless XHTML and HTML4.01 (strict/transitional?) is remote - I mean who knows _all_ the rules of which tags, attribs, etc, etc are allowed in by which DTD.All that is currently in my xslt is <stylesheet> <template match="/"> <copy-of select="." /> </template> </stylesheet> And serve those pages as html 4.01 instead of xhtml on internet explorer?
With kind regards AndyHello Andy, If you are using PHP 5, look at the XSL module, otherwise you'll have to use XSLT and Sablotron. Check out the manual http://www.php.net/manual/en/ for more information on these. I suggest using Tidy if possible to convert from XHTML to HTML 4.0.1, this is the easiest way to convert/clean markup without having to do all the hard work yourself. It seems to me that with your very small xslt file, you could skip using xslt in general? Or maybe you did it that way to pave way for future additions with more advanced XSLT function usage? Regards, Torgny