xref: /freebsd/contrib/file/magic/Magdir/sgml (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1
2#------------------------------------------------------------------------------
3# $File: sgml,v 1.53 2024/11/10 14:48:55 christos Exp $
4# Type:	SVG Vectorial Graphics
5# From:	Noel Torres <tecnico@ejerciciosresueltos.com>
60	string/bt	\<?xml\ version=
7>14	regex		['"\ \t]*[0-9.]+['"\ \t]*
8>>19	search/4096	\<svg			SVG Scalable Vector Graphics image
9!:strength +50
10!:mime	image/svg+xml
11!:ext   svg
12>>19	search/4096	\<gnc-v2		GnuCash file
13!:mime	application/x-gnucash
140	string/bt	\<svg			SVG Scalable Vector Graphics image
15!:mime	image/svg+xml
16!:ext   svg
17
18>14	regex		['"\ \t]*[0-9.]+['"\ \t]*
19# Sitemap file
20>>19	search/4096	\<urlset		XML Sitemap document text
21!:mime	application/xml-sitemap
22
23# XML-based format representing braille pages in a digital format.
24#
25# Specification:
26# http://files.pef-format.org/specifications/pef-2008-1/pef-specification.html
27#
28# Simon Aittamaa <simon.aittamaa@gmail.com>
29>>19    search/4096	\<pef           Portable Embosser Format
30!:mime  application/x-pef+xml
31
32# OpenStreetMap XML (.osm)
33# https://wiki.openstreetmap.org/wiki/OSM_XML
34# From: Markus Heidelberg <markus.heidelberg@web.de>
35>>19	search/4096	\<osm			OpenStreetMap XML data
36
37# xhtml
38>19	search/4096/cWbt	\<!doctype\ html	XHTML document text
39>>15	string		>\0	(version %.3s)
40!:strength + 15
41!:mime	application/xhtml+xml
42
43>19	search/4096/cWbt	\<html\ xmlns=		XHTML document text
44>>15	string		>\0	(version %.3s)
45!:mime	application/xhtml+xml
46
47
48#------------------------------------------------------------------------------
49# sgml:  file(1) magic for Standard Generalized Markup Language
50# HyperText Markup Language (HTML) is an SGML document type,
51# from Daniel Quinlan (quinlan@yggdrasil.com)
52# adapted to string extensions by Anthon van der Neut <anthon@mnt.org)
530	search/4096/cWt	\<!doctype\ html	HTML document text
54!:mime	text/html
55!:strength + 5
56
57# avoid misdetection as JavaScript
580	string/cWt	\<!doctype\ html	HTML document text
59!:mime	text/html
60!:strength + 30
610	string/ct	\<html>	HTML document text
62!:mime	text/html
63!:strength + 30
640	string/ct	\<!--
65>&0	search/4096/cWt	\<!doctype\ html	HTML document text
66!:mime	text/html
67!:strength + 30
68>&0	search/4096/ct	\<html>	HTML document text
69!:mime	text/html
70
71# SVG document
72# https://www.w3.org/TR/SVG/single-page.html
730	search/4096/cWbt	\<!doctype\ svg	SVG XML document
74!:mime  image/svg+xml
75!:strength + 30
76
770	search/4096/cwt	\<head\>		HTML document text
78!:mime	text/html
79!:strength + 30
800	search/4096/cWt	\<head\ 		HTML document text
81!:mime	text/html
82!:strength + 30
830	search/4096/cwt	\<title\>		HTML document text
84!:mime	text/html
85!:strength + 30
860	search/4096/cWt	\<title\ 		HTML document text
87!:mime	text/html
88!:strength + 30
890	search/4096/cwt	\<html\>		HTML document text
90!:mime	text/html
91!:strength + 30
920	search/4096/cWt	\<html\ 		HTML document text
93!:mime	text/html
94!:strength + 30
950	search/4096/cwt	\<script\> 		HTML document text
96!:mime	text/html
97!:strength + 30
980	search/4096/cWt	\<script\ 		HTML document text
99!:mime	text/html
100!:strength + 30
1010	search/4096/cwt	\<style\> 		HTML document text
102!:mime	text/html
103!:strength + 30
1040	search/4096/cWt	\<style\  		HTML document text
105!:mime	text/html
106!:strength + 30
1070	search/4096/cwt	\<table\>		HTML document text
108!:mime	text/html
109!:strength + 30
1100	search/4096/cWt	\<table\ 		HTML document text
111!:mime	text/html
112!:strength + 30
113
1140	search/4096/cwt	\<a\ href=		HTML document text
115!:mime	text/html
116!:strength + 30
117
118# Microsoft HTML Application (HTA)
119# https://learn.microsoft.com/en-us/previous-versions//ms536496(v=vs.85)
1200	search/4096/cWt	\<hta:application\ 	Microsoft HTML Application (HTA)
121!:mime	application/hta
122!:ext	hta
123!:strength + 50
124
125# Extensible markup language (XML), a subset of SGML
126# from Marc Prud'hommeaux (marc@apocalypse.org)
1270	search/1/cwt	\<?xml			XML document text
128!:mime	text/xml
129!:strength + 30
1300	string/t		\<?xml\ version="	XML
131!:mime	text/xml
132!:strength + 30
133>15	string/t	>\0			%.3s document text
134>>23	search/1	\<xsl:stylesheet	(XSL stylesheet)
135>>24	search/1	\<xsl:stylesheet	(XSL stylesheet)
136
1370	search/1/wt	\<?XML			broken XML document text
138!:mime	text/xml
139!:strength - 10
140
141
142# SGML, mostly from rph@sq
1430	search/4096/cwt	\<!doctype		exported SGML document text
1440	search/4096/cwt	\<!subdoc		exported SGML subdocument text
1450	search/4096/cwt	\<!--			exported SGML document text
146!:strength - 10
147
148# Web browser cookie files
149# (Mozilla, Galeon, Netscape 4, Konqueror..)
150# Ulf Harnhammar <ulfh@update.uu.se>
1510	search/1	#\ HTTP\ Cookie\ File	Web browser cookie text
1520	search/1	#\ Netscape\ HTTP\ Cookie\ File	Netscape cookie text
1530	search/1	#\ KDE\ Cookie\ File	Konqueror cookie text
154
155
156# https://www.qgis.org/en/site/
1570	string		\<!DOCTYPE\040qgis	QGIS XML document
158