dtd2vim : Script for creation XML data file for Vim7 XML omni-completion from DTDs
| script karma
Downloaded by 2107
Comments, bugs, improvements
script versions (upload new version)
|Script for creation XML data file for Vim7 XML omni-completion from DTDs
Requires: perl and perlSGML (tested against 1997Sep18 version)
Copy into your $PATH
dtd2vim <file.dtd> [<dialectname>]
This command will create file <file.vim> (remove .dtd extension and add .vim;
other extensions will remain intact).
<dialectname> (not obligatory) will be part of dictionary name and will be
used as argument for :XMLns command (file name - sans extensions) have to be
perlSGML and this script doesn't work with multiple files. User has to
prepare single DTD file to parse all data.
In created file global variable is named g:xmldata_<dialectname>. When second
argument wasn't provided 'xxxx' will be used.
After that place file in:
directory. Of course it can be also global directory or other Vim data
hierarchy of files. Example for DocBook 4.4:
DTD is in file docbook.dtd, call command with
dtd2vim.pl docbook.dtd docbook44
Put file as:
Omni-completion for DocBook 4.4 files will be started with:
|Copy in your $PATH|
Click on the package to download.
ip used for rating:
||- not all element children were properly recognized
- comment out lines responsible for detection of obligatory attributes, too many false positives; uncomment on your own responsibility
||- generate 'info' field for attributes and tags (/> - EMPTY tag, * - required attribute)
- no extension