Hi,
Yopu specified "text" as your desired output format, which doesn't seem to be
what you wanted.
Change
<xsl:output method="text" doctype-public="-//Netscape
Communications//DTD RSS 0.91//EN"
doctype-System="http://my.netscape.com/publish/formats/rss-0.91.dtd"
encoding="utf-8" />
to
<xsl:output method="xml" doctype-public="-//Netscape
Communications//DTD RSS 0.91//EN"
doctype-System="http://my.netscape.com/publish/formats/rss-0.91.dtd"
encoding="utf-8" />
and you get it.
best regards,
Roman
> -----Original Message-----
> From: Smoother@xxxxxx [mailto:Smoother@xxxxxx]
> Sent: Monday, July 31, 2006 2:39 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Make RSS output?
>
> Hi,
>
> today I have tried to output rss with xsl. I'm using libxslt
> (which is used by php5) to do so, but I always get
> well-formatted html.
>
> My stylesheet:
> =====================================================
>
> <?xml version='1.0' encoding='utf-8'?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:rss="http://purl.org/rss/1.0/"
> xmlns:dc="http://purl.org/dc/elements/1.1/"
>
> xmlns:content="http://purl.org/rss/1.0/modules/content/"
> version="1.0">
>
> <xsl:output method="text" doctype-public="-//Netscape
> Communications//DTD RSS 0.91//EN"
>
> doctype-system="http://my.netscape.com/publish/formats/rss-0.9
> 1.dtd" encoding="utf-8" />
>
> <xsl:template match="/">
>
> <rss version="0.91">
> <channel>
> <title>...</title>
> <link>...</link>
> <description>...</description>
> <language>en-us</language>
>
> <copyright>...</copyright>
>
> <item>
> <title>...</title>
> <description>...</description>
> <link>...</link>
> </item>
> </channel>
> </rss>
>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
> Output:
> =====================================================
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <title></title>
> </head>
> <body>
> .........en-us............
> </body>
> </html>
>
>
> It should be something like this:
> =====================================================
>
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD
> RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">
> <rss version="0.91">
> <channel>
> <title>...</title>
> <link>...</link>
> <description>...</description>
> <language>en-us</language>
>
> <copyright>...</copyright>
>
> <item>
>
> <title>...</title>
> <description>...</description>
> <link>...</link>
> </item>
>
> </channel>
> </rss>
>
>
> As I said, I'm using php5 with xsltProcessor and DomDocument,
> the same way as it is used in the example found at
> http://de2.php.net/manual/en/function.xsl-xsltprocessor-construct.php
>
>
> What is necessary to get there? Can someone please give an
> example? Google returns only tuotrials on how to access rss with xsl.
>
> Thanks, S. Renault.
> --
>
>
> Echte DSL-Flatrate dauerhaft f|r 0,- Euro*. Nur noch kurze Zeit!
> "Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl
| Current Thread |
- Make RSS output?
- Smoother - 31 Jul 2006 12:39:29 -0000
- <Possible follow-ups>
- Huditsch, Roman \(LNG-VIE\) - 31 Jul 2006 12:47:44 -0000 <=
- Smoother - 31 Jul 2006 14:00:11 -0000
|
|