You are here: Re: [PHP] Simple CopyOf XSLT translation « PHP « IT news, forums, messages
Re: [PHP] Simple CopyOf XSLT translation

Posted by Jochem Maas on 11/02/05 13:07

Torgny Bjers wrote:
> Quoting Andy Pieters <mailings@vlaamse-kern.com>:
>
>> 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.

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).

>>
>> Would it be possible for php to do the xslt translation?

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.

>>
>> 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?

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.

>>
>> With kind regards
>>
>>
>> Andy
>
>
> Hello 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
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация