Mimetype names (Re: mimetypes for zipped files)

Nicolas Goutte nicog at snafu.de
Wed Apr 10 21:44:25 BST 2002


*System/Public ID*

System and public identifiers come form SGML (the ancestor and base of HTML, 
XML and similar)

As it was before http was born and as at that time Internet was not common, a 
unique way to identify a DTD was needed. That is the reason of the public id.

However, the system also needs to know where the DTD is really stored on the 
current system. That is the system id. 

In the past, it was simply a relative path. Recently, as http has become 
common, it was decided that the system id should be a http address. However, 
it can still be a local path if your file is not public.

You need a valid system id for programs like xmllint (in --valid mode) or such 
programs cannot use the DTD.

*Recent new mime types*
I have tried to tell that xslt had already a mime type. As often for W3C 
stuff, I was not followed. (Perhaps I had insisted too much on the draft side 
of the RFC.)

As for the other mime types, they have existed since long in KOffice. Then 
Stephan Kulow decided one day to make a big mime type move from KOffice to 
kdelibs. So many new types in kdelibs are not really new.

Have a nice day/evening/night!

--- Original Message ---
Subject:  Re: Mimetype names (Re: mimetypes for zipped files)
From:     Marc Mutz <Marc.Mutz at uni-bielefeld.de>
Date:     2002-04-10 14:37:01
[Download message RAW]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(...)

> > <!DOCTYPE document-info PUBLIC "-KDE//DTD document-info 1.1.1//EN"

There was a typo: it should read -//KDE, not -KDE.

> The "document-info" in the public ID is the name of the root element,
> right?

No. The first "document-info" is the name of the root element (otherwise it's 
invalid XML). The second can be anything. You can just as well use a more 
reading-friendly capitalization.

> What's this public ID used for?

Accoring to the spec, "An XML processor attempting to retrieve the entity's 
content may use the public identifier to try to generate an alternative URI 
reference."
Ie.: It's an alternative identifier.
Other people's import filters can recognize the document type and version with 
it and do smart guesses even if we change the location of the DTD and 
therefore the SystemLiteral.

> >   "http://www.kde.org/DTD/2001/koffice/document-info-1.1.1.dtd">
>
> System ID.

Yes and no. This is the SystemLiteral of the PUBLIC ID. The corresponding 
production reads:
[75] ExternalID ::= 'SYSTEM' S SystemLiteral
                    | 'PUBLIC' S PubidLiteral S SystemLiteral

(...)

Ok, you misunderstood me, too. I never suggested that the KDE project fixed 
unrelated mimetypes. I just wanted to achieve that _new_ KDE apps' and also 
important existing mimetypes not get the x- prefix automatically:
app/x-povmodeler
    x-krita
    x-krayon
<other koffice types>
   x-pkcs7-signature (ok, that was I myself, but I plea not guilty, since that 
                      was copied from a mail I got.)
text/x-xslt (this is actually app/xslt+xml as per rfc3023 :-( )
These are mimetypes that were recently added to kdelibs/mimetypes for KDE apps 
or mimetypes that are already registered and thus have a non-x-name.

(...)

Marc

- -- 
Marc Mutz <mutz at kde.org>
--- End Of Original Message ---




More information about the kde-core-devel mailing list