From c766ea54aefe855800e115742a6b252bd3d76336 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 1 Apr 2022 12:35:34 +0100 Subject: [PATCH] spec: Clarify that namespaceURI can be empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous wording in the spec didn’t make it clear that it isn’t required (but at least one of it and `localName` is required). This wording is based on the error checking present in `update-mime-database.c`, rather than some innate knowledge of how MIME information should work. Signed-off-by: Philip Withnall --- data/shared-mime-info-spec.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/shared-mime-info-spec.xml b/data/shared-mime-info-spec.xml index 06358cf..9ba1cfc 100644 --- a/data/shared-mime-info-spec.xml +++ b/data/shared-mime-info-spec.xml @@ -357,6 +357,11 @@ of the document element. If localName is present but empty then the document element may have any name, but the namespace must still match. + +If namespaceURI is present but empty then the match is done entirely on +the document element’s local name and any namespace URI present in the document is ignored. + +Both attributes must be specified, and at least one of them must be non-empty. treemagic elements contain a list of treematch elements, -- GitLab