Let me get a few lines of code together, and send it back to this post... any and all comments, and even furthermore, testing anyone can throw at it will be GREATLY appreciated :)
On 3/31/06, Antone Roundy <[EMAIL PROTECTED]> wrote:
On Mar 31, 2006, at 7:01 AM, A. Pagaltzis wrote:
> * M. David Peterson <[EMAIL PROTECTED]> [2006-03-31 07:55]:
>> I speaking in terms of mashups... If a feed comes from one
>> source, then I would agree... but mashups from both a
>> syndication as well as an application standpoint are become the
>> primary focus of EVERY major vendor. Its in this scenario that
>> I see the problem of assuming the xml:base in current context
>> has any value whatsoever.
>
> No. That is only a problem if you just mash markup together
> without taking care to preserve base URIs by adding xml:base
> at the junction points as necessary.
>
> Copying an atom:entry from one feed to another correctly requires
> that you query the base URI which is in effect in the scope of
> the atom:entry in the source feed, and add an xml:base attribute
> to that effect to the copied atom:entry in the destination feed.
> If you do this, any xml:base attributes within the copy of the
> atom:entry will continue to resolve correctly.
>
> It's much easier to get right than copying markup without
> violating namespace-wellformedness, even.
Exactly. When creating a mashup feed, there are any number of things
that the ... "masher"(?) has to be careful of--for example:
* Getting namespace prefixes right
* Creating an atom:source element and putting the right data into it
* Ensuring that all entries use the same character encoding
* Ensuring that the xml:lang in context is correct
* Ensuring that the xml:base in context is correct
* If any of the source data isn't Atom, ensuring that all the
required elements exist (...even if the source data IS Atom--you
never know when you're going to aggregate from an invalid Atom feed--
then you have to decide whether to "fix" the entry or drop it to make
your output correct)
If we start assuming that "mashers" can't do those correctly, then we
may as well not be using Atom, or even XML. If we did a proper job
of specifying Atom, then we should be able to hold publishers' feet
to the fire and make them get their feeds right. In Atom, xml:base
is the mechanism used to determine base URIs.
--
<M:D/>
M. David Peterson
http://www.xsltblog.com/