XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 20th, 2003, 10:45 AM
dan_2001 dan_2001 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Wellingborough, Northants, UK
Posts: 100 dan_2001 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 2 m 2 sec
Reputation Power: 8
Question Browser support for xsl

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';

Reply With Quote
  #2  
Old May 21st, 2003, 05:51 PM
DarrenJ DarrenJ is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 42 DarrenJ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 21 sec
Reputation Power: 6
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.

Reply With Quote
  #3  
Old May 22nd, 2003, 05:50 AM
dan_2001 dan_2001 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Wellingborough, Northants, UK
Posts: 100 dan_2001 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 2 m 2 sec
Reputation Power: 8
Smile Thanks for the reply Darren

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

Reply With Quote
  #4  
Old September 1st, 2004, 01:03 PM
sfurrh sfurrh is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 2 sfurrh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
xsl output rendering in mozilla (firefox,netscape)

you probably already got your answer but for anyone else who follows this thread:
if you add <xslutput method="html"> just below your <stylesheet... tag, the mozilla browsers will render the html output.

Quote:
Originally Posted by dan_2001
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Browser support for xsl


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT