Skip to content

Commit

Permalink
Merge branch 'release/v0.9.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
tomschr committed Sep 15, 2017
2 parents 1ce093e + f40ea29 commit 9066a8a
Show file tree
Hide file tree
Showing 17 changed files with 30,305 additions and 261 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

geekodoc/rng/docbookxi.rnc
geekodoc/rng/docbookxi.rng
geekodoc/rng/*.srng
geekodoc/rng/catalog.dtd
geekodoc/rng/geekodoc5*.rng
geekodoc/tests/*.err

build/
autom4te.cache/
Expand Down
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# config file for automatic testing at travis-ci.org
language: python
python:
- 3.5
sudo:
required
env:
global:
- LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so


# command to install dependencies
before_install:
# - sudo apt-get -qq update
- sudo apt-get install -y libxml2-dev libxml2-utils xsltproc jing trang make
# docbook5-xml
- cat /etc/os-release

install:
- pip install rnginline
# Workaround to download DocBook 5.1 schema directly
- sudo mkdir -p /usr/share/xml/docbook/schema/rng/5.1/
- sudo wget -P /usr/share/xml/docbook/schema/rng/5.1/ http://docs.oasis-open.org/docbook/docbook/v5.1/cos01/schemas/rng/docbookxi.rnc http://docs.oasis-open.org/docbook/docbook/v5.1/cos01/schemas/rng/docbookxi.rng
- make VERBOSE=1 -C geekodoc/rng

# commands to run tests
script:
- ./geekodoc/tests/run-tests.sh
- ./novdoc/tests/run-tests.sh
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
------------------------------------------------------------------
Fri Sept 15 09:16:00 UTC 2016 - toms@opensuse.org

Release 0.9.8

* GeekoDoc
* Restrict Possible Values in format Attribute (#24)
* Fix outdated Schematron rules (#22)
* Implement task elements (#20)
* Adapt content model of task* elements (#1)
* Add test cases and use Travis to check schema

------------------------------------------------------------------
Thu Dec 01 09:52:00 UTC 2016 - toms@opensuse.org

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SUSE Schemas

[![Build Status](https://travis-ci.org/openSUSE/geekodoc.svg?branch=develop)](https://travis-ci.org/openSUSE/geekodoc)


## NovDoc
Expand Down
44 changes: 31 additions & 13 deletions geekodoc/rng/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,64 @@
# Requirements:
# * trang
# * docbook_5
# * python3-rnginline (from obs://home:thomas-schraitle/python3-rnginline)
# * python3-rnginline (from obs://devel:languages:python3/python3-rnginline)


.SUFFIXES: .rng rnc

SUSESCHEMA := geekodoc5
SUSESCHEMA_RNC := $(SUSESCHEMA)-flat.rnc
SUSESCHEMA_RNG := $(patsubst %.rnc, %.rng, $(SUSESCHEMA_RNC))
DOCBOOKXI_RNC_PATH := /usr/share/xml/docbook/schema/rng/5.1/docbookxi.rnc
DOCBOOKXI_RNG_PATH := $(patsubst %.rnc, %.rng, $(DOCBOOKXI_RNC_PATH))
DOCBOOKXI_RNC := $(notdir $(DOCBOOKXI_RNC_PATH))
DOCBOOKXI_RNG := $(patsubst .rnc,.rng,$(DOCBOOKXI_RNC))
DOCBOOKXI_RNG := $(patsubst %.rnc, %.rng, $(DOCBOOKXI_RNC))


.PHONY: all clean

all: $(SUSESCHEMA)-flat.rnc
all: $(SUSESCHEMA_RNC) $(SUSESCHEMA_RNG)

clean:
rm $(SUSESCHEMA)-flat.rnc $(DOCBOOKXI_RNC) $(DOCBOOKXI_RNG) 2>/dev/null || true
rm $(DOCBOOKXI_RNC) $(DOCBOOKXI_RNG) $(SUSESCHEMA)*.rng \
transclusion.rng \
2>/dev/null || true


.INTERMEDIATE: $(SUSESCHEMA).rng $(SUSESCHEMA)-flat.rni $(SUSESCHEMA)-flat.rng

#
# HINT:
# We can't just link it from the system, we need to apply
# a stylesheet to fix some Schematron pattern rules first
# (see openSUSE/geekodoc#22)
# From here we can create the RNC. Here it is a visual
# presentation:
#
# DB RNG --[XSLT]--> DB RNG2 --[trang]--> DB RNC
#
$(DOCBOOKXI_RNG): $(DOCBOOKXI_RNG_PATH)
@echo "* Fixing DocBook RNG schema..."
xsltproc --output $@ ../xsl/sch-fix.xsl $<

$(DOCBOOKXI_RNC): $(DOCBOOKXI_RNC_PATH)
@echo "* Linking $< -> $@"
ln -sf $<
$(DOCBOOKXI_RNC): $(DOCBOOKXI_RNG)
@echo "* Converting DocBook $< -> $@"
trang $< $@

# .INTERMEDIATE: $(SUSESCHEMA).rng
$(SUSESCHEMA).rng: $(SUSESCHEMA).rnc $(DOCBOOKXI_RNC)
@echo "* Converting $< -> $@"
trang $< $@

.INTERMEDIATE: $(SUSESCHEMA)-flat.rni
$(SUSESCHEMA)-flat.rni: $(SUSESCHEMA).rng
@echo "* Flattening $< -> $@"
rnginline $< $@

$(SUSESCHEMA)-flat.rng: $(SUSESCHEMA)-flat.rni
echo '* Cleaning up schema contents $< -> $@'
# .INTERMEDIATE: $(SUSESCHEMA)-flat.rng
$(SUSESCHEMA_RNG): $(SUSESCHEMA)-flat.rni
@echo '* Cleaning up schema contents $< -> $@'
xmllint -o $@ --nsclean --format $<

$(SUSESCHEMA)-flat.rnc: $(SUSESCHEMA)-flat.rng
$(SUSESCHEMA_RNC): $(SUSESCHEMA_RNG)
@echo "* Converting $< -> $@"
trang $< $@
@sed -i -r 's_\s+$$__' $@

Loading

0 comments on commit 9066a8a

Please sign in to comment.