g_clarkey
-
Posts
3 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by g_clarkey
-
-
Hi i have kind changed the way i am doing things a little.I have a XML source.I run a transformation on that to create an rss file.This works fine, my rss worls in my reader, links back to site.My problem is i want the rss to be displayable to people who view the rss outside of a reader (much like the bbc do if you click on their rss).BBC SportI know how to attach the style sheet, just use the line
<?xml-stylesheet type="text/xsl" href="nolsol.xsl"?>
BUT. as i am creating my rss file from my xml source, i need to write the stylesheet line in my xsl code. What i want my code to look like is:rss.xml:
<?xml version="1.0" encoding="ISO-8859-1" ?><?xml-stylesheet title="XSL_formatting" type="text/xsl" href="nolsol.xsl"?><rss version="2.0"> <channel>
To do this i have currently this code in my xsl stylesheet:rss.xsl:
<?xml version="1.0" encoding="ISO-8859-1" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method='xml' version='1.0' encoding='UTF-8' indent='yes'/> <xsl:value-of select="title"/> <?xml-stylesheet type="text/xsl" href="nolsol.xsl"?> <rss version="2.0"> <channel>
Now currently this outputs:current output:
<rss version="2.0"> <channel><title>PWSB RSS</title><link>NewMusicReview.xml</link> <description>
Which as you can see doesnt include the stylesheet, and thus displays a tree structure when it is viewed.I am guessing the way i am trying to indicate the rss file has to use the stylesheet is incorrect, currently
<?xml-stylesheet type="text/xsl" href="nolsol.xsl"?>
just before the rss declaration.Any ideas on how i can go about getting this line to output? If i can get this one line to start of the rss.xml file my work would be done!cheers in advance,clarkey
-
Hi.I am implementing a website that will have its data in an XML source document.There are goin to be two transformations, one to XHTML, and one to RSS.The one to XHTML works fine, but i have a problem when it comes to RSS. I want to use XSL to create an RSS file from my original XML source.So i will have my xml file, with the link to the rss.xsl transformation at the top. I was hopeing this would display the rss file on screen. I can get it to do this, but it is just as a text file.I want my "text" file to be able to use the stylesheet it references, and to be readable by a rss reader.Have you any general ideas on how to do this?If you need the exact code i will post it.Thanks in advance for any help.
Create an RSS file from XML source using XSL
in XSLT/XSL-FO
Posted
Which does exactly what i wanted it two. i cant believe ive wasted a whole day on this!cheers again for the extra thought processes. appreciate it!clarkey.