Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am trying to validate an RSS feed which is being created in my XSLT - However it keeps coming back with the following
This feed does not validate.line 2, column 1: XML parsing error: <unknown>:2:1: XML or text declaration not at start of entity [help] <?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="htt ...
This feed does not validate.
line 2, column 1: XML parsing error: <unknown>:2:1: XML or text declaration not at start of entity [help]
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="htt ...
Here is the beginning of the XSLT
<xsl:value-of select="umbraco.library:ChangeContentType('text/xml')"/> <xsl:text disable-output-escaping="yes"><?xml version="1.0" encoding="UTF-8"?></xsl:text> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/">
I think its because of the space before the XML starts? Anyone else experienced this?
I would put the
<?xml version="1.0" encoding="UTF-8"?>
Into the template, and also remove any line breaks and spaces before the .net content placeholders. This should get around these problems,
As in, something like this
<%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %><asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server"><?xml version="1.0" encoding="UTF-8"?>
Also, the MIME type
application/rss+xml
Seems to make sure all browsers render the feed as a feed when viewed directly via the browser
Might work!
Dan
Good idea dan I'll give that a go
Found the problem based off Dans post - It was actually some whitespace in the template! Just removed that and bobs your uncle, fanny's your aunt, bing, bang, bong it works.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
White Space In RSS Feed (Beginning)
I am trying to validate an RSS feed which is being created in my XSLT - However it keeps coming back with the following
This feed does not validate.
line 2, column 1: XML parsing error: <unknown>:2:1: XML or text declaration not at start of entity [help]
Here is the beginning of the XSLT
I think its because of the space before the XML starts? Anyone else experienced this?
I would put the
Into the template, and also remove any line breaks and spaces before the .net content placeholders. This should get around these problems,
As in, something like this
Also, the MIME type
Seems to make sure all browsers render the feed as a feed when viewed directly via the browser
Might work!
Dan
Good idea dan I'll give that a go
Found the problem based off Dans post - It was actually some whitespace in the template! Just removed that and bobs your uncle, fanny's your aunt, bing, bang, bong it works.
is working on a reply...