This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Converting RSS to HTML


Ronan Brady wrote:
> 
> I'm trying to convert from RSS 1.0 to HTML, but I'm having serious trouble
> selecting elements from the RSS file.
> Specifically, the element <rdf:RDF> is causing me problems because it's
> qualified by a namespace.

The other elements are also qualified, even if you are using a default
namespace.

What you need is to add a declaration for the RSS namespace in you
stylesheet:

<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rss="http://purl.org/rss/1.0/"
>

and the qualify all your elements

(for instance: select="/rdf:RDF/rss:channel").

Hope this helps.

Eric
-- 
See you in Austin (Knowledge Technologies 2001)
              http://www.gca.org/attend/2001_conferences/kt_2001/mon.htm
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
------------------------------------------------------------------------

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]