diff --git a/ChangeLog b/ChangeLog index bfbda2805..534409515 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,13 @@ +2002-01-11 Pavel Roskin + + * syntax/xml.syntax: New file - hightlighting for XML. + From Petr Kozelka + * syntax/Syntax: Add xml.syntax. + * syntax/Makefile.am: Likewise. + 2002-01-04 Pablo Saratxaga - * configure.in: Added "eu" to ALL_LINGUAS + * configure.in: Added "eu" to ALL_LINGUAS. 2002-01-03 Pavel Roskin diff --git a/syntax/Makefile.am b/syntax/Makefile.am index 94d12064e..1efef3f4d 100644 --- a/syntax/Makefile.am +++ b/syntax/Makefile.am @@ -27,6 +27,7 @@ syntax_DATA = \ slang.syntax \ swig.syntax \ texinfo.syntax \ - unknown.syntax + unknown.syntax \ + xml.syntax EXTRA_DIST = $(syntax_DATA) diff --git a/syntax/Syntax b/syntax/Syntax index 96d316f4f..3b6b96fb4 100644 --- a/syntax/Syntax +++ b/syntax/Syntax @@ -48,6 +48,9 @@ include nroff.syntax file ..\*\\.(htm|html|HTM|HTML)$ HTML\sFile include html.syntax +file ..\*\\.(xml|XML|xsd|XSD|xslt?|XSLT?|dtd|DTD)$ XML\sdocument (\\?xml\sversion|!DOCTYPE\s) +include xml.syntax + file ..\*\\.(pp|PP|pas|PAS)$ Pascal\sProgram include pascal.syntax diff --git a/syntax/xml.syntax b/syntax/xml.syntax new file mode 100644 index 000000000..c4743f02a --- /dev/null +++ b/syntax/xml.syntax @@ -0,0 +1,48 @@ +# XML syntax highlighting +# +# Author: Petr Kozelka +# http://kozelka.hyperlink.cz + +context default + keyword &*; white/16 cyan/12 + spellcheck + +context brightgreen/22 + spellcheck + +context yellow/20 + keyword '+' brightcyan/23 + keyword "+" brightcyan/23 + keyword whole DOCTYPE white/13 red/0 + keyword whole PUBLIC brightred/13 + keyword whole SYSTEM brightred/13 + keyword whole NDATA brightred/13 + keyword whole CDATA white/13 + keyword whole #PCDATA white/13 + keyword whole EMPTY white/13 + keyword whole #REQUIRED white/13 + keyword whole #IMPLIED white/13 + keyword whole ELEMENT white/13 + keyword whole ENTITY brightred/13 + keyword whole ATTLIST white/13 + keyword whole %*; white/16 cyan/12 + keyword \( lightgray/23 + keyword \) lightgray/23 + keyword \* lightgray/23 + keyword \? lightgray/23 + keyword \+ lightgray/23 + keyword \| lightgray/23 + keyword \, lightgray/23 + spellcheck + +context <\?xml \?> white/15 red/0 +context <\? \?> lightgray/15 black/0 +context < > white/15 + keyword \sxmlns\:*\="+" brightred/24 + keyword \sxmlns\="+" brightred/24 + keyword \s+\= yellow/24 + keyword '*' brightcyan/23 + keyword "*" brightcyan/23 + spellcheck + +