On 3/2/09 8:56 AM, "James Holderness" <[email protected]> wrote:

> Eric Scheid wrote:
>
>>> This link type points to the schema used to define the content of an
>>> "atom:content" element of an "atom:entry" document. The "for" attribute is
>>> used to identify the QName of the direct child of the "atom:content" element
>>> that the link is intended for
>> 
>> 'direct child' .. are you thinking there might be multiple direct children
>> of atom:content, like this:
>> 
>>    <link rel="schema" href="..." for="foo" />
>>    <link rel="schema" href="..." for="bar" />
>>    <atom:content type="application/xml+something">
>>        <foo:blarg>...</foo:blarg>
>>        <bar:blarg>...</bar:blarg>
>>    </atom:content>
> 
> Is that legal? In the processing model for XML media types, RFC4287 says
> "this would normally mean that the atom:content element would contain a
> single child element", which kind of implies that it might, under certain
> conditions, contain more than one. But I don't see how.
> 
> RFC3023 puts me to sleep, so I may have misunderstood something, but I got
> the impression that +xml media types were specifically reserved for actual
> XML documents (the whole point is a common processing model is it not?). And
> a well-formed XML document, by definition, has exactly one root element. So
> what am I missing?

I believe you are correct, especially for +xml media types. I'm hard pushed
to think of any other media types which are for xml snippets/streams and
thus not single-root documents. There is at least one example of an xml
document with a media type which isn't +xml (I don't remember exactl what it
is other than it living somewhere inside the vnd- tree) - even there it's a
single-root-node xml document iirc.

Rich, can you explain a bit more your thinking behind the 'direct child'
distinction?

Do you have examples in mind where two different schemas might apply to
atom:content?

    <link rel="schema" href="http://example.org/snl"; for="snl" />
    <link rel="schema" href="http://example.org/foo"; for="foo" />
    <link rel="schema" href="http://example.org/bar"; for="bar" />
    <atom:content type="application/something+xml">
        <snl:haha>
            <foo:blarg>...</foo:blarg>
            <bar:yadda>...</bar:yadda>
        </snl:haha>
    </atom:content>

e.

Reply via email to