diff runtime/syntax/docbk.vim @ 3967:fdb8a9c7bd91

Updated runtime files.
author Bram Moolenaar <bram@vim.org>
date Wed, 28 Nov 2012 18:21:11 +0100
parents 7bc41231fbc7
children 43efa4f5a8ea
line wrap: on
line diff
--- a/runtime/syntax/docbk.vim
+++ b/runtime/syntax/docbk.vim
@@ -1,9 +1,10 @@
 " Vim syntax file
 " Language:	DocBook
 " Maintainer:	Devin Weaver <vim@tritarget.com>
+" Last Updated By: Shlomi Fish
 " URL:		http://tritarget.com/pub/vim/syntax/docbk.vim
-" Last Change:	$Date: 2005/06/23 22:31:01 $
-" Version:	$Revision: 1.2 $
+" Last Change:	2012 Nov 28
+" Version:	1.2 (and modified after that)
 " Thanks to Johannes Zellner <johannes@zellner.org> for the default to XML
 " suggestion.
 
@@ -28,6 +29,15 @@ if !exists('b:docbk_type')
     let b:docbk_type = 'xml'
   endif
 endif
+
+if !exists('b:docbk_ver')
+  if exists('docbk_ver')
+    let b:docbk_ver = docbk_ver
+  else
+    let b:docbk_ver = 4
+  endif
+end
+
 if 'xml' == b:docbk_type
     doau Syntax xml
     syn cluster xmlTagHook add=docbkKeyword
@@ -40,81 +50,121 @@ elseif 'sgml' == b:docbk_type
     syn case ignore
 endif
 
-" <comment> has been removed and replace with <remark> in DocBook 4.0
-" <comment> kept for backwards compatability.
-syn keyword docbkKeyword abbrev abstract accel ackno acronym action contained
-syn keyword docbkKeyword address affiliation alt anchor answer appendix contained
-syn keyword docbkKeyword application area areaset areaspec arg artheader contained
-syn keyword docbkKeyword article articleinfo artpagenums attribution audiodata contained
-syn keyword docbkKeyword audioobject author authorblurb authorgroup contained
-syn keyword docbkKeyword authorinitials beginpage bibliodiv biblioentry contained
-syn keyword docbkKeyword bibliography bibliomisc bibliomixed bibliomset contained
-syn keyword docbkKeyword biblioset blockquote book bookbiblio bookinfo contained
-syn keyword docbkKeyword bridgehead callout calloutlist caption caution contained
-syn keyword docbkKeyword chapter citation citerefentry citetitle city contained
-syn keyword docbkKeyword classname cmdsynopsis co collab collabname contained
-syn keyword docbkKeyword colophon colspec command comment computeroutput contained
-syn keyword docbkKeyword confdates confgroup confnum confsponsor conftitle contained
-syn keyword docbkKeyword constant contractnum contractsponsor contrib contained
-syn keyword docbkKeyword copyright corpauthor corpname country database contained
-syn keyword docbkKeyword date dedication docinfo edition editor email contained
-syn keyword docbkKeyword emphasis entry entrytbl envar epigraph equation contained
-syn keyword docbkKeyword errorcode errorname errortype example fax figure contained
-syn keyword docbkKeyword filename firstname firstterm footnote footnoteref contained
+syn keyword docbkKeyword abbrev abstract accel acronym address contained
+syn keyword docbkKeyword affiliation alt anchor answer appendix contained
+syn keyword docbkKeyword application area areaset areaspec arg contained
+syn keyword docbkKeyword article artpagenums attribution audiodata contained
+syn keyword docbkKeyword audioobject author authorgroup contained
+syn keyword docbkKeyword authorinitials bibliocoverage bibliodiv contained
+syn keyword docbkKeyword biblioentry bibliography biblioid contained
+syn keyword docbkKeyword bibliolist bibliomisc bibliomixed contained
+syn keyword docbkKeyword bibliomset biblioref bibliorelation contained
+syn keyword docbkKeyword biblioset bibliosource blockquote book contained
+syn keyword docbkKeyword bridgehead callout calloutlist caption contained
+syn keyword docbkKeyword caution chapter citation citebiblioid contained
+syn keyword docbkKeyword citerefentry citetitle city classname contained
+syn keyword docbkKeyword classsynopsis classsynopsisinfo cmdsynopsis contained
+syn keyword docbkKeyword co code col colgroup collab colophon contained
+syn keyword docbkKeyword colspec command computeroutput confdates contained
+syn keyword docbkKeyword confgroup confnum confsponsor conftitle contained
+syn keyword docbkKeyword constant constructorsynopsis contractnum contained
+syn keyword docbkKeyword contractsponsor contrib copyright coref contained
+syn keyword docbkKeyword country database date dedication contained
+syn keyword docbkKeyword destructorsynopsis edition editor email contained
+syn keyword docbkKeyword emphasis entry entrytbl envar epigraph contained
+syn keyword docbkKeyword equation errorcode errorname errortext contained
+syn keyword docbkKeyword errortype example exceptionname fax contained
+syn keyword docbkKeyword fieldsynopsis figure filename firstname contained
+syn keyword docbkKeyword firstterm footnote footnoteref contained
 syn keyword docbkKeyword foreignphrase formalpara funcdef funcparams contained
 syn keyword docbkKeyword funcprototype funcsynopsis funcsynopsisinfo contained
