Thanks agin for your reply!Your first piece of code is brilliant. I'm taking this in small steps as I can feel I'm in over my head with the little knowledge I have With this code I can specify a search word in the code and get the results,
<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/rss/channel"><xsl:for-each select="item[node()[contains(translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz') ,translate('sql','ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'))]]"><p><xsl:value-of select="title"></xsl:value-of></p><p><xsl:value-of select="description"></xsl:value-of></p></xsl:for-each></xsl:template></xsl:stylesheet>
This displays all articles that contains the word sql.I've linked the XSL file in the XML document but this turns the XML document into a list with the title and description content.
<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="stylesheet1.xsl"?><rss version="2.0"><channel>
Instead of displaying it as a text list as it is now, could it be displayed as an XML document?Really what I want the stylesheet to do is to filter the XML document so it removes all the item elements and what's in them if title or description doesn't match the keyword in the stylesheet.
<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="stylesheet1.xsl"?><rss version="2.0"><channel> <title>Some title</title> <link>Some link</link> <description>Some articles</description> <language>en</language> <lastbuilddate>Wed, 18 Oct 2006 14:57:32 PST</lastbuilddate> <item> <title>First Title</title> <description>Description 1</description><link>Link 1</link> <pubdate>Wed, 18 Oct 2006 14:55:48 PST</pubdate> </item><item> <title>Second Title</title> <description>Description 2</description><link>Link 2</link> <pubdate>Wed, 18 Oct 2006 14:55:48 PST</pubdate> </item></channel></rss>
For example if the keyword is "First" it should only display the following,
<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="stylesheet1.xsl"?><rss version="2.0"><channel> <title>Some title</title> <link>Some link</link> <description>Some articles</description> <language>en</language> <lastbuilddate>Wed, 18 Oct 2006 14:57:32 PST</lastbuilddate> <item> <title>First Title</title> <description>Description 1</description><link>Link 1</link> <pubdate>Wed, 18 Oct 2006 14:55:48 PST</pubdate> </item><item></channel></rss>
I'm getting quite confused myself so I'm sorry if it doesn't make sense! Thanks again!