Hi Dave,
It's my hope that we are talking about is really more similar than
different.
First off I should say that the implementation we have come up with does
not differ from the existing UL impl in terms of logic. It would be
hard for it to vary too much since I worked from the UL code, converting
stage-by-stage and I think we agree on the 3 callback points don't we?
(the 3rd callback is for the feed and is required to introduce any
xmlns: and optionally allow custom tags outside the channel).
Second I think there are very good reasons not to use string
concatenation. Code using tables is IMO a *lot* simpler to understand
since you are operating closer to the semantic level of the data than
you are when using strings, i.e. to add an attribute I make a new entry
in the table rather than finding the right spot in the string, splitting
it and concatenating the whole lot together. If you consider
querying/modifying existing attributes or PCDATA it becomes even more
compelling to use tables. Using strings effectively means "parsing" the
XML yourself. In ease-of-reading & maintenance terms I think the table
based code has all the advantages.
I would hesitate to suggest re-architecting this if it weren't so
important. If you are worried about dependent clients please take the
code and satisfy yourself that it produces semantically equivalent
results. As I mentioned in my email it passes both your own RSS
validator and the validator at archive.org. Radio groks it and I also
asked Don Park to feed it through Docuverse Daily. Dependents see valid
RSS and don't need to know how it was generated.
Lastly, I guess, I am offering you code which, unless I am mistaken,
already works in a real life implementation and, once vetted, could be
adopted as soon as you wanted.
Regards,
matt
-----Original Message-----
From: Dave Winer [mailto:dave@...]
Sent: 04 December 2002 12:27
To: radio-dev@yahoogroups.com
Subject: Re: [radio-dev] RFC: RSS 2.0 and writeRssFile callbacks
How about something much simpler that allows you to be called back to
add text at the item level and the channel level.
I'm reluctant to rearchitect the RSS serializer, so much depends on it.
Dave