|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I am looking into converting a web site from dhtml and css into xml and xsl, I have a number of reasons for this but its basically down to content management issues. I hadn't thought about it too much before but can anyone tell me which browsers fully support xsl, I've been having a look through several resources which haven't really told me much so far. The browsers I'm interested in are: IE Mozilla Netscape Opera - I know IE definately supports xsl from ver 5.0 onwards but what about version 4.0 - 5.0? I expect the latest versions of the other browsers support it but I need to know about earlier versions as well... Any ideas anyone? Also I had been wondering about xsl support for absolute positioning. I know you can do it in CSS level 2, (not level 1) but I'm not sure how this would translate to xsl... Again any ideas anyone? Many thanks for any time you can spare on this, all help is very gratefully recieved. Dan
__________________
DELETE FROM pay WHERE employee_name ='Dan'; |
|
#2
|
|||
|
|||
|
IE, Mozilla and Netscape does support XSL.
Opera doesn't. Take a look on theirs support page http://www.opera.com/docs/specs/#xml However, if you are using some server side language (ASP, .NET or PHP for example) all browsers will work with XSL becouse it's plain HTML that you are outputing to the browser. Last edited by DarrenJ : May 21st, 2003 at 05:56 PM. |
|
#3
|
|||
|
|||
|
Thanks for the help
As the site is currently static I hadn't really thought about using a server-side script to process the xml/xsl but that is definately something I can look into... I had a look at the articles on Devshed about xsl and found an example which i used to test the four browsers I am trying to cater for but I didn't get the expected results. Out of the four, only IE would apply the xsl stylesheet to the xml, the code I used follows, I'm a newbie to xml so it'll probably be something simple I've missed ![]() xml coding: <?xml version="1.0"?> <?xml:stylesheet type="text/xsl" href="style.xsl"?> <review id="57" category="2"> <title>Moulin Rouge</title> <cast> <person>Nicole Kidman</person> <person>Ewan McGregor</person> <person>John Leguizamo</person> <person>Jim Broadbent</person> <person>Richard Roxburgh</person> </cast> <director>Baz Luhrmann</director> <duration>120</duration> <genre>Romance/Comedy</genre> <year>2001</year> <body> A stylishly spectacular extravaganza, <title>Moulin Rouge</title> is hard to categorize; it is, at different times, a love story, a costume drama, a musical, and a comedy. Director <person>Baz Luhrmann</person> (well-known for the very hip <title>William Shakespeare's Romeo + Juliet</title>) has taken some simple themes - love, jealousy and obsession - and done something completely new and different with them by setting them to music. </body> <rating>5</rating> <teaser>Baz Luhrmann's over-the-top vision of Paris at the turn of the century is witty, sexy...and completely unforgettable</teaser> </review> xsl coding: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/review"> <html> <head> <basefont face="Arial" size="2"/> </head> <body> <xsl:apply-templates select="title"/> (<xsl:apply-templates select="year"/>) <br /> <xsl:apply-templates select="teaser"/> <p /> <xsl:apply-templates select="cast"/> <br /> <xsl:apply-templates select="director"/> <br /> <xsl:apply-templates select="duration"/> <br /> <xsl:apply-templates select="rating"/> <p> <xsl:apply-templates select="body"/> </p> </body> </html> </xsl:template> <xsl:template match="title"> <b><xsl:value-of select="." /></b> </xsl:template> <xsl:template match="teaser"> <xsl:value-of select="." /> </xsl:template> <xsl:template match="director"> <b>Director: </b> <xsl:value-of select="." /> </xsl:template> <xsl:template match="duration"> <b>Duration: </b> <xsl:value-of select="." /> minutes </xsl:template> <xsl:template match="rating"> <b>Our rating: </b> <xsl:value-of select="." /> </xsl:template> <xsl:template match="cast"> <b>Cast: </b> <xsl:apply-templates/> </xsl:template> <xsl:template match="person[position() != last()]"> <xsl:value-of select="." />, </xsl:template> <xsl:template match="person[position() = (last()-1)]"> <xsl:value-of select="." /> </xsl:template> <xsl:template match="person[position() = last()]"> and <xsl:value-of select="." /> </xsl:template> <xsl:template match="body"> <xsl:apply-templates/> </xsl:template> <xsl:template match="body//title"> <i><xsl:value-of select="." /></i> </xsl:template> <xsl:template match="body//person"> <b><xsl:value-of select="." /></b> </xsl:template> </xsl:stylesheet> I hope someone can shed some light on this.. thanks for any help you can give ![]() Dan |
|
#4
|
|||
|
|||
|
xsl output rendering in mozilla (firefox,netscape)
you probably already got your answer but for anyone else who follows this thread:
if you add <xsl utput method="html"> just below your <stylesheet... tag, the mozilla browsers will render the html output.Quote:
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Browser support for xsl |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|