I didn't find a good title
Consider the following MIME definitions:
<?xml version="1.0" encoding="UTF-8"?>
<!-- The real life example would be that this mime type is a sub class of application/xml
which has a magic that matches <?xml .
XML files with an early appearing qnx tag are detected as
application/vnd.qnx.bar-descriptor. We want that XML files without the qnx tag to be
identified as application/xml, independent of the order in which the two are registered. -->
<magic><!-- higher priority than the parent magic -->
<match value="<qnx>" type="string" offset="0:200"/>
<match value="<?foo" type="string" offset="0"/>
and the following file something.foo
Both MIME types match by pattern. Magic is consulted, application/foo matches by magic. Currently, the resulting MIME type is application/vnd.qnx.bar-descriptor because that appears first in the list and is a subclass of the MIME type that matches by magic.