# HG changeset patch # User Ruslan Ermilov # Date 1350033031 0 # Node ID 81ad082bc837bac3e27ff72a03cf4ea308acbd12 # Parent 9934338f83af7ba9c684639c68e790fff0802559 Simplified things by including books.xslt, download.xslt and security.xslt into article.xslt, and always using article.xslt to generate HTMLs. While here, moved versions.xml from common dependencies to article dependencies. Fixed menu in 404.html by applying templates from menu.xslt, and fixed its dependency on DTD. diff -r 9934338f83af -r 81ad082bc837 GNUmakefile --- a/GNUmakefile Thu Oct 11 10:23:05 2012 +0000 +++ b/GNUmakefile Fri Oct 12 09:10:31 2012 +0000 @@ -46,7 +46,6 @@ COMMON_DEPS = \ xml/menu.xml \ - xml/versions.xml \ xml/i18n.xml \ dtd/content.dtd \ xslt/dirname.xslt \ @@ -59,11 +58,15 @@ ARTICLE_DEPS = \ $(COMMON_DEPS) \ + xml/versions.xml \ dtd/article.dtd \ dtd/module.dtd \ xslt/article.xslt \ + xslt/books.xslt \ + xslt/directive.xslt \ xslt/donate.xslt \ - xslt/directive.xslt \ + xslt/download.xslt \ + xslt/security.xslt \ xslt/versions.xslt \ NEWS_DEPS = \ @@ -71,21 +74,6 @@ dtd/news.dtd \ xslt/news.xslt \ -DOWNLOAD_DEPS = \ - $(COMMON_DEPS) \ - dtd/article.dtd \ - xslt/download.xslt \ - -SECURITY_DEPS = \ - $(COMMON_DEPS) \ - dtd/article.dtd \ - xslt/security.xslt \ - -BOOK_DEPS = \ - $(COMMON_DEPS) \ - dtd/article.dtd \ - xslt/books.xslt \ - LANGS = en ru cn he ja tr all: news arx 404 $(LANGS) @@ -120,10 +108,11 @@ $(OUT)/404.html: \ xml/404.xml \ xml/menu.xml \ - dtd/article.dtd \ - dtd/content.dtd \ - xslt/ga.xslt \ - xslt/error.xslt + dtd/error.dtd \ + xslt/error.xslt \ + xslt/dirname.xslt \ + xslt/menu.xslt \ + xslt/ga.xslt $(call XSLT, xslt/error.xslt, $<, $@) $(OUT)/%.html: xml/%.xml \ diff -r 9934338f83af -r 81ad082bc837 xml/en/GNUmakefile --- a/xml/en/GNUmakefile Thu Oct 11 10:23:05 2012 +0000 +++ b/xml/en/GNUmakefile Fri Oct 12 09:10:31 2012 +0000 @@ -100,16 +100,6 @@ $(OUT)/$(DOC_LANG)/support.html \ $(OUT)/$(DOC_LANG)/donation.html \ -$(OUT)/$(DOC_LANG)/download.html: \ - xml/$(DOC_LANG)/download.xml \ - $(DOWNLOAD_DEPS) - $(call XSLT, xslt/download.xslt, $<, $@) - -$(OUT)/$(DOC_LANG)/security_advisories.html: \ - xml/$(DOC_LANG)/security_advisories.xml \ - $(SECURITY_DEPS) - $(call XSLT, xslt/security.xslt, $<, $@) - $(OUT)/$(DOC_LANG)/docs/index.html: \ $(DOCS_XML) \ $(REFS_XML) \ @@ -126,8 +116,3 @@ $(OUT)/$(DOC_LANG)/docs/faq.html: \ $(FAQ_XML) \ - -$(OUT)/$(DOC_LANG)/books.html: \ - xml/$(DOC_LANG)/books.xml \ - $(BOOK_DEPS) - $(call XSLT, xslt/books.xslt, $<, $@) diff -r 9934338f83af -r 81ad082bc837 xml/ru/GNUmakefile --- a/xml/ru/GNUmakefile Thu Oct 11 10:23:05 2012 +0000 +++ b/xml/ru/GNUmakefile Fri Oct 12 09:10:31 2012 +0000 @@ -87,11 +87,6 @@ $(FAQ_HTML) \ $(OUT)/$(DOC_LANG)/support.html \ -$(OUT)/$(DOC_LANG)/download.html: \ - xml/$(DOC_LANG)/download.xml \ - $(DOWNLOAD_DEPS) - $(call XSLT, xslt/download.xslt, $<, $@) - $(OUT)/$(DOC_LANG)/docs/index.html: \ $(DOCS_XML) \ $(REFS_XML) \ diff -r 9934338f83af -r 81ad082bc837 xsls/article.xsls --- a/xsls/article.xsls Thu Oct 11 10:23:05 2012 +0000 +++ b/xsls/article.xsls Fri Oct 12 09:10:31 2012 +0000 @@ -26,10 +26,13 @@ X:include href = "style.xslt"; X:include href = "body.xslt"; X:include href = "menu.xslt"; -X:include href = "donate.xslt"; +X:include href = "ga.xslt"; +X:include href = "content.xslt"; +X:include href = "books.xslt"; X:include href = "directive.xslt"; -X:include href = "content.xslt"; -X:include href = "ga.xslt"; +X:include href = "donate.xslt"; +X:include href = "download.xslt"; +X:include href = "security.xslt"; X:include href = "versions.xslt"; diff -r 9934338f83af -r 81ad082bc837 xsls/books.xsls --- a/xsls/books.xsls Thu Oct 11 10:23:05 2012 +0000 +++ b/xsls/books.xsls Fri Oct 12 09:10:31 2012 +0000 @@ -5,45 +5,6 @@ X:stylesheet { -X:output method="html" version="4.0" indent="no" encoding="utf-8"; - -X:strip-space elements = "*"; - - -X:param XML = "'../xml'"; -X:param YEAR; - -X:var LINK = "/article/@link"; - -X:include href = "dirname.xslt"; -X:include href = "link.xslt"; -X:include href = "style.xslt"; -X:include href = "body.xslt"; -X:include href = "menu.xslt"; -X:include href = "ga.xslt"; -X:include href = "content.xslt"; - - -X:template = "/article" { - - - !{@name} - - !style (lang="@lang") - - !ga () - - - - !body (lang="@lang") - - -} - - X:template = "book" { diff -r 9934338f83af -r 81ad082bc837 xsls/download.xsls --- a/xsls/download.xsls Thu Oct 11 10:23:05 2012 +0000 +++ b/xsls/download.xsls Fri Oct 12 09:10:31 2012 +0000 @@ -5,46 +5,6 @@ X:stylesheet { -X:output method="html" version="4.0" indent="no" encoding="utf-8"; - -X:strip-space elements = "*"; - - -X:param XML = "'../xml'"; -X:param YEAR; - -X:var LINK = "/article/@link"; -X:var LANG = "/article/@lang"; - -X:include href = "dirname.xslt"; -X:include href = "link.xslt"; -X:include href = "style.xslt"; -X:include href = "body.xslt"; -X:include href = "menu.xslt"; -X:include href = "ga.xslt"; -X:include href = "content.xslt"; - - -X:template = "/article" { - - - !{@name} - - !style (lang="@lang") - - !ga () - - - - !body (lang="@lang") - - -} - - X:template = "download" {
!! "item";
} diff -r 9934338f83af -r 81ad082bc837 xsls/error.xsls --- a/xsls/error.xsls Thu Oct 11 10:23:05 2012 +0000 +++ b/xsls/error.xsls Fri Oct 12 09:10:31 2012 +0000 @@ -5,8 +5,6 @@ X:stylesheet { -X:include href = "ga.xslt"; - X:output method="html" version="4.0" indent="no" encoding="utf-8"; X:strip-space elements = "*"; @@ -16,6 +14,15 @@ -- but not where XSLT processor has been started to run the script --> X:param XML = "'../xml'"; +X:param YEAR; +X:param TRANS; + +X:var LINK = "/error/@link"; +X:var LANG = "/error/@lang"; + +X:include href = "dirname.xslt"; +X:include href = "menu.xslt"; +X:include href = "ga.xslt"; X:template = "/error" { @@ -49,14 +56,4 @@ } - -X:template = "menu/item" { - !{ normalize-space(text()) }
} - - -X:template = "menu/item[not(@href)]" { - !{ normalize-space(text()) }
-} - -} diff -r 9934338f83af -r 81ad082bc837 xsls/security.xsls --- a/xsls/security.xsls Thu Oct 11 10:23:05 2012 +0000 +++ b/xsls/security.xsls Fri Oct 12 09:10:31 2012 +0000 @@ -5,45 +5,6 @@ X:stylesheet { -X:output method="html" version="4.0" indent="no" encoding="utf-8"; - -X:strip-space elements = "*"; - - -X:param XML = "'../xml'"; -X:param YEAR; - -X:var LINK = "/article/@link"; - -X:include href = "dirname.xslt"; -X:include href = "link.xslt"; -X:include href = "style.xslt"; -X:include href = "body.xslt"; -X:include href = "menu.xslt"; -X:include href = "ga.xslt"; -X:include href = "content.xslt"; - - -X:template = "/article" { - - - !{@name} - - !style (lang="@lang") - - !ga () - - - - !body (lang="@lang") - - -} - - X:template = "security" { }