# HG changeset patch # User Vladimir Homutov # Date 1397643771 -14400 # Node ID 8e8a6a7cff2baa1d8527e01675bc0d3afb3871e8 # Parent 07402a11fd8dc0b8583de1f1594570494dec1b3f Added variables index. diff --git a/GNUmakefile b/GNUmakefile --- a/GNUmakefile +++ b/GNUmakefile @@ -80,6 +80,7 @@ 404: $(OUT)/404.html DIRIND_DEPS = +VARIND_DEPS = define lang-specific @@ -113,12 +114,26 @@ xml/$(lang)/docs/dirindex.xml: \ sed 's;xml/[^/]*/docs/;;g' > $$@ endif +ifneq (,$$(filter varindex,$$(DOCS))) +VARIND_DEPS += xml/$(lang)/docs/varindex.xml +xml/$(lang)/docs/varindex.xml: \ + $$(foreach f,$$(REFS),xml/$(lang)/docs/$$(f).xml) \ + xslt/varindex.xslt + echo "$$(patsubst %, \ + , $$(filter %.xml,$$^))" | \ + xsltproc -o - --stringparam LANG $(lang) \ + xslt/varindex.xslt - | \ + sed 's;xml/[^/]*/docs/;;g' > $$@ +endif + endef $(foreach lang, $(LANGS), $(eval $(call lang-specific))) $(foreach lang, $(LANGS), $(OUT)/$(lang)/docs/dirindex.html): $(DIRIND_DEPS) +$(foreach lang, $(LANGS), $(OUT)/$(lang)/docs/varindex.html): $(VARIND_DEPS) + $(OUT)/index.html: \ xml/index.xml \ $(NEWS_DEPS) @@ -283,6 +298,7 @@ copy_dirmap: endif clean: - rm -rf $(ZIP) $(OUT) xml/*/docs/dirindex.xml dir.map + rm -rf $(ZIP) $(OUT) xml/*/docs/dirindex.xml dir.map \ + xml/*/docs/varindex.xml .DELETE_ON_ERROR: diff --git a/dtd/content.dtd b/dtd/content.dtd --- a/dtd/content.dtd +++ b/dtd/content.dtd @@ -10,7 +10,7 @@ name CDATA #IMPLIED > - + + + + + diff --git a/xml/i18n.xml b/xml/i18n.xml --- a/xml/i18n.xml +++ b/xml/i18n.xml @@ -19,6 +19,7 @@ This directive appeared in version This directive appeared in versions Alphabetical index of directives +Alphabetical index of variables This translation may be out of date. Check the English version for recent changes. @@ -36,6 +37,7 @@ for recent changes. Эта директива появилась в версии Эта директива появилась в версиях Алфавитный указатель директив +Алфавитный указатель переменных Этот перевод может быть устаревшим. Смотрите английскую версию для ознакомления с последними изменениями. diff --git a/xml/ru/GNUmakefile b/xml/ru/GNUmakefile --- a/xml/ru/GNUmakefile +++ b/xml/ru/GNUmakefile @@ -9,6 +9,7 @@ DOCS = \ control \ hash \ dirindex \ + varindex \ http/request_processing \ http/server_names \ http/configuring_https_servers \ diff --git a/xml/ru/docs/index.xml b/xml/ru/docs/index.xml --- a/xml/ru/docs/index.xml +++ b/xml/ru/docs/index.xml @@ -126,6 +126,10 @@ + + + + diff --git a/xsls/link.xsls b/xsls/link.xsls --- a/xsls/link.xsls +++ b/xsls/link.xsls @@ -57,4 +57,16 @@ X:template = "links" { } } +X:template = "varlinks" { + X:for-each "link", X:sort "@id" { + !!; + X:if "count(../link[@id = current()/@id and @doc != current()/@doc]) > 0" { + X:text{ (} + !{substring-before(substring-after(@doc, '/'), '.xml')} + X:text{)} + } +
+ } } + +} diff --git a/xsls/varindex.xsls b/xsls/varindex.xsls new file mode 100644 --- /dev/null +++ b/xsls/varindex.xsls @@ -0,0 +1,39 @@ + + +X:stylesheet { + +X:output method="xml" doctype-system="../../../dtd/article.dtd" encoding="utf-8"; + + +X:param XML = "'../xml'"; + +X:param LANG; + +X:template = "modules" { +
+
+ + + !! "module"; + + +
+
+} + +X:template = "module" { + X:var module="@name" + X:for-each "document(@name)//tag-name/var" { + !!; + } +} + +} diff --git a/xslt/link.xslt b/xslt/link.xslt --- a/xslt/link.xslt +++ b/xslt/link.xslt @@ -4,7 +4,7 @@ Copyright (C) Nginx, Inc. --> - + @@ -57,4 +57,16 @@ + + + + + ( + + ) + +
+
+
+