-syn keyword docbkKeyword function glossary glossdef glossdiv glossentry contained
-syn keyword docbkKeyword glosslist glosssee glossseealso glossterm graphic contained
-syn keyword docbkKeyword graphicco group guibutton guiicon guilabel contained
+syn keyword docbkKeyword function glossary glossdef glossdiv contained
+syn keyword docbkKeyword glossentry glosslist glosssee glossseealso contained
+syn keyword docbkKeyword glossterm group guibutton guiicon guilabel contained
 syn keyword docbkKeyword guimenu guimenuitem guisubmenu hardware contained
-syn keyword docbkKeyword highlights holder honorific imagedata imageobject contained
-syn keyword docbkKeyword imageobjectco important index indexdiv indexentry contained
-syn keyword docbkKeyword indexterm informalequation informalexample contained
-syn keyword docbkKeyword informalfigure informaltable inlineequation contained
-syn keyword docbkKeyword inlinegraphic inlinemediaobject interface contained
-syn keyword docbkKeyword interfacedefinition invpartnumber isbn issn contained
-syn keyword docbkKeyword issuenum itemizedlist itermset jobtitle keycap contained
-syn keyword docbkKeyword keycode keycombo keysym keyword keywordset label contained
-syn keyword docbkKeyword legalnotice lineage lineannotation link listitem contained
-syn keyword docbkKeyword literal literallayout lot lotentry manvolnum contained
-syn keyword docbkKeyword markup medialabel mediaobject mediaobjectco contained
-syn keyword docbkKeyword member menuchoice modespec mousebutton msg msgaud contained
-syn keyword docbkKeyword msgentry msgexplan msginfo msglevel msgmain contained
-syn keyword docbkKeyword msgorig msgrel msgset msgsub msgtext note contained
-syn keyword docbkKeyword objectinfo olink option optional orderedlist contained
-syn keyword docbkKeyword orgdiv orgname otheraddr othercredit othername contained
-syn keyword docbkKeyword pagenums para paramdef parameter part partintro contained
-syn keyword docbkKeyword phone phrase pob postcode preface primary contained
-syn keyword docbkKeyword primaryie printhistory procedure productname contained
-syn keyword docbkKeyword productnumber programlisting programlistingco contained
-syn keyword docbkKeyword prompt property pubdate publisher publishername contained
-syn keyword docbkKeyword pubsnumber qandadiv qandaentry qandaset question contained
-syn keyword docbkKeyword quote refclass refdescriptor refentry contained
+syn keyword docbkKeyword holder honorific imagedata imageobject contained
+syn keyword docbkKeyword imageobjectco important index indexdiv contained
+syn keyword docbkKeyword indexentry indexterm informalequation contained
+syn keyword docbkKeyword informalexample informalfigure contained
+syn keyword docbkKeyword informaltable initializer inlineequation contained
+syn keyword docbkKeyword inlinemediaobject interfacename issuenum contained
+syn keyword docbkKeyword itemizedlist itermset jobtitle keycap contained
+syn keyword docbkKeyword keycode keycombo keysym keyword keywordset contained
+syn keyword docbkKeyword label legalnotice lineage lineannotation contained
+syn keyword docbkKeyword link listitem literal literallayout contained
+syn keyword docbkKeyword manvolnum markup mathphrase mediaobject contained
+syn keyword docbkKeyword member menuchoice methodname methodparam contained
+syn keyword docbkKeyword methodsynopsis modifier mousebutton msg contained
+syn keyword docbkKeyword msgaud msgentry msgexplan msginfo msglevel contained
+syn keyword docbkKeyword msgmain msgorig msgrel msgset msgsub contained
+syn keyword docbkKeyword msgtext note olink ooclass ooexception contained
+syn keyword docbkKeyword oointerface option optional orderedlist contained
+syn keyword docbkKeyword orgdiv orgname otheraddr othercredit contained
+syn keyword docbkKeyword othername package pagenums para paramdef contained
+syn keyword docbkKeyword parameter part partintro personblurb contained
+syn keyword docbkKeyword personname phone phrase pob postcode contained
+syn keyword docbkKeyword preface primary primaryie printhistory contained
+syn keyword docbkKeyword procedure productname productnumber contained
+syn keyword docbkKeyword programlisting programlistingco prompt contained
+syn keyword docbkKeyword property pubdate publisher publishername contained
+syn keyword docbkKeyword qandadiv qandaentry qandaset question quote contained
+syn keyword docbkKeyword refclass refdescriptor refentry contained
 syn keyword docbkKeyword refentrytitle reference refmeta refmiscinfo contained
 syn keyword docbkKeyword refname refnamediv refpurpose refsect1 contained
