Mercurial > hg > nginx-site
changeset 1084:be1d72ba7e5f
Switched from java XSLScript to xslscript.pl.
Latter is available from http://hg.nginx.org/xslscript.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 21 Feb 2014 20:15:37 +0400 |
parents | 2c57830e0149 |
children | c454373427ef |
files | GNUmakefile xsls/dump.xsls |
diffstat | 2 files changed, 3 insertions(+), 44 deletions(-) [+] |
line wrap: on
line diff
--- a/GNUmakefile +++ b/GNUmakefile @@ -5,19 +5,13 @@ ZIP = gzip NGINX_ORG = /data/www/nginx.org SHELL = ./umasked.sh -CP = /data/sites/java/xsls/\*:$(HOME)/java/xsls/\* +XSLS ?= xslscript.pl RSYNC = rsync -v -rpc CHMOD = /bin/chmod -R g=u define XSLScript - java -cp $(CP) \ - com.pault.StyleSheet \ - -x com.pault.XX -y com.pault.XX \ - $(1) xsls/dump.xsls \ - | sed 's/ *$$//;/^ *$$/N;/\n *$$/D' > $(2) - - if [ ! -s $(2) ]; then rm $(2); fi; test -s $(2) + $(XSLS) -o $(2) $(1) endef define XSLT @@ -160,8 +154,7 @@ endef # Prevent intermediate .xslt files from being removed. $(patsubst xsls/%.xsls,xslt/%.xslt,$(wildcard xsls/*.xsls)): -xslt/%.xslt: xsls/%.xsls \ - xsls/dump.xsls +xslt/%.xslt: xsls/%.xsls mkdir -p $(dir $@) $(call XSLScript, $<, $@)
deleted file mode 100644 --- a/xsls/dump.xsls +++ /dev/null @@ -1,34 +0,0 @@ -<!-- - Copyright (C) Igor Sysoev - Copyright (C) Nginx, Inc. - --> - -X:stylesheet { - -X:output method="xml" -X:param indent-increment="' '"; - -X:template noname(indent="'
'") = "*" { - !{$indent} - - X:if "name()='xsl:template'" { - !{$indent} - } - - X:copy { - X:copy-of "@*" - !!( indent = "concat($indent, $indent-increment)" ); - X:if "./* " { !{$indent} } - } -} - - -X:template = "comment()|processing-instruction()" { - X:copy; -} - -<!-- -X:template ="text()[normalize-space(.)='']" {} ---> - -}