summaryrefslogtreecommitdiff
path: root/shared-mime-info-spec.xml
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-12-01 18:53:26 +0000
committerMatthias Clasen <mclasen@redhat.com>2005-12-01 18:53:26 +0000
commit7fab0df72e558a1d651e2557d52ac37b8d5020e9 (patch)
tree208186c489c576d07b3c33dd1f2f0ce49fb93ddc /shared-mime-info-spec.xml
parent3e75d7a8851b502d61eac68561983a0204b97061 (diff)
downloadshared-mime-info-7fab0df72e558a1d651e2557d52ac37b8d5020e9.tar.gz
2005-12-01 Matthias Clasen <mclasen@redhat.com>
* shared-mime-info-spec.xml: Add acronym and expanded-acronym elements, add recommendations for handling duplicate globs. Specify how duplicate globs are stored in mime.cache. * update-mime-database.c (process_freedesktop_node): Allow identical globs. (insert_suffix): Store duplicate globs in the suffix tree by using '\0' as a key.
Diffstat (limited to 'shared-mime-info-spec.xml')
-rw-r--r--shared-mime-info-spec.xml38
1 files changed, 33 insertions, 5 deletions
diff --git a/shared-mime-info-spec.xml b/shared-mime-info-spec.xml
index 274c3c64..7a6219d9 100644
--- a/shared-mime-info-spec.xml
+++ b/shared-mime-info-spec.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd" [
- <!ENTITY updated "1 April 2005">
- <!ENTITY version "0.14">
+ <!ENTITY updated "1 December 2005">
+ <!ENTITY version "0.15">
]>
<article id="index">
@@ -285,10 +285,26 @@ attribute. See <xref linkend="subclassing"/>.
</para></listitem>
<listitem><para>
<userinput>comment</userinput> elements give a human-readable textual description of the MIME
-type. There may be many of these elements with different <userinput>xml:lang</userinput> attributes
+type, usually composed of an acronym of the file name extension and a short description, like
+"ODS spreadsheet".
+There may be many of these elements with different <userinput>xml:lang</userinput> attributes
to provide the text in multiple languages.
</para></listitem>
<listitem><para>
+<userinput>acronym</userinput> elements give experienced users a terse idea of the document contents.
+for example "ODS", "GEDCOM", "JPEG" and "XML".
+There may be many of these elements with different <userinput>xml:lang</userinput> attributes
+to provide the text in multiple languages, although these should only be used if absolutely neccessary.
+ </para></listitem>
+ <listitem><para>
+<userinput>expanded-acronym</userinput> elements are the expanded versions of the acronym elements,
+for example "OpenDocument Spreadsheet", "GEnealogical Data COMmunication", and "eXtensible Markup Language".
+The purpose of these elements is to provide users a way to look up information on various MIME types or
+file formats in third-party resources.
+There may be many of these elements with different <userinput>xml:lang</userinput> attributes
+to provide the text in multiple languages, although these should only be used if absolutely neccessary.
+ </para></listitem>
+ <listitem><para>
<userinput>root-XML</userinput> elements have <userinput>namespaceURI</userinput>
and <userinput>localName</userinput> attributes. If a file is identified as being an XML file,
these rules allow a more specific MIME type to be chosen based on the namespace and localname
@@ -386,6 +402,13 @@ table for efficient lookup, since this covers the majority of the patterns. Thus
patterns of this form should be matched before other wildcarded patterns.
</para>
<para>
+If a matching pattern is provided by two or more MIME types, applications
+SHOULD not rely on one of them. They are instead supposed to use magic data
+(see below) to detect the actual MIME type. This is for instance required to
+deal with container formats like Ogg or AVI, that map various video and/or
+audio-encoded data to one extension.
+ </para>
+ <para>
There may be several rules mapping to the same type. They should all be merged.
If the same pattern is defined twice, then they MUST be ordered by the
directory the rule came from, as described above.
@@ -591,11 +614,16 @@ NamespaceEntry:
4 CARD32 MIME_TYPE_OFFSET
</programlisting>
<para>
-Lists in the file are sorted, to enable binary searching. The list of aliases is sorted by alias,
-the list of literal globs is sorted by the literal. The SuffixTreeNode siblings are sorted by character.
+Lists in the file are sorted, to enable binary searching. The list of
+aliases is sorted by alias, the list of literal globs is sorted by the
+literal. The SuffixTreeNode siblings are sorted by character.
The list of namespaces is sorted by namespace uri.
</para>
<para>
+Identical globs are stored in the suffix tree by appending suffix
+tree nodes with '\0' as character.
+</para>
+<para>
All offsets are in bytes from the beginning of the file.
</para>
<para>