Karine Delvare <kdelvare(_at_)nerim(_dot_)net> writes:
I am generating RSS feeds from an HTML file. With Perl, until I
finally realized XSLT would be a much better solution. I decided
to create a new XML file, and to have seceral XSL stylesheets,
one to produce the HTML file and the others to produce the RSS
files. First question: was that stupid?
The XML file is currently looking like this:
I managed to write the XSL to produce HTML:
Now I'm struggling with the RSS1.0
feed. http://edhel.gimp.org/devnews-rss1.xsl produces
The <item> markup gets a xmlns="" attribute, and I don't know
where that comes from.
It's because you're using namespaces elsewhere.
You know what though? It's better to use RSS 2.0 or ATOM because
they're simpler and better supported than RDF/RSS.
Here's the guts of an RSS 2.0 stylesheet for your data:
<xsl:when test="//a[contains(@href, 'gimp.org')]">
You might apply this with the xpath:
I personally think you'd do much better putting real dates in your
source file. Tag each item with a date because RSS files with real
dates in are much better for users (they can be aggregated by date and
are much better that way). This follows an old data processing rule:
never remove information until you have to.
So, second question: what did I miss there?
I think it's just because the RDF ns is there, libxslt wants to name
the other ns as well; even though it's null it's still there.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>