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 March 1st, 2004, 05:52 AM
Tanisete Tanisete is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 Tanisete User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
No xslt transformation with an rss

Hello to all:

I'm trying to transform a rss document after visiting many sites, and trying to do many things, i cannot get it to work. It's my first try, and it's very simple, but it seems that the rdf:RDF label is not found and it doesn't process it or something like that.
The XSL file is this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
version="1.0"
>

<xslutput method="html"/>

<xsl:template match="/">
<html><body>
<xsl:apply-templates/>
</body></html>
</xsl:template>

<xsl:template match="/rdf:RDF/item/title">
<h1 align="center"> <xsl:apply-templates/> </h1>
</xsl:template>

<xsl:template match="//rdf:RDF/item/dc:creator">
<p> <xsl:apply-templates/> </p>
</xsl:template>

</xsl:stylesheet>

And a sample item that i'm trying to transform to html:

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:slash="http://slashcode.com/rss/1.0/modules/Slash/"
xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/"
xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
>

<item rdf:about="http://barrapunto.com/article.pl?sid=04/02/27/0858236">
<title>Inundaron de 'spam' a los propios 'spammers'</title>
<link>http://barrapunto.com/article.pl?sid=04/02/27/0858236</link>
<dc:creator>JJ</dc:creator>
<dc:subject>spam</dc:subject>
<dc:date>2004-02-27T08:53:19+00:00</dc:date>
<slash:department></slash:department>
<slash:section>articles</slash:section>
<slash:comments>38</slash:comments>
<slash:hitparade></slash:hitparade>
</item>


THANKS A LOT!!!

Reply With Quote
  #2  
Old March 2nd, 2004, 08:25 AM
MattSidesinger's Avatar
MattSidesinger MattSidesinger is offline
Java PHP Oracle Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: C-Bus OH-IO
Posts: 204 MattSidesinger User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 26 sec
Reputation Power: 5
Send a message via AIM to MattSidesinger
Is this your XML input?

Code:
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:slash="http://slashcode.com/rss/1.0/modules/Slash/"
xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/"
xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
>

<item rdf:about="http://barrapunto.com/article.pl?sid=04/02/27/0858236">
<title>Inundaron de 'spam' a los propios 'spammers'</title>
<link>http://barrapunto.com/article.pl?sid=04/02/27/0858236</link>
<dc:creator>JJ</dc:creator>
<dc:subject>spam</dc:subject>
<dc:date>2004-02-27T08:53:19+00:00</dc:date>
<slash:department></slash:department>
<slash:section>articles</slash:section>
<slash:comments>38</slash:comments>
<slash:hitparade></slash:hitparade>
</item>


If it is, there is no root element.

Also, in the future, you please use the [ code ] and [ /code ] so that the code is neatly formatted? (remove the spaces after an before the [ and ]) -- Thanks

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > No xslt transformation with an rss


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


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





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