Closed Bug 61839 (application/rdf+xml) Opened 24 years ago Closed 20 years ago

add support for application/rdf+xml MIME type for RDF, deprecate text/rdf

Categories

(Core Graveyard :: RDF, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8alpha1

People

(Reporter: myk, Assigned: WeirdAl)

References

(Depends on 1 open bug, )

Details

(Keywords: helpwanted)

Attachments

(2 files, 1 obsolete file)

The Mozilla RDF FAQ suggests using the "text/rdf" MIME type for RDF files even
though this MIME type does not appear in the list of officially recognized MIME
types and Mozilla correctly parses RDF files of type "text/xml".  One or both of
the following things should be done about this:

1. Register "text/rdf" as an official MIME type.
2. Change the FAQ to recommend using "text/xml".

RDF FAQ: http://www.mozilla.org/rdf/doc/faq.html
Official MIME Types: http://www.isi.edu/in-notes/iana/assignments/media-types/
Also see bug 28237 for discussion of the "text/xul" MIME type.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Keywords: helpwanted
Tangentially related:  the W3 may at some point in the future register 
application/rdf+xml for RDF, in which case similar updates will need to be made
for that.  See
  http://www.w3.org/2001/03mr/rdf_mt
tever is not RDF QA anymore
QA Contact: tever → nobody
After a little research, it looks like application/rdf+xml has not yet been 
registered as a valid content-type.  No mime-type for RDF appears to exist at 
all... 
 
Therefore, we should at least support application/x-rdf+xml, and deprecate 
text/rdf (deprecate, not remove). 
Follow-up: A W3C member contacted me in the last 24 hours, stating a preference
for application/rdf+xml.  I'll be happy to oblige him.
Passes testcase 
data:application/rdf+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%3F%3E%0D%0A%3Crdf%3ARDF%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%2F%3E%0D%0A
Attachment #130695 - Flags: review?(peterv)
Comment on attachment 130695 [details] [diff] [review]
patch (support application/rdf+xml)

per advice by timeless, r?heikki
Attachment #130695 - Flags: review?(peterv) → review?(hjtoi-bugzilla)
Comment on attachment 130695 [details] [diff] [review]
patch (support application/rdf+xml)

>Index: uriloader/exthandler/nsExternalHelperAppService.cpp
>===================================================================
>   { TEXT_RDF, "rdf", "Resource Description Framework", 'TEXT','ttxt' },
>+  { APPLICATION_RDF, "rdf", "Resource Description Framework", 

This seems wrong, all others list just one mime type.

>Index: htmlparser/src/CParserContext.cpp
>===================================================================
>Index: htmlparser/src/nsExpatDriver.cpp
>===================================================================
>Index: htmlparser/src/nsViewSourceHTML.cpp
>===================================================================

Also, I am really reluctant to add this at this point. Even when the patch is
fixed, I don't want this checked in until at least one of the points below is
"fixed":

1) It is not an official mime type
2) Nobody(?) uses that mime type, nothing is gained by us supporting it

Also as this patch shows, we must change code all over the place to add a new
mime type. We should create infrastructure so that only one place only
(ideally) needs to change.
Attachment #130695 - Flags: review?(hjtoi-bugzilla) → review-
biesi bitrotted the patch anyway.  Oh, well...

My goal was to keep text/rdf and application/rdf+xml, deprecating text/rdf at
the same time.  I'll do some more testing with this patch, figure out exactly
what it would take to knock text/rdf off as an optional mime-type.  (Not that we
want to do that.)  But by finding out where it's disabled, exactly, I can
definitively state which line we want to keep.

I suspect it's the line heikki mentioned in his r-, but I must confirm that.

bz: can you also help me out?  In deprecating text/rdf, I want to throw a strict
warning to the terminal and to the JS Console.  It'd be nice to know that.

heikki: I agree completely about reorg'ing mime-types setup.  I thought about
creating an rdf file for mime-types, but then it dawned on me we've got to read
the RDF file before we can know what mime-type the RDF file is... oops.  There
should probably be a separate bug for this, and I'm not sure I should file it as
I probably don't understand all the issues.
*** Bug 231880 has been marked as a duplicate of this bug. ***
Resummarizing to get "xml+rdf" in there.
Summary: RDF FAQ suggests "text/rdf" MIME type for RDF files → MIME type for RDF should be application/xml+rdf, not text/rdf
Summary: MIME type for RDF should be application/xml+rdf, not text/rdf → MIME type for RDF should be application/rdf+xml, not text/rdf
Ugh, I'm a dope.  Thanks bz.

