sponsor Vim development Vim logo Vim Book Ad

dtd2vim : Script for creation XML data file for Vim7 XML omni-completion from DTDs

 script karma  Rating 19/6, Downloaded by 1703    Comments, bugs, improvements  Vim wiki

created by
Mikolaj Machowski
 
script type
utility
 
description
Script for creation XML data file for Vim7 XML omni-completion from DTDs
Requires: perl and perlSGML (tested against 1997Sep18 version)

INSTALLATION:

   Copy into your $PATH

USAGE:

   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
the same.

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:

   ~/.vim/autoload/xml

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:
  
   ~/.vim/autoload/xml/docbook44.vim

Omni-completion for DocBook 4.4 files will be started with:

   :XMLns docbook44

command.

 
install details
Copy in your $PATH
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
dtd2vim 2.0 2006-04-25 7.0 Mikolaj Machowski - 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
dtd2vim 1.1 2006-02-18 6.0 Mikolaj Machowski - generate 'info' field for attributes and tags (/> - EMPTY tag, * - required attribute)
- no extension
dtd2vim.pl 1.0 2006-02-12 6.0 Mikolaj Machowski Initial upload
ip used for rating: 54.234.7.161

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo