skypacer210 / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Better support is needed for DocBook 5 in filetype.vim and filetype/docbk.vim #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try opening a DocBook/XML 5 file such as 
https://bitbucket.org/shlomif/shlomi-fish-homepage/src/d3f1e09a1269d87d84d594139
8bfa8c6030820af/lib/docbook/5/xml/human-hacking-field-guide-v2.xml?at=default 
using "vim human*.xml" or "gvim human*.xml".
2. "set ft?" will indicate it as xml instead of as docbk. 
3. After doing "set ft=docbk" some of the tags won't be highlighted.

What version of the product are you using? On what operating system?

I'm using git from vim-hg on Linux.

The problem is that DocBook/XML 5 did away with the DOCTYPE and are instead 
using namespaces. The attached file fixes part of the problem, but I've delayed 
working out the difference in tags between DocBook 4 and DocBook 5 for later on.

I am going to work on it on this branch:

https://code.google.com/r/shlomif-changes/source/list?name=shlomif_docbook5_supp
ort

Best regards,

-- Shlomi Fish

Original issue reported on code.google.com by shlomif@gmail.com on 19 Nov 2012 at 11:20

Attachments:

GoogleCodeExporter commented 9 years ago
I'll include the patch to filetype.vim.

Original comment by brammool...@gmail.com on 20 Nov 2012 at 9:55

GoogleCodeExporter commented 9 years ago
Here is the second patch, that amends the first one to provide a b:docbk_ver 
variable with some new common tags. There are probably some other tags there, 
but they are less common, and I didn't appear to use them in my DocBook/XML 5 
documents.

Original comment by shlomif@gmail.com on 20 Nov 2012 at 1:57

Attachments:

GoogleCodeExporter commented 9 years ago
Here is the complete patch that adds support for all the tags. It was generated 
using the Perl/Python/Bash scripts here:

https://bitbucket.org/shlomif/vim-docbook-5-support

Regards,

-- Shlomi Fish

Original comment by shlomif@gmail.com on 26 Nov 2012 at 7:09

Attachments:

GoogleCodeExporter commented 9 years ago
I have included the changes.  Will be in the next runtime file update.

Original comment by brammool...@gmail.com on 28 Nov 2012 at 5:12