Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: day of week in Safari RSS




Okay, let me take a stab at this. Any apple engineers correct me if I'm wrong.


Taking a look at this file here:

/System/Library/PrivateFrameworks/Syndication.framework/Versions/ Current/Resources/Feed.xq

It seems that Safari's syndication works by taking a RSS/Atom/ whatever feed and using XQuery to convert it into a generic format that is more palatable/sane for the software to parse. This is done for the RFC822 date on this line:

let $date := replace($date, "[^,]+,\W*(\d+)\W*(\w+)\W*(\d+)\W*(\d{2}: \d{2}:\d{2})\W*(-|\+)(\d{1,2})(\d{2}$)", concat("$3-", $month, "-$1T$4 $50$6:$7"))

It would seem that the regex is trying to match one or more items before the day of the month as opposed to matching zero or more items before the day of the month (which would allow for dates that didn't have the optional day-of-week to be accepted). If some enterprising individual were to replace the above line in Feed.xq with something like this (which is probably wrong in some minute way and is admitted ugly)

let $date := replace($date, ".*?,?\W*(\d+)\W*(\w+)\W*(\d+)\W*(\d{2}:\d {2}:\d{2})\W*(-|\+)(\d{1,2})(\d{2}$)", concat("$3-", $month, "-$1T$4 $50$6:$7"))

They might be able to get a temporary fix (or a permanent one if Apple rolled it back into their code).

--Ilan


On Nov 29, 2005, at 11:33 PM, Douglas Maus wrote:


A request for clarification - is "day of week" optional in <pubDate> (subtitle: Safari nonconforming?)

RSS 2.0 states that pubDate should follow RFC(2)822
as in:
[day ","] date month year hh:mm:ss timezone

I read this as: day of week is optional.

I have a feed that omits day of week in <pubDate>s
FeedValidator.org validates it as conforming.

Safari balks at the same <pubDate>s, ignoring them, and reporting the
date as when the feed was last accessed - typically "today at 10:25pm"

A minor quibble, but on the other hand, smarter minds than I have
pointed out that the day of week is redundant and, when
the day of week is incongruous with the date, as with the man with two
watches, "is never quite sure of the time (date)".

Thanks for any advice.

(btw, bug reports via Safari several months ago have received no reply)

Doug Maus



_______________________________________________
Do not post admin requests to the list. They will be ignored.
syndication-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/syndication-dev/listboy% 40clarux.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. syndication-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/syndication-dev/email@hidden

This email sent to email@hidden
References: 
 >day of week in Safari RSS (From: "Douglas Maus" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.