relpipe-data/examples/ssm-xmltable-1.makefile
author František Kučera <franta-hg@frantovo.cz>
Mon, 21 Feb 2022 01:21:22 +0100
branchv_0
changeset 330 70e7eb578cfa
parent 326 ab7f333f1225
permissions -rw-r--r--
Added tag relpipe-v0.18 for changeset 5bc2bb8b7946

build/statistics.rp: text/ssm.en.xml
	mkdir -p build
	cat text/ssm.en.xml \
		| relpipe-in-xmltable \
			--namespace "m" "tag:globalcode.info,2019:sane-software/manifesto" \
			--relation "chapter" \
				--records "//m:chapter" \
				--attribute "name"            string  "m:name" \
				--attribute "requirements"    integer "count(descendant::m:item[m:type='requirement'])" \
				--attribute "recommendations" integer "count(descendant::m:item[m:type='recommendation'])" \
				--attribute "informations"    integer "count(descendant::m:item[m:type='information'])" \
				--attribute "items_total"     integer "count(descendant::m:item)" \
		> build/statistics.rp

# Prints a table with number of items in particular chapters:
statistics: build/statistics.rp
	cat build/statistics.rp | relpipe-out-tabular
	
statistics-chart: build/statistics.rp
	cat build/statistics.rp | relpipe-tr-cut --relation ".*" --attribute "(name|.*s)" | relpipe-out-gui -title "Sane software manifesto – chart of rule types"