2006-12-24 00:57:46 -06:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2007-06-18 00:03:03 -05:00
|
|
|
<!--
|
|
|
|
|
2011-01-05 22:45:36 -08:00
|
|
|
This file is part of GtkSourceView
|
2007-06-18 00:03:03 -05:00
|
|
|
|
2011-01-05 22:45:36 -08:00
|
|
|
Author: Yevgen Muntyan <muntyan@tamu.edu>
|
|
|
|
Copyright (C) 2006-2007 Yevgen Muntyan <muntyan@tamu.edu>
|
|
|
|
|
|
|
|
GtkSourceView is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
2007-06-18 00:03:03 -05:00
|
|
|
License as published by the Free Software Foundation; either
|
2011-01-05 22:45:36 -08:00
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
2007-06-18 00:03:03 -05:00
|
|
|
|
2011-01-05 22:45:36 -08:00
|
|
|
GtkSourceView is distributed in the hope that it will be useful,
|
2007-06-18 00:03:03 -05:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2011-01-05 22:45:36 -08:00
|
|
|
Lesser General Public License for more details.
|
2007-06-18 00:03:03 -05:00
|
|
|
|
2011-01-05 22:45:36 -08:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with this library; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2007-06-18 00:03:03 -05:00
|
|
|
|
|
|
|
-->
|
2006-12-24 00:57:46 -06:00
|
|
|
<language id="dtd" _name="DTD" version="2.0" _section="Markup">
|
|
|
|
<metadata>
|
|
|
|
<property name="mimetypes">text/x-dtd</property>
|
|
|
|
<property name="globs">*.dtd</property>
|
|
|
|
<property name="block-comment-start"><!--</property>
|
|
|
|
<property name="block-comment-end">--></property>
|
|
|
|
</metadata>
|
|
|
|
|
|
|
|
<styles>
|
2009-01-04 13:45:36 -06:00
|
|
|
<style id="entity" _name="entity" map-to="xml:entity"/>
|
|
|
|
<style id="decl" _name="decl" map-to="xml:doctype"/>
|
|
|
|
<style id="error" _name="error" map-to="xml:error"/>
|
|
|
|
<style id="quoted-value" _name="quoted-value" map-to="xml:attribute-value"/>
|
2006-12-24 00:57:46 -06:00
|
|
|
</styles>
|
|
|
|
|
|
|
|
<definitions>
|
|
|
|
<define-regex id="prefix">[a-zA-Z_][a-zA-Z0-9._-]*</define-regex>
|
|
|
|
<define-regex id="name">[a-zA-Z_][a-zA-Z0-9.:_-]*</define-regex>
|
|
|
|
|
|
|
|
<context id="entity" style-ref="entity">
|
|
|
|
<match>%\%{name};</match>
|
|
|
|
</context>
|
|
|
|
|
|
|
|
<context id="decl-element">
|
|
|
|
<start><!ELEMENT\b</start>
|
|
|
|
<end>></end>
|
|
|
|
<include>
|
|
|
|
<context sub-pattern="0" where="start" style-ref="decl"/>
|
|
|
|
<context sub-pattern="0" where="end" style-ref="decl"/>
|
|
|
|
<context ref="entity"/>
|
|
|
|
<context ref="quoted-value"/>
|
|
|
|
</include>
|
|
|
|
</context>
|
|
|
|
|
|
|
|
|
|
|
|
<context id="quoted-value" style-ref="quoted-value">
|
|
|
|
<start>"</start>
|
|
|
|
<end>"</end>
|
|
|
|
<include>
|
|
|
|
<context style-ref="entity">
|
|
|
|
<match>[%&]\%{name};</match>
|
|
|
|
</context>
|
|
|
|
<context style-ref="error" extend-parent="false">
|
|
|
|
<match>[%&]\S*</match>
|
|
|
|
</context>
|
|
|
|
</include>
|
|
|
|
</context>
|
|
|
|
|
|
|
|
<context id="NDATA" extend-parent="false">
|
|
|
|
<start>\bNDATA\b</start>
|
|
|
|
<include>
|
|
|
|
<context sub-pattern="0" where="start" style-ref="decl"/>
|
|
|
|
<context>
|
|
|
|
<match>\%{name}</match>
|
|
|
|
</context>
|
|
|
|
<context ref="error"/>
|
|
|
|
</include>
|
|
|
|
</context>
|
|
|
|
|
|
|
|
<context id="decl-entity">
|
|
|
|
<start><!ENTITY\s+(%\s+)?\%{name}\b</start>
|
|
|
|
<end>></end>
|
|
|
|
<include>
|
|
|
|
<context sub-pattern="0" where="start" style-ref="decl"/>
|
|
|
|
<context sub-pattern="0" where="end" style-ref="decl"/>
|
|
|
|
<context ref="quoted-value"/>
|
|
|
|
<context extend-parent="false">
|
|
|
|
<start>(SYSTEM|PUBLIC)(?=\s|$)</start>
|
|
|
|
<include>
|
|
|
|
<context sub-pattern="0" where="start" style-ref="decl"/>
|
|
|
|
<context ref="quoted-value"/>
|
|
|
|
<context ref="NDATA"/>
|
|
|
|
<context ref="error"/>
|
|
|
|
</include>
|
|
|
|
</context>
|
|
|
|
<context ref="error"/>
|
|
|
|
</include>
|
|
|
|
</context>
|
|
|
|
|
|
|
|
|
|
|
|
<context id="decl-attlist">
|
|
|
|
<start><!ATTLIST\b</start>
|
|
|
|
<end>></end>
|
|
|
|
<include>
|
|
|
|
<context sub-pattern="0" where="start" style-ref="decl"/>
|
|
|
|
<context sub-pattern="0" where="end" style-ref="decl"/>
|
|
|
|
<context ref="entity"/>
|
|
|
|
<context ref="quoted-value"/>
|
|
|
|
</include>
|
|
|
|
</context>
|
|
|
|
|
|
|
|
<context id="decl-notation">
|
|
|
|
<start><!NOTATION\b</start>
|
|
|
|
<end>></end>
|
|
|
|
<include>
|
|
|
|
<context sub-pattern="0" where="start" style-ref="decl"/>
|
|
|
|
<context sub-pattern="0" where="end" style-ref="decl"/>
|
|
|
|
<context ref="entity"/>
|
|
|
|
<context ref="quoted-value"/>
|
|
|
|
</include>
|
|
|
|
</context>
|
|
|
|
|
|
|
|
<context id="error" style-ref="error" extend-parent="false">
|
|
|
|
<match>\S+</match>
|
|
|
|
</context>
|
|
|
|
|
|
|
|
<context id="dtd">
|
|
|
|
<include>
|
|
|
|
<context ref="xml:comment"/>
|
|
|
|
<context ref="decl-element"/>
|
|
|
|
<context ref="decl-entity"/>
|
|
|
|
<context ref="decl-attlist"/>
|
|
|
|
<context ref="decl-notation"/>
|
|
|
|
</include>
|
|
|
|
</context>
|
|
|
|
</definitions>
|
|
|
|
</language>
|