Subject: Additional 'namespace' attribute on content element?

From: Jan Algermissen <[email-masked]>
Date: Thu, 04 Jan 2007 08:00:29 -0800

Hi,

on the NewsML list, an issue came up that due to they lack of a MIME type for NewsML using NewsML as Atom content is somewhat problematic[1]; I think this is the case with most of the more interesting XML applications out there.

Is there any chance to extend/revise Atom to allow an attribute on the content element that allows to specify the namespace of XML content given the MIME type is declared as application/xml or text/xml?

Actually, there is no posibility to do this as an Atom extension, is there?

What is the opinion of the compund document formats experts on this?

Note:

I recall Mark Baker using something similar in his former RDF Forms draft:

<rf:Container xmlns:rf="http://www.markbaker.ca/2003/rdfforms/"
              xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
              rdf:about="http://shoes.example.com/order-processor/">
  <rf:acceptedMediaType>application/xml</rf:acceptedMediaType>
  <rf:acceptedNamespace rdf:resource="http://shoe-standards.example.org/orders/shoes/"/>  <<============
  <rf:intent rdf:resource="http://shoe-standards.example.org/order-shoes/"/>
</rf:Container>

Jan

[1] http://tech.groups.yahoo.com/group/newsml/message/2424
[2] http://www.markbaker.ca/2003/05/RDF-Forms/rdf-forms-old1.html

---

From: James M Snell <[email-masked]>
Date: Thu, 04 Jan 2007 09:08:53 -0800

Jan Algermissen wrote:
> Hi,
> 
> on the NewsML list, an issue came up that due to they lack of a MIME type 
> for NewsML using NewsML as Atom content is somewhat problematic[1]; I think 
> this is the case with most of the more interesting XML applications out there.
> 
> Is there any chance to extend/revise Atom to allow an attribute on the content 
> element that allows to specify the namespace of XML content given the MIME type 
> is declared as application/xml or text/xml?
> 

Of course this can be done as an extension. The bigger problem is that
NewsML doesn't have an XML Namespace to declare.  At least, I don't see
one in version 1.2

- James

---

From: "James Holderness" <[email-masked]>
Date: Thu, 4 Jan 2007 17:21:13 -0000

Jan Algermissen wrote:
> on the NewsML list, an issue came up that due to they lack of a
> MIME type for NewsML using NewsML as Atom content is somewhat
> problematic[1];

From my brief reading of the thread, I got the impression that NewsML did 
have a media type (text/vnd.IPTC.NewsML) - it just isn't recognised as an 
XML media type. If that's correct, then surely you can just escape the 
content as you would with "html" or any other "text/" media type. Obviously 
it's not ideal, but it is workable.

If you think it's vitally important that the content be embedded as 
unescaped XML, then I would think a more practical solution would be to get 
a "+xml" media type rather than trying to extend Atom.

Regards
James

---

From: James Aylett <[email-masked]>
Date: Thu, 4 Jan 2007 17:30:20 +0000

On Thu, Jan 04, 2007 at 08:00:29AM -0800, Jan Algermissen wrote:

> Is there any chance to extend/revise Atom to allow an attribute on
> the content element that allows to specify the namespace of XML
> content given the MIME type is declared as application/xml or
> text/xml?
> 

I wouldn't class myself as an expert, but why do we need an attribute?
How about something like (please not text/xml, by the way :-):

----------------------------------------------------------------------
<atom:content type="application/xml">
  <newsml:whatever xmlns:newsml="<newsml namespace URI>">
    ...
  </newsml:whatever>
</atom:content>
----------------------------------------------------------------------

