# HG changeset patch # User Ruslan Ermilov # Date 1330416382 0 # Node ID fbba1f292dc9eff8a9a5d482e5bc6da99a179aca # Parent 0412333658fe340db578e64c4b3a8cfce6fd76ee Generate mapping of directives to URIs in the nginx map format. diff -r 0412333658fe -r fbba1f292dc9 GNUmakefile --- a/GNUmakefile Tue Feb 28 07:56:54 2012 +0000 +++ b/GNUmakefile Tue Feb 28 08:06:22 2012 +0000 @@ -263,4 +263,12 @@ --exclude .svn \ $(SITE) +dir.map: xslt/dirmap.xslt xml/en/docs/dirindex.xml + @xsltproc -o - xslt/dirmap.xslt xml/en/docs/dirindex.xml | \ + sort -u -k1,1 | sed 's/^include /\\&/' > $@ + +ifeq ($(patsubst %.nginx.org,YES,$(shell hostname)), YES) +all: dir.map +endif + .DELETE_ON_ERROR: diff -r 0412333658fe -r fbba1f292dc9 xsls/dirmap.xsls --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xsls/dirmap.xsls Tue Feb 28 08:06:22 2012 +0000 @@ -0,0 +1,18 @@ +X:stylesheet { + +X:output method="text"; + +X:template = "link" { + !{@id} + X:text{ } + !{substring-before(@doc, '.xml')} + X:text{.html#} + !{@id} + X:text{; } +} + +X:template = "links" { + !! "link"; +} + +}