1
2#------------------------------------------------------------------------------
3# $File: sgml,v 1.48 2023/01/18 16:10:21 christos Exp $
4# Type:   SVG Vectorial Graphics
5# From:   Noel Torres <tecnico@ejerciciosresueltos.com>
60         string              \<?xml\ version=
7>14       regex               ['"\ \t]*[0-9.]+['"\ \t]*
8>>19      search/4096         \<svg                         SVG Scalable Vector Graphics image
9!:mime    image/svg+xml
10!:ext   svg
11>>19      search/4096         \<gnc-v2            GnuCash file
12!:mime    application/x-gnucash
130         string              \<svg                         SVG Scalable Vector Graphics image
14!:mime    image/svg+xml
15!:ext   svg
16
17# Sitemap file
180         string/t            \<?xml\ version=
19>14       regex               ['"\ \t]*[0-9.]+['"\ \t]*
20>>19      search/4096         \<urlset            XML Sitemap document text
21!:mime    application/xml-sitemap
22
23# OpenStreetMap XML (.osm)
24# https://wiki.openstreetmap.org/wiki/OSM_XML
25# From: Markus Heidelberg <markus.heidelberg@web.de>
260         string              \<?xml\ version=
27>14       regex               ['"\ \t]*[0-9.]+['"\ \t]*
28>>19      search/4096         \<osm                         OpenStreetMap XML data
29
30# xhtml
310         string/t            \<?xml\ version="
32>19       search/4096/cWbt    \<!doctype\ html    XHTML document text
33>>15      string              >\0       (version %.3s)
34!:mime    text/html
350         string/t            \<?xml\ version='
36>19       search/4096/cWbt    \<!doctype\ html    XHTML document text
37>>15      string              >\0       (version %.3s)
38!:mime    text/html
390         string/t            \<?xml\ version="
40>19       search/4096/cWbt    \<html    broken XHTML document text
41>>15      string              >\0       (version %.3s)
42!:mime    text/html
43
44#------------------------------------------------------------------------------
45# sgml:  file(1) magic for Standard Generalized Markup Language
46# HyperText Markup Language (HTML) is an SGML document type,
47# from Daniel Quinlan (quinlan@yggdrasil.com)
48# adapted to string extensions by Anthon van der Neut <anthon@mnt.org)
490         search/4096/cWt     \<!doctype\ html    HTML document text
50!:mime    text/html
51!:strength + 5
52
53# avoid misdetection as JavaScript
540         string/cWt          \<!doctype\ html    HTML document text
55!:mime    text/html
560         string/ct \<html>   HTML document text
57!:mime    text/html
580         string/ct \<!--
59>&0       search/4096/cWt     \<!doctype\ html    HTML document text
60!:mime    text/html
61>&0       search/4096/ct      \<html>   HTML document text
62!:mime    text/html
63
64# SVG document
65# https://www.w3.org/TR/SVG/single-page.html
660         search/4096/cWbt    \<!doctype\ svg     SVG XML document
67!:mime  image/svg+xml
68!:strength + 15
69
700         search/4096/cwt     \<head\>            HTML document text
71!:mime    text/html
72!:strength + 15
730         search/4096/cWt     \<head\             HTML document text
74!:mime    text/html
75!:strength + 15
760         search/4096/cwt     \<title\>           HTML document text
77!:mime    text/html
78!:strength + 15
790         search/4096/cWt     \<title\            HTML document text
80!:mime    text/html
81!:strength + 15
820         search/4096/cwt     \<html\>            HTML document text
83!:mime    text/html
84!:strength + 15
850         search/4096/cWt     \<html\             HTML document text
86!:mime    text/html
87!:strength + 15
880         search/4096/cwt     \<script\>                    HTML document text
89!:mime    text/html
90!:strength + 15
910         search/4096/cWt     \<script\                     HTML document text
92!:mime    text/html
93!:strength + 15
940         search/4096/cwt     \<style\>                     HTML document text
95!:mime    text/html
96!:strength + 15
970         search/4096/cWt     \<style\                      HTML document text
98!:mime    text/html
99!:strength + 15
1000         search/4096/cwt     \<table\>           HTML document text
101!:mime    text/html
102!:strength + 15
1030         search/4096/cWt     \<table\            HTML document text
104!:mime    text/html
105!:strength + 15
106
1070         search/4096/cwt     \<a\ href=                    HTML document text
108!:mime    text/html
109!:strength + 15
110
111# Extensible markup language (XML), a subset of SGML
112# from Marc Prud'hommeaux (marc@apocalypse.org)
1130         search/1/cwt        \<?xml                        XML document text
114!:mime    text/xml
115!:strength + 15
1160         string/t            \<?xml\ version\ "  XML
117!:mime    text/xml
118!:strength + 15
1190         string/t            \<?xml\ version="   XML
120!:mime    text/xml
121!:strength + 15
122>15       string/t  >\0                           %.3s document text
123>>23      search/1  \<xsl:stylesheet    (XSL stylesheet)
124>>24      search/1  \<xsl:stylesheet    (XSL stylesheet)
1250         string/t  \<?xml\ version='   XML
126!:mime    text/xml
127!:strength + 15
128>15       string/t  >\0                           %.3s document text
129>>23      search/1  \<xsl:stylesheet    (XSL stylesheet)
130>>24      search/1  \<xsl:stylesheet    (XSL stylesheet)
1310         search/1/wt         \<?XML                        broken XML document text
132!:mime    text/xml
133!:strength - 10
134
135
136# SGML, mostly from rph@sq
1370         search/4096/cwt     \<!doctype                    exported SGML document text
1380         search/4096/cwt     \<!subdoc           exported SGML subdocument text
1390         search/4096/cwt     \<!--                         exported SGML document text
140!:strength - 10
141
142# Web browser cookie files
143# (Mozilla, Galeon, Netscape 4, Konqueror..)
144# Ulf Harnhammar <ulfh@update.uu.se>
1450         search/1  #\ HTTP\ Cookie\ File         Web browser cookie text
1460         search/1  #\ Netscape\ HTTP\ Cookie\ File         Netscape cookie text
1470         search/1  #\ KDE\ Cookie\ File          Konqueror cookie text
148
149# XML-based format representing braille pages in a digital format.
150#
151# Specification:
152# http://files.pef-format.org/specifications/pef-2008-1/pef-specification.html
153#
154# Simon Aittamaa <simon.aittamaa@gmail.com>
1550         string              \<?xml\ version=
156>14       regex               ['"\ \t]*[0-9.]+['"\ \t]*
157>>19    search/4096 \<pef           Portable Embosser Format
158!:mime  application/x-pef+xml
159
160# https://www.qgis.org/en/site/
1610         string              \<!DOCTYPE\040qgis  QGIS XML document
162