summaryrefslogtreecommitdiff
path: root/shared-mime-info-spec.xml
diff options
context:
space:
mode:
authorThomas Leonard <tal@ecs.soton.ac.uk>2003-04-02 12:26:40 +0000
committerThomas Leonard <tal@ecs.soton.ac.uk>2003-04-02 12:26:40 +0000
commitc42844f2f6ddf0cb259c2d9a3526432444bd4bf0 (patch)
tree3fc689a95101860d46f7cf4eab31c795259027a2 /shared-mime-info-spec.xml
parentcfc285c1aa5cafe660d4cbab7a7a1762a60baab4 (diff)
downloadshared-mime-info-c42844f2f6ddf0cb259c2d9a3526432444bd4bf0.tar.gz
Clarifications of the glob file format (suggestions by Jonathan Blandford).
Diffstat (limited to 'shared-mime-info-spec.xml')
-rw-r--r--shared-mime-info-spec.xml14
1 files changed, 11 insertions, 3 deletions
diff --git a/shared-mime-info-spec.xml b/shared-mime-info-spec.xml
index 0015498a..f95e1fb9 100644
--- a/shared-mime-info-spec.xml
+++ b/shared-mime-info-spec.xml
@@ -592,9 +592,10 @@ If several patterns match then the longest pattern SHOULD be used. In
particular, files with multiple extensions (such as
<filename>Data.tar.gz</filename>) MUST match the longest sequence of extensions
(eg '*.tar.gz' in preference to '*.gz'). Literal patterns (eg, 'Makefile') must
-be matched before all others. It is acceptable to match patterns of the form
-'*.text' before other wildcarded patterns (that is, to special-case extensions
-using a hash table).
+be matched before all others. It is suggested that patterns beginning with `*.'
+and containing no other special characters (`*?[') should be placed in a hash
+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>
There may be several rules mapping to the same type. They should all be merged.
@@ -602,6 +603,13 @@ If the same pattern is defined twice, then they MUST be ordered by the
directory the rule came from, as described above.
</para>
<para>
+Lines beginning with `#' are comments and should be ignored. Everything from
+the `:' character to the newline is part of the pattern; spaces should not be
+stripped. The file is in the UTF-8 encoding. The format of the glob pattern
+is as for fnmatch(3). The format does not allow a pattern to contain a literal
+newline character, but this is not expected to be a problem.
+ </para>
+ <para>
Common types (such as MS Word Documents) will be provided in the X Desktop
Group's package, which MUST be required by all applications using this
specification. Since each application will then only be providing information