I don't see a big difference between
dispatch-on-namespace-of-child-of-content (which is, I believe, legal
in Atom 1.0) and dispatch-on-namespace-attribute-on-content (which is
what I think you're proposing).

James

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  [email-masked]                               uncertaintydivision.org

---

From: Asbjørn Ulsberg <[email-masked]>
Date: Fri, 05 Jan 2007 08:13:04 +0100

On Thu, 04 Jan 2007 17:00:29 +0100, Jan Algermissen  
<[email-masked]> wrote:

> on the NewsML list, an issue came up that due to they lack of a MIME  
> type for NewsML using NewsML as Atom content is somewhat problematic[1];  
> I think this is the case with most of the more interesting XML  
> applications out there.

The more interesting XML applications out there should get a proper MIME  
type, that's all. Nothing wrong with Atom in this case, imo.

-- 
Asbjørn Ulsberg     -=|=-    http://virtuelvis.com/quark/
«He's a loathsome offensive brute, yet I can't look away»

---

From: Martin Duerst <[email-masked]>
Date: Fri, 05 Jan 2007 16:47:08 +0900

>type, that's all. Nothing wrong with Atom in this case, imo.

Sorry, wrong.

Using +xml at the end of a Mime Type is a good convention, but it
is only a convention. There is no requirement for a Mime Type that
uses XML to end in +xml. Also, the +xml convention was established
several years later than XML itself.

So I think that Atom is a bit out on it's egde if it says
'if you don't have a +xml Mime Type, you're not XML'.

Regards,    Martin.

#-#-#  Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University
#-#-#  http://www.sw.it.aoyama.ac.jp       mailto:[email-masked]

---

From: Henri Sivonen <[email-masked]>
Date: Fri, 5 Jan 2007 14:26:46 +0200

> 'if you don't have a +xml Mime Type, you're not XML'.

No, Atom says that if you don't use application/xml or an +xml type,  
you don't get to use an embedded subtree and your format gets the  
kind of treatment that non-XML formats get.

Atom is quite reasonable here. An XML vocabulary that doesn't have a  
MIME type that follows the convention *and* doesn't have a namespace  
is itself a badly-behaved XML vocabulary.

-- 
Henri Sivonen
[email-masked]
http://hsivonen.iki.fi/

---

From: "A. Pagaltzis" <[email-masked]>
Date: Fri, 5 Jan 2007 14:00:51 +0100

* James Aylett <[email-masked]> [2007-01-04 18:55]:
> I don't see a big difference between dispatch on namespace of
> child of content (which is, I believe, legal in Atom 1.0) and
> dispatch on namespace attribute on content (which is what I
> think you're proposing).

Except when there is nothing you can dispatch on because the
vocabulary in question is not in a namespace.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

---

From: "Mark Baker" <[email-masked]>
Date: Fri, 5 Jan 2007 12:21:24 -0500

>   <rf:intent rdf:resource="http://shoe-standards.example.org/order-shoes/"/>

That just describes an expectation ala app:accept, rather than any
inline content ala the type attribute on atom:content.

Mark.
-- 
Mark Baker.  Ottawa, Ontario, CANADA.         http://www.markbaker.ca
Coactus; Web-inspired integration strategies  http://www.coactus.com

---

From: Asbjørn Ulsberg <[email-masked]>
Date: Fri, 05 Jan 2007 19:01:58 +0100

On Fri, 05 Jan 2007 13:26:46 +0100, Henri Sivonen <[email-masked]> wrote:

> MIME type that follows the convention *and* doesn't have a namespace is  
> itself a badly-behaved XML vocabulary.

My point exactly.

---

From: Jan Algermissen <[email-masked]>
Date: Fri, 5 Jan 2007 18:59:57 +0100

Hi Mark,

On Jan 5, 2007, at 6:21 PM, Mark Baker wrote:

>>   <rf:acceptedNamespace rdf:resource="http://shoe- 
>> standards.example.org/orders/shoes/"/>  <<============

Sure. Sorry if you feel misrepresented. I only meant to provide an  
example of how one addressed the lack of distinguished MIME types for  
some formats by using the formats namespace instead.

Jan

---

From: Jan Algermissen <[email-masked]>
Date: Fri, 5 Jan 2007 23:47:38 +0100

> what I think you're proposing).

Ok, but I was thinking more about out of line content, where the type  
(or namespace) hint avoids the need to dereference the content URI to  
poke into the XML.

I agree that it would be better to fix the fact of the missing MIME  
type in the first place, but I guess most groups in charge of the  
more interesting XML formats have no clue about the MIME type issue  
and that they might miss the Atom bandwagon.

[Aside: can anyone explain how hard the process to get a registered  
MIME type is in practice and why?]

Jan

>   James Aylett                                                   
> xapian.org