[Development] Qml mime types
Marc Mutz
marc.mutz at kdab.com
Thu Dec 13 01:19:39 CET 2012
On Wednesday December 12 2012, Mohamed Fawzi wrote:
> text/plain; charset=utf-8
> text/vnd.qt.qml-base : a file using the qml syntax in some context
> text/vnd.qt.qml : the current .qml files
> text/vnd.qt.qbs : a qbs file
> text/vnd.qt.qml-meta-info : qmltypes meta info
> text/vnd.qt.qml-project : a qmlproject file
You can't have a hierarchy like that, btw. Not outside xdg.
No client will treat text/vnd.qt.qml as a text/vnd.qt.qml-base if it doesn't
know the former. You need a database like xdg's for this, but most users of
mime-types will treat an unknown text/ subpart according to the RFCs: as
text/plain.
Which means btw that text/vnd.qt.{qml,etc} will have to specify that clients
SHOULD add a charset parameter and that that charset SHOULD be utf-8, but
that receivers SHOULD accept also charsets != utf-8, and missing charsets
(defaulting to us-ascii in that case). Just because that's a requirement of
text/plain.
I briefly considered suggesting a variant= or dialect= parameter:
text/vnd.qt.qml; charset=utf-8; dialect=qt-quick-v1
mp/signed uses that (protocol=; micalg=, cf. source of Thiago's mail), but it
requires special handling in clients and only really works in email (and
http), not on the desktop, so I'm not suggesting that.
If you want more subtyping than text/plain as a parent, you need to use
something like +qml. You could also use vnd.qt.qml.* (ie. a prefix), but I'm
not sure 3rd parties would like to place their mime types in the vnd.qt
tree :)
There are trees other than vnd., btw, but I forgot which ones. One of them
might lend itself better to this kind of prefixing that vnd.
Thanks,
Marc
--
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
More information about the Development
mailing list