xref: /dragonfly/contrib/file/magic/Magdir/sgml (revision 739f0ef867128a933e021db3d831e906fcafd825)
1
2#------------------------------------------------------------------------------
3# $File: sgml,v 1.46 2022/08/16 11:16:39 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# SVG document
54# https://www.w3.org/TR/SVG/single-page.html
550         search/4096/cWbt    \<!doctype\ svg     SVG XML document
56!:mime  image/svg+xml
57!:strength + 15
58
590         search/4096/cwt     \<head\>            HTML document text
60!:mime    text/html
61!:strength + 15
620         search/4096/cWt     \<head\             HTML document text
63!:mime    text/html
64!:strength + 15
650         search/4096/cwt     \<title\>           HTML document text
66!:mime    text/html
67!:strength + 15
680         search/4096/cWt     \<title\            HTML document text
69!:mime    text/html
70!:strength + 15
710         search/4096/cwt     \<html\>            HTML document text
72!:mime    text/html
73!:strength + 15
740         search/4096/cWt     \<html\             HTML document text
75!:mime    text/html
76!:strength + 15
770         search/4096/cwt     \<script\>                    HTML document text
78!:mime    text/html
79!:strength + 15
800         search/4096/cWt     \<script\                     HTML document text
81!:mime    text/html
82!:strength + 15
830         search/4096/cwt     \<style\>                     HTML document text
84!:mime    text/html
85!:strength + 15
860         search/4096/cWt     \<style\                      HTML document text
87!:mime    text/html
88!:strength + 15
890         search/4096/cwt     \<table\>           HTML document text
90!:mime    text/html
91!:strength + 15
920         search/4096/cWt     \<table\            HTML document text
93!:mime    text/html
94!:strength + 15
95
960         search/4096/cwt     \<a\ href=                    HTML document text
97!:mime    text/html
98!:strength + 15
99
100# Extensible markup language (XML), a subset of SGML
101# from Marc Prud'hommeaux (marc@apocalypse.org)
1020         search/1/cwt        \<?xml                        XML document text
103!:mime    text/xml
104!:strength + 15
1050         string/t            \<?xml\ version\ "  XML
106!:mime    text/xml
107!:strength + 15
1080         string/t            \<?xml\ version="   XML
109!:mime    text/xml
110!:strength + 15
111>15       string/t  >\0                           %.3s document text
112>>23      search/1  \<xsl:stylesheet    (XSL stylesheet)
113>>24      search/1  \<xsl:stylesheet    (XSL stylesheet)
1140         string/t  \<?xml\ version='   XML
115!:mime    text/xml
116!:strength + 15
117>15       string/t  >\0                           %.3s document text
118>>23      search/1  \<xsl:stylesheet    (XSL stylesheet)
119>>24      search/1  \<xsl:stylesheet    (XSL stylesheet)
1200         search/1/wt         \<?XML                        broken XML document text
121!:mime    text/xml
122!:strength - 10
123
124
125# SGML, mostly from rph@sq
1260         search/4096/cwt     \<!doctype                    exported SGML document text
1270         search/4096/cwt     \<!subdoc           exported SGML subdocument text
1280         search/4096/cwt     \<!--                         exported SGML document text
129!:strength - 10
130
131# Web browser cookie files
132# (Mozilla, Galeon, Netscape 4, Konqueror..)
133# Ulf Harnhammar <ulfh@update.uu.se>
1340         search/1  #\ HTTP\ Cookie\ File         Web browser cookie text
1350         search/1  #\ Netscape\ HTTP\ Cookie\ File         Netscape cookie text
1360         search/1  #\ KDE\ Cookie\ File          Konqueror cookie text
137
138# XML-based format representing braille pages in a digital format.
139#
140# Specification:
141# http://files.pef-format.org/specifications/pef-2008-1/pef-specification.html
142#
143# Simon Aittamaa <simon.aittamaa@gmail.com>
1440         string              \<?xml\ version=
145>14       regex               ['"\ \t]*[0-9.]+['"\ \t]*
146>>19    search/4096 \<pef           Portable Embosser Format
147!:mime  application/x-pef+xml
148
149# https://www.qgis.org/en/site/
1500         string              \<!DOCTYPE\040qgis  QGIS XML document
151