-syn keyword docbkKeyword refsect1info refsect2 refsect2info refsect3 contained
-syn keyword docbkKeyword refsect3info refsynopsisdiv refsynopsisdivinfo contained
-syn keyword docbkKeyword releaseinfo remark replaceable returnvalue revhistory contained
-syn keyword docbkKeyword revision revnumber revremark row sbr screen contained
-syn keyword docbkKeyword screenco screeninfo screenshot secondary contained
-syn keyword docbkKeyword secondaryie sect1 sect1info sect2 sect2info sect3 contained
-syn keyword docbkKeyword sect3info sect4 sect4info sect5 sect5info section contained
-syn keyword docbkKeyword sectioninfo see seealso seealsoie seeie seg contained
-syn keyword docbkKeyword seglistitem segmentedlist segtitle seriesinfo contained
-syn keyword docbkKeyword seriesvolnums set setindex setinfo sgmltag contained
-syn keyword docbkKeyword shortaffil shortcut sidebar simpara simplelist contained
-syn keyword docbkKeyword simplesect spanspec state step street structfield contained
-syn keyword docbkKeyword structname subject subjectset subjectterm contained
-syn keyword docbkKeyword subscript substeps subtitle superscript surname contained
-syn keyword docbkKeyword symbol synopfragment synopfragmentref synopsis contained
-syn keyword docbkKeyword systemitem table tbody term tertiary tertiaryie contained
-syn keyword docbkKeyword textobject tfoot tgroup thead tip title contained
-syn keyword docbkKeyword titleabbrev toc tocback tocchap tocentry tocfront contained
-syn keyword docbkKeyword toclevel1 toclevel2 toclevel3 toclevel4 toclevel5 contained
-syn keyword docbkKeyword tocpart token trademark type ulink userinput contained
+syn keyword docbkKeyword refsect2 refsect3 refsection refsynopsisdiv contained
+syn keyword docbkKeyword releaseinfo remark replaceable returnvalue contained
+syn keyword docbkKeyword revdescription revhistory revision contained
+syn keyword docbkKeyword revnumber revremark row sbr screen screenco contained
+syn keyword docbkKeyword screenshot secondary secondaryie sect1 contained
+syn keyword docbkKeyword sect2 sect3 sect4 sect5 section see seealso contained
+syn keyword docbkKeyword seealsoie seeie seg seglistitem contained
+syn keyword docbkKeyword segmentedlist segtitle seriesvolnums set contained
+syn keyword docbkKeyword setindex shortaffil shortcut sidebar contained
+syn keyword docbkKeyword simpara simplelist simplemsgentry contained
+syn keyword docbkKeyword simplesect spanspec state step contained
+syn keyword docbkKeyword stepalternatives street subject subjectset contained
+syn keyword docbkKeyword subjectterm subscript substeps subtitle contained
+syn keyword docbkKeyword superscript surname symbol synopfragment contained
+syn keyword docbkKeyword synopfragmentref synopsis systemitem table contained
+syn keyword docbkKeyword task taskprerequisites taskrelated contained
+syn keyword docbkKeyword tasksummary tbody td term termdef tertiary contained
+syn keyword docbkKeyword tertiaryie textdata textobject tfoot tgroup contained
+syn keyword docbkKeyword th thead tip title titleabbrev toc tocentry contained
+syn keyword docbkKeyword token tr trademark type uri userinput contained
 syn keyword docbkKeyword varargs variablelist varlistentry varname contained