Also, regarding these:
> 1) It is not an official mime type
> 2) Nobody(?) uses that mime type, nothing is gained by us supporting it

Myk wrote in the dup:

> The application/rdf+xml content type has become a de-facto standard for
> RDF-compliant RSS 1.0 feeds, and it is in the process of being standardized:

http://www.ietf.org/internet-drafts/draft-swartz-rdfcore-rdfxml-mediatype-03.txt

It's up to heikki.  I created one patch using current architecture, and I can 
create another.  We really should have another bug on file for redoing the 
infrastructure as heikki suggested.
Chase, I get a 404 on that ietf mimetype page. Maybe that's because it timed out
a few days ago, I recall reading that before going on vacation.
Yeah, it expired last week.  A new version has been released, though:
http://www.ietf.org/internet-drafts/draft-swartz-rdfcore-rdfxml-mediatype-04.txt

It appears unchanged from -03.
Alias: application/rdf+xml
I just realized that XUL templates do not work with application/rdf+xml. Is this
also covered by this bug or will it just automagically work? If this is the case
and since there is a patch available it might make sense to try to get this into 1.7
eae: yes, they will work, once we fix this bug.  The patch that heikki r-'d, 
aside from the bit-rotting, would've fixed that.

heikki: recommend for status whiteboard that we are waiting on the content-type 
registration before fixing this bug.  I realize people want it (myself 
included; I was willing to write the patch before and would write it again), 
but without getting mozilla.org's consent and/or a registered content-type, 
it's sort of self-defeating.  This is why the bug is still listed as severity: 
enhancement.
These 2 lists the mime type as application/rdf+xml

http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/#section-MIME-Type
http://www.ietf.org/rfc/rfc3023.txt (8.18)

I don't see why these aren't enough?
.... because the latter says
"However, no content type has yet
been registered for RDF and so this media type should not be used
until such registration has been completed."

And exactly that hasn't happened.
waterson left the building
Assignee: waterson → nobody
Status: ASSIGNED → NEW
QA Contact: nobody → core.rdf
I might as well take this bug.  It matters to me, though we really can't fix it 
until we get that precious endorsement of app/rdf+xml.
Assignee: nobody → ajvincent
(In reply to comment #8)

> Also, I am really reluctant to add this at this point. Even when the patch is
> fixed, I don't want this checked in until at least one of the points below is
> "fixed":
> 
> 1) It is not an official mime type
> 2) Nobody(?) uses that mime type, nothing is gained by us supporting it
 
Let's address 2), the w3c uses application/rdf+xml for the RDF Test Cases, see
http://www.w3.org/TR/rdf-testcases/#tc-cert

Biesi, should there be a good way to support multiple mimetypes mapping to the
"same thing"? If so, is there a bug on it?
(In reply to comment #22)
> Biesi, should there be a good way to support multiple mimetypes mapping to the
> "same thing"? If so, is there a bug on it?

in what context?

hm... looking through LXR, usage of the RDF MIME Type seems seems to be
basically limited to htmlparser (!?) and nsContentDLF, and it seems easy to add
another type there.

see
http://lxr.mozilla.org/seamonkey/search?string=TEXT%2FRDF
http://lxr.mozilla.org/seamonkey/search?string=krdftext
and maybe change:
http://lxr.mozilla.org/seamonkey/search?string=TEXT_RDF
to application/rdf+xml
Heikki's (1) is solved, and there are already comments to the effect that (2) is
no longer the case either. See here:

http://www.ietf.org/mail-archive/ietf-announce/Current/msg00083.html

"The IESG has approved the following document:

- 'application/rdf+xml Media Type Registration '
   <draft-swartz-rdfcore-rdfxml-mediatype-05.txt> as an Informational RFC"

For further information, see RFC 3023 (http://www.ietf.org/rfc/rfc3023.txt)
which is where the former draft has been merged into.
Based on comment 24, let's shoot for 1.8a.  My ability to work on this bug is a 
little shaky at the moment (long story).  If someone else wants to take this 
bug, be my guest.

I want to re-emphasize something I mentioned in comment 9.  The text/rdf 
content-type is still in use by several people.  I would strongly suggest that 
any patch for rdf+xml include a strict warning for using text/rdf.  It may not 
mean much, but text/rdf was never official and now should be considered 
deprecated.
Severity: enhancement → normal
Target Milestone: Future → mozilla1.8alpha
adjusting topic to reflect what this is about.
Chatted with biesi regarding comments #8 and #22, there is no plan for support
of mimetype classes (like "all kinds of xml" or "all kinds of xml/rdf"), so we
gonna add have to add "application/rdf+xml" to those places that read "text/rdf"
and replace "text/rdf" in our local file mimetype code.

Note to self, adjust the docs after this bug is fixed.
Summary: MIME type for RDF should be application/rdf+xml, not text/rdf → add support for application/rdf+xml MIME type for RDF, deprecate text/rdf
This is becoming widespread in the FOAF area, and Debian's apache package (if
not stock apache) uses it as the default content-type for .rdf.
We should just land this, stamped-as-standard or not. Anyone got the cycles to
whip up an updated diff for Firefox 1.0 and trunk? I'll happily sr.
Give me a few days, please :)  I'll whip up a patch, and then file a bug to
re-arch the structure.
I was not able to figure out where to write code for the strict warning
deprecating text/rdf.
Attachment #130695 - Attachment is obsolete: true
Comment on attachment 155435 [details] [diff] [review]
patch (support application/rdf+xml)

Not tested for Firefox.
Attachment #155435 - Flags: superreview?(jst)
Attachment #155435 - Flags: review?(hjtoi-bugzilla)
Comment on attachment 155435 [details] [diff] [review]
patch (support application/rdf+xml)

r=bzbarsky
Attachment #155435 - Flags: review?(hjtoi-bugzilla) → review+
Comment on attachment 155435 [details] [diff] [review]
patch (support application/rdf+xml)

sr=jst
Attachment #155435 - Flags: superreview?(jst) → superreview+
bz, would you be able to help land this? I'm on dialup for another week...
If you check this patch in, we can close this bug as fixed, but I'd still like 
to see what we can do to throw a warning for text/rdf.
Checked in.

I don't think the warning is particularly worth it, myself... but that's just me.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
I'm fine to go without warning myself.

Does aviary want this, too?

We could bake it on the trunk for a few days and see if any new bugs roll in,
but this should be low-to-no risk and good forwards compatibility.

Thanx to Alex for the patch.
Flags: blocking-aviary1.0?
Yeah, we should put this on the aviary branch as well, IMO.
On how many sites is 'text/rdf' still used? The W3C uses 'application/rdf+xml'
as far as I know. Maybe a separate bug should be opened to remove support for
'text/rdf'?
Hardware: PC → All
Depends on: */*+xml
I vote for keeping text/rdf around as legacy support for sites that tried to work
nicely with Mozilla over years. No need to rush that, IMHO.
Flags: blocking-aviary1.0? → blocking-aviary1.0-
I agree. Alex, any chance you could update the patch to reflect that?
Duh, I meant attach a patch that would bring back support for text/rdf.
*blink* As far as I know, the patch I submitted didn't remove text/rdf support; 
it deprecated it, but didn't remove it.
Attached file test case
In 'View Page Info', Mozilla doesn't show 'application/rdf+xml' as MIME type,
but it shows: 'application/vnd.mozilla.xul+xml'. Should I file a separate bug?
Or will this be fixed once bug 155730 is fixed?
no, this is actually covered in an XSLT bug. Huh? Naa, I'll move that around
to somewhere appropriate. The story is that XUL is displayed in RDF documents.
Or the other way around, depends if you believe the contract ID or the method
names in nsContentDLF. *shiver*
It's(In reply to comment #44)
> In 'View Page Info', Mozilla doesn't show 'application/rdf+xml' as MIME type,
> but it shows: 'application/vnd.mozilla.xul+xml'. Should I file a separate bug?
> Or will this be fixed once bug 155730 is fixed?
It's Bug 256083 I filled 2 days ago : I know that it must be some thing deeper
than a bug in Page Info, but I don't know what... sorry :¬/
the bug with the beef is bug 256084
Flags: in-testsuite?
Flags: in-testsuite?
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: