diff --git a/geekodoc/rng/Makefile b/geekodoc/rng/Makefile index 3214c0f..6b8746a 100644 --- a/geekodoc/rng/Makefile +++ b/geekodoc/rng/Makefile @@ -6,8 +6,9 @@ # # Requirements: # * trang +# * rng2srng # * docbook_5 -# * python3-rnginline (from obs://home:thomas-schraitle/python3-rnginline) +# * python3-rnginline (from obs://devel:languages:python3/python3-rnginline) .SUFFIXES: .rng rnc @@ -20,13 +21,12 @@ DOCBOOKXI_RNG := $(patsubst .rnc,.rng,$(DOCBOOKXI_RNC)) .PHONY: all clean -all: $(SUSESCHEMA)-flat.rnc +all: $(SUSESCHEMA)-flat.rnc $(SUSESCHEMA)-flat.rng $(SUSESCHEMA).vim clean: - rm $(SUSESCHEMA)-flat.rnc $(DOCBOOKXI_RNC) $(DOCBOOKXI_RNG) 2>/dev/null || true - - -.INTERMEDIATE: $(SUSESCHEMA).rng $(SUSESCHEMA)-flat.rni $(SUSESCHEMA)-flat.rng + rm $(SUSESCHEMA)-flat.rn{c,g} \ + $(SUSESCHEMA).vim \ + $(DOCBOOKXI_RNC) $(DOCBOOKXI_RNG) 2>/dev/null || true $(DOCBOOKXI_RNC): $(DOCBOOKXI_RNC_PATH) @@ -37,6 +37,7 @@ $(SUSESCHEMA).rng: $(SUSESCHEMA).rnc $(DOCBOOKXI_RNC) @echo "* Converting $< -> $@" trang $< $@ +.INTERMEDIATE: $(SUSESCHEMA)-flat.rni $(SUSESCHEMA)-flat.rni: $(SUSESCHEMA).rng @echo "* Flattening $< -> $@" rnginline $< $@ @@ -50,3 +51,11 @@ $(SUSESCHEMA)-flat.rnc: $(SUSESCHEMA)-flat.rng trang $< $@ @sed -i -r 's_\s+$$__' $@ +# .INTERMEDIATE: $(SUSESCHEMA)-flat.srng +$(SUSESCHEMA)-flat.srng: $(SUSESCHEMA)-flat.rng + echo '* Creating Simplified RNG version' + rng2srng $< | xmllint --format - > $@ + +$(SUSESCHEMA).vim: $(SUSESCHEMA)-flat.srng + echo '* Creating VIM XML Omni Datafile...' + xsltproc -o $@ ../../rng2vim.xsl $< diff --git a/rng2vim.xsl b/rng2vim.xsl new file mode 100644 index 0000000..6ae0ce5 --- /dev/null +++ b/rng2vim.xsl @@ -0,0 +1,254 @@ + + + + + + + + + + + + + + geekodoc5 + + http://www.w3.org/XML/1998/namespace + http://www.w3.org/1999/xlink + + + + + " Vim XML data file +" Language: GeekoDoc5 +" Maintainer: Thomas Schraitle <tom@opensuse.org> +" URL: https://github.com/openSUSE/geekodo +" Last Change: November 2016 +" Description: An XML data file for the GeekoDoc5 markup language. + +let g:xmldata_ + + = { + \ 'vimxmlentities': [''], + + + + } + " vim:ft=vim:ff=unix + + + + + + + + + + + + + + + + + + + + + + + + + + + Found allowed elements for start. + + + + + + + + , + + + + + + + + + + + + + + + \ 'vimxmlroot': [ + + ], + + + + + + + ref: : + + ' + + ' + + + + + + + + + + + + Found + + \ + + : [ + + + + \ [ + + + , + + ], + + + \ { + + + + + + xml: + xlink: + + + + attr: + + [ + + + + , + + + ], + + } + \ ], + + + + + + + + + + + + define + + + \ [ + + + + ], + + + + \ ], + + + + + + + + \ No newline at end of file