-syn keyword docbkKeyword videodata videoobject void volumenum warning contained
-syn keyword docbkKeyword wordasword xref year contained
+syn keyword docbkKeyword videodata videoobject void volumenum contained
+syn keyword docbkKeyword warning wordasword xref year contained
+
+if b:docbk_ver == 4
+  syn keyword docbkKeyword ackno action appendixinfo articleinfo contained
+  syn keyword docbkKeyword authorblurb beginpage bibliographyinfo contained
+  syn keyword docbkKeyword blockinfo bookinfo chapterinfo contained
+  syn keyword docbkKeyword collabname corpauthor corpcredit contained
+  syn keyword docbkKeyword corpname glossaryinfo graphic graphicco contained
+  syn keyword docbkKeyword highlights indexinfo inlinegraphic contained
+  syn keyword docbkKeyword interface invpartnumber isbn issn lot contained
+  syn keyword docbkKeyword lotentry medialabel mediaobjectco contained
+  syn keyword docbkKeyword modespec objectinfo partinfo contained
+  syn keyword docbkKeyword prefaceinfo pubsnumber refentryinfo contained
+  syn keyword docbkKeyword referenceinfo refsect1info refsect2info contained
+  syn keyword docbkKeyword refsect3info refsectioninfo contained
+  syn keyword docbkKeyword refsynopsisdivinfo screeninfo sect1info contained
+  syn keyword docbkKeyword sect2info sect3info sect4info sect5info contained
+  syn keyword docbkKeyword sectioninfo setindexinfo setinfo contained
+  syn keyword docbkKeyword sgmltag sidebarinfo structfield contained
+  syn keyword docbkKeyword structname tocback tocchap tocfront contained
+  syn keyword docbkKeyword toclevel1 toclevel2 toclevel3 toclevel4 contained
+  syn keyword docbkKeyword toclevel5 tocpart ulink contained
+
+else
+  syn keyword docbkKeyword acknowledgements annotation arc contained
+  syn keyword docbkKeyword constraint constraintdef cover contained
+  syn keyword docbkKeyword extendedlink givenname info lhs locator contained
+  syn keyword docbkKeyword multimediaparam nonterminal org person contained
+  syn keyword docbkKeyword production productionrecap contained
+  syn keyword docbkKeyword productionset rhs tag tocdiv topic contained
+
+endif
 
 " Add special emphasis on some regions. Thanks to Rory Hunter <roryh@dcs.ed.ac.uk> for these ideas.
 syn region docbkRegion start="<emphasis>"lc=10 end="</emphasis>"me=e-11 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend