xref: /freebsd/contrib/file/magic/Magdir/sgml (revision 3c5ba95ad12285ad37c182a4bfc1b240ec6d18a7)
1
2#------------------------------------------------------------------------------
3# $File: sgml,v 1.38 2017/10/11 11:40:43 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>>19	search/4096	\<gnc-v2		GnuCash file
11!:mime	application/x-gnucash
120	string		\<svg			SVG Scalable Vector Graphics image
13!:mime	image/svg
14
15# Sitemap file
160	string/t		\<?xml\ version=
17>14	regex		['"\ \t]*[0-9.]+['"\ \t]*
18>>19	search/4096	\<urlset		XML Sitemap document text
19!:mime	application/xml-sitemap
20
21# OpenStreetMap XML (.osm)
22# http://wiki.openstreetmap.org/wiki/OSM_XML
23# From: Markus Heidelberg <markus.heidelberg@web.de>
240	string		\<?xml\ version=
25>14	regex		['"\ \t]*[0-9.]+['"\ \t]*
26>>19	search/4096	\<osm			OpenStreetMap XML data
27
28# xhtml
290	string/t		\<?xml\ version="
30>19	search/4096/cWbt	\<!doctype\ html	XHTML document text
31>>15	string		>\0	(version %.3s)
32!:mime	text/html
330	string/t		\<?xml\ version='
34>19	search/4096/cWbt	\<!doctype\ html	XHTML document text
35>>15	string		>\0	(version %.3s)
36!:mime	text/html
370	string/t		\<?xml\ version="
38>19	search/4096/cWbt	\<html	broken XHTML document text
39>>15	string		>\0	(version %.3s)
40!:mime	text/html
41
42#------------------------------------------------------------------------------
43# sgml:  file(1) magic for Standard Generalized Markup Language
44# HyperText Markup Language (HTML) is an SGML document type,
45# from Daniel Quinlan (quinlan@yggdrasil.com)
46# adapted to string extenstions by Anthon van der Neut <anthon@mnt.org)
470	search/4096/cWt	\<!doctype\ html	HTML document text
48!:mime	text/html
49!:strength + 5
50
51# SVG document
52# https://www.w3.org/TR/SVG/single-page.html
530	search/4096/cWbt	\<!doctype\ svg	SVG XML document
54!:mime  image/svg+xml
55!:strength + 5
56
570	search/4096/cwt	\<head\>		HTML document text
58!:mime	text/html
59!:strength + 5
600	search/4096/cWt	\<head\ 		HTML document text
61!:mime	text/html
62!:strength + 5
630	search/4096/cwt	\<title\>		HTML document text
64!:mime	text/html
65!:strength + 5
660	search/4096/cWt	\<title\ 		HTML document text
67!:mime	text/html
68!:strength + 5
690	search/4096/cwt	\<html\>		HTML document text
70!:mime	text/html
71!:strength + 5
720	search/4096/cWt	\<html\ 		HTML document text
73!:mime	text/html
74!:strength + 5
750	search/4096/cwt	\<script\> 		HTML document text
76!:mime	text/html
77!:strength + 5
780	search/4096/cWt	\<script\ 		HTML document text
79!:mime	text/html
80!:strength + 5
810	search/4096/cwt	\<style\> 		HTML document text
82!:mime	text/html
83!:strength + 5
840	search/4096/cWt	\<style\  		HTML document text
85!:mime	text/html
86!:strength + 5
870	search/4096/cwt	\<table\>		HTML document text
88!:mime	text/html
89!:strength + 5
900	search/4096/cWt	\<table\ 		HTML document text
91!:mime	text/html
92!:strength + 5
93
940	search/4096/cwt	\<a\ href=		HTML document text
95!:mime	text/html
96!:strength + 5
97
98# Extensible markup language (XML), a subset of SGML
99# from Marc Prud'hommeaux (marc@apocalypse.org)
1000	search/1/cwt	\<?xml			XML document text
101!:mime	text/xml
102!:strength + 5
1030	string/t		\<?xml\ version\ "	XML
104!:mime	text/xml
105!:strength + 5
1060	string/t		\<?xml\ version="	XML
107!:mime	text/xml
108!:strength + 5
109>15	string/t	>\0			%.3s document text
110>>23	search/1	\<xsl:stylesheet	(XSL stylesheet)
111>>24	search/1	\<xsl:stylesheet	(XSL stylesheet)
1120	string		\<?xml\ version='	XML
113!:mime	text/xml
114!:strength + 5
115>15	string/t	>\0			%.3s document text
116>>23	search/1	\<xsl:stylesheet	(XSL stylesheet)
117>>24	search/1	\<xsl:stylesheet	(XSL stylesheet)
1180	search/1/wt	\<?XML			broken XML document text
119!:mime	text/xml
120!:strength - 10
121
122
123# SGML, mostly from rph@sq
1240	search/4096/cwt	\<!doctype		exported SGML document text
1250	search/4096/cwt	\<!subdoc		exported SGML subdocument text
1260	search/4096/cwt	\<!--			exported SGML document text
127!:strength - 10
128
129# Web browser cookie files
130# (Mozilla, Galeon, Netscape 4, Konqueror..)
131# Ulf Harnhammar <ulfh@update.uu.se>
1320	search/1	#\ HTTP\ Cookie\ File	Web browser cookie text
1330	search/1	#\ Netscape\ HTTP\ Cookie\ File	Netscape cookie text
1340	search/1	#\ KDE\ Cookie\ File	Konqueror cookie text
135
136# XML-based format representing braille pages in a digital format.
137#
138# Specification:
139# http://files.pef-format.org/specifications/pef-2008-1/pef-specification.html
140#
141# Simon Aittamaa <simon.aittamaa@gmail.com>
1420   string      \<?xml\ version=
143>14 regex       ['"\ \t]*[0-9.]+['"\ \t]*
144>>19    search/4096 \<pef           Portable Embosser Format
145!:mime  application/x-pef+xml