xml - Errors in rendering a RSS page -


i'm trying render rss page site. rss it'self works fine , it's validated. it's built php script made.

however, when implement css , xsl, , call page, message:

this page contains following errors:  error on line 4 @ column 1: document empty below rendering of page first error.  document created result of xsl transformation. line , column numbers given transformed result. 

but line 4 not empty @ all, nor rest of document.

please, here there xsl file:

<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform"> <xsl:template match="/feed">     <html>     <head>         <link href="xsl.css" rel="stylesheet" type="text/css" />         <style type="text/css">             body {                 font-size:0.83em;             }         </style>     </head>     <body>         <div id="logo">             <xsl:element name="a">                 <xsl:attribute name="href">                     <xsl:value-of select="channel/link" />                 </xsl:attribute>                 <xsl:value-of select="channel/title" />             </xsl:element>         </div>         <div class="snippet" style="border-width:0; background-color:#fff; margin:1em">             <div class="titlewithline">                 <xsl:value-of select="channel/description" />             </div>             <dl style="padding-right:1em">                 <xsl:for-each select="channel/item">                     <dd>                         <xsl:element name="a">                             <xsl:attribute name="href">                                 <xsl:value-of select="link"/>                             </xsl:attribute>                             <xsl:value-of select="title"/>                         </xsl:element>                     </dd>                     <dt>                         <xsl:value-of select="description" /><br />                         <span class="comments"><xsl:value-of select="pubdate" /></span>                     </dt>                 </xsl:for-each>             </dl>         </div>         <div id="footer">             <xsl:value-of select="channel/copyright" />         </div>     </body>     </html> </xsl:template> </xsl:stylesheet> 

the page "visible" here:

http://www.melanie-music.net/feed/?feed=rss2

you error above if go check source, find code

what can please?


edit:

deleting xsl line , adding argument

xmlns:atom="http://www.w3.org/2005/atom" 

to rss tag, @ least made fworking css still cdata not correctly interpreted

ok if has got, way remove attribute <rss> tag choice

for cdata, foudn topic: styling rss feed using xslt issues cdata tags

which great, need work bit it, in order make working in acceptable way , having added

<xsl:output method="html" doctype-system="about:legacy-compat" encoding="utf-8" indent="yes" /> 

to have html5 (let's say)


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -