abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danny Ayers" <danny.ay...@gmail.com>
Subject Conneg & styling PIs
Date Sun, 06 Aug 2006 11:47:38 GMT
I've got a very crude atom2html.xsl I want to use for display of the
feed in browsers  (though as I type I remember CSS directly on the
Atom format works in most browsers, might be easier for what I've got
in mind). But unless I'm mistaken serving "application/atom+xml" will
cause the browser to hunt for a registered external app.

I'm not sure how much the Accept: header is used in feed readers, but
one thing I'm trying now is the following switch:

if (Accept: includes "application/atom+xml") then
    return feed doc as "application/atom+xml"
    insert stylesheet processing instructions into doc
    return as "text/html"

Thing is, as the Abdera API stands right now there's now obvious way
of inserting the PI (bear in mind I've never used Axiom or Stax before
Suggestions? Or am I missing an obvious reason this isn't a good idea?

btw, I just put together a utility method for sorting entries (by
updated) and if requested trimming to a given number of entries. As
yet untested, so I don't even know if it works let alone whether this
idiom is a good one.




View raw message