1 of 2
1
Atom 1.0 Support?
Posted: 16 July 2005 06:59 AM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  212
Joined  01-10-2004

I haven’t actually tried yet but does anyone know if EE supoprts Atom 1.0 feeds?  I would imagine so but there could be something quirky in the module.

 Signature 

bryan | website

Profile
 
 
Posted: 16 July 2005 03:24 PM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  06-19-2002

It should just be a matter of constructing the Template correctly.  We’re certainly planning on adjusting the current 0.3 one to 1.0, but we haven’t done so yet.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 18 July 2005 07:31 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  212
Joined  01-10-2004

Great to hear Chris.  Thanks!

 Signature 

bryan | website

Profile
 
 
Posted: 19 July 2005 09:13 PM   [ Ignore ]   [ # 3 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  06-19-2002

Can I just mention that the “human readable” information available regarding Atom 1.0 is sorely lacking at this point.  I have a Template that’s almost complete, but for some reason I’m getting errors regarding the “ ” character entity. [sigh]

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 20 July 2005 09:02 AM   [ Ignore ]   [ # 4 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1329
Joined  02-12-2003

I looked over it after reading this thread and decided to wait and let you figure it out.  smile

Jamie

Profile
 
 
Posted: 22 July 2005 02:15 PM   [ Ignore ]   [ # 5 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  212
Joined  01-10-2004

I’m going to also try to play around with creating a template sometime this weekend.

 Signature 

bryan | website

Profile
 
 
Posted: 22 July 2005 03:06 PM   [ Ignore ]   [ # 6 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  06-19-2002

I’ll go ahead and attach a text version of the “Atom 1.0” Template as it stood when I last stopped working on it.  It validated fine aside from the presence of a non-breaking space character ( ) in the main “body” content.  I was unable to determine why the validator was claiming it was an “unidentified entity”.

File Attachments
atom_1.0.txt  (File Size: 2KB - Downloads: 141)
 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 23 July 2005 12:35 PM   [ Ignore ]   [ # 7 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  212
Joined  01-10-2004

Well I played around with it some and had the same issue as you, it claimed   was an unidentified character.  Seems to work fine however in NetNewsWire and Safari RSS so I’m going to chalk it up to just a validator bug.

The only way around it that I found was to put the content section into a CDATA block but that caused some rendering errors with Safari.

 Signature 

bryan | website

Profile
 
 
Posted: 23 July 2005 02:01 PM   [ Ignore ]   [ # 8 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  06-19-2002

Well, supposedly the use of the “type” attribute on <content> and the “xmlns” attribute on the <div> inside should make use of the CDATA bit redundant (or maybe even invalid, I’m not sure).  My guess is that if the numeric entity were used for the non-breaking space instead of the character entity then it might work fine.  I haven’t tested that, though.  That still wouldn’t explain why the character entity is “undefined”.

The practical information available for Atom 1.0 (at least as of a few days ago when I was working on it) is virtually non-existent right now.  Further, it’s not even an approved format at this point so it isn’t really even “official” or “released”.  It’s simply a draft.  I never even really “got” the point behind Atom and why it’s somehow better than RSS 2.0 (or 1.0, for that matter) in any practical, real-world scenario.  My feeling is that until there is more useful information on the format available and until it actually is an approved format then it’s probably not worth spending the effort on this. [shrug]

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 23 July 2005 05:23 PM   [ Ignore ]   [ # 9 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  212
Joined  01-10-2004

Well the reason CDATA would work is that anything inside a CDATA block is basically exempted from being judged in the parsing when validating a feed (not that it still doesn’t need to be well formed for the reader to interpret it).

Speaking of the numeric value for for the non-breaking space where would I find that at to modify it in the core files to test out if using the numerical value fixes the issue?

 Signature 

bryan | website

Profile
 
 
Posted: 23 July 2005 05:42 PM   [ Ignore ]   [ # 10 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  06-19-2002

Yes, CDATA is used with RSS to do that, but the technical specification document for the Atom 1.0 draft suggested to me that it should not be used in this case in Atom 1.0.  According to it, if you have the “type” and “xmlns” defined correctly for XHTML, then you should simply put valid, well-formed XHTML in as the content.  The question is, why is the non-breaking space supposedly “invalid” (“undefined”, specifically) in this case?  It’s certainly allowed in standard XHTML.  Is it really invalid or is feedparser.org returning a false-positive here?


As for using the numeric entity, do a search through system/core/core.typography.php for “nbsp;”.  There are 8 instances I see in a quick search.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 23 July 2005 07:29 PM   [ Ignore ]   [ # 11 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  212
Joined  01-10-2004

No, I completely agree, CDATA is unnecessary in Atom 1.0.  I have a feeling it’s a parser issue, but I’ll play with the typography file for a bit to see if it makes a difference.

Edit: I also filed a bug report on the Feedvalidator.org bug tracker to have them look into it.

 Signature 

bryan | website

Profile
 
 
Posted: 23 July 2005 08:23 PM   [ Ignore ]   [ # 12 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  212
Joined  01-10-2004

Ok well here’s the problem:

&nbsp;

, while it is valid XHTML is not valid XML. To be proper XML it would need to be either

&amp;nbsp;

or the numeric value.  This would be the case for any named entity when used in place of the numeric.

I tried the XML_encode plugin around the content section which does get the feed to validate but that strips out waaaaay too much stuff so the feeds contain alot of garbage when viewed in a reader.  So nanovivid and I are working on another plugin specific for this task.  I’ll let you know how it goes.

If this works then it may be something you guys might want to look into just incorporating generally into the RSS module if possible to “future proof” feeds.

&nbsp;

 Signature 

bryan | website

Profile
 
 
Posted: 23 July 2005 08:35 PM   [ Ignore ]   [ # 13 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  06-19-2002

Thanks for continuing to look into this, schweb.  I’m curious where you found the information about the character entities not being valid XML; I’d like to read up on that.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 23 July 2005 08:40 PM   [ Ignore ]   [ # 14 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  212
Joined  01-10-2004

Ok the plugin is made (and submitted to the plugin library) that fixes this problem and turns named entities into valid XML without messing up the rest of the encoding.

An example of its use:

<content type="xhtml">
<
div xmlns="http://www.w3.org/1999/xhtml">
{exp:xml_entities}
{body}{extended}
{
/exp:xml_entities}
</div>
</
content>

You can download the plugin from here until it’s in the plugin library.

 Signature 

bryan | website

Profile
 
 
Posted: 23 July 2005 08:44 PM   [ Ignore ]   [ # 15 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  212
Joined  01-10-2004
Chris Curtis - 23 July 2005 08:35 PM

Thanks for continuing to look into this, schweb.  I’m curious where you found the information about the character entities not being valid XML; I’d like to read up on that.

No problem Chris, I’m kind of an Atom junior evangelist so I really wanted to get this working.  My first clue that it wasn’t a validator issue was that LiveJournal was also giving an error on the feed.  Here’s more information on the whole XML character entity library and its issues.  Not that it specifically spells out the problem, but through inference you can deduce it.

 Signature 

bryan | website

Profile
 
 
Posted: 23 July 2005 11:33 PM   [ Ignore ]   [ # 16 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32760
Joined  05-14-2004

Wiki’d.

 Signature 
Profile
MSG
 
 
Posted: 24 July 2005 02:28 AM   [ Ignore ]   [ # 17 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  758
Joined  09-27-2004

a little problem with the atom 1.0 on my side. settings all ok, but in nnw i get the message:

Can’t display news for this subscription because:

Can’t display this subscription because the feed could not be found.

ideas?

Profile
 
 
Posted: 24 July 2005 06:56 AM   [ Ignore ]   [ # 18 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  212
Joined  01-10-2004

Do you have the latest version of NNW…2.0.1?  If you don’t that could be the problem since releases before that don’t support Atom 1.0.

Also be sure to get the updated template from the Wiki.  The one that was there earlier was missing alot of stuff if that’s what you were using.

 Signature 

bryan | website

Profile
 
 
   
1 of 2
1
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64462 Total Logged-in Users: 30
Total Topics: 80982 Total Anonymous Users: 24
Total Replies: 435759 Total Guests: 232
Total Posts: 516741    
Members ( View Memberlist )