User Name
Password
AppleNova Forums » Programmer's Nook »

Apply CSS to an Outside XML document?


Register Members List Calendar Search FAQ Posting Guidelines
Apply CSS to an Outside XML document?
Thread Tools
SledgeHammer
Senior Member
 
Join Date: May 2004
 
2007-09-15, 11:06

The title basically says it. I am looking to apply my own style to an XML document generated elsewhere.

More specifically, I am putting together a web site for a friend who just opened a small antiques shop. For now, there will be no business done through the site, but she will be selling some things on eBay. eBay generates RSS feeds based on searches. What I would like to do is embed the feed for all auctions by this one user in the store's home page. In order for that to be useful, though, I need to apply style to it. I am planning to embed it in the page using the <iframe> tag, so my first thought was to have the frame load a page that called a style sheet, and then called the feed. The most straightforward solution seems to be the <object> tag, but I don't know that that will allow the CSS to affect the RSS document.
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2007-09-15, 11:14

I don't think you'll be able to avoid post-processing the RSS feed on the server side, adding something like this to the second line:
Code:
<?xml-stylesheet type="text/css" href="screen.css"?>
So instead of this:
Code:
<?xml version="1.0"?> <rss version="0.91" xmlns:xhtml="http://www.w3.org/1999/xhtml">
The document begins like this:
Code:
<?xml version="1.0"?> <?xml-stylesheet type="text/css" href="screen.css"?> <rss version="0.91" xmlns:xhtml="http://www.w3.org/1999/xhtml">
  quote
Posting Rules Navigation
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

Post Reply

Forum Jump
Thread Tools
Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a css file have another suffix than .css? nassau Programmer's Nook 10 2006-10-30 02:40
Using CSS ast3r3x Genius Bar 3 2005-11-03 10:38
CSS question. Wickers Genius Bar 33 2005-01-04 16:49


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 08:41.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova