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	Thu Feb 27 18:12:20 2014 +0400
+++ b/GNUmakefile	Fri Feb 21 20:15:37 2014 +0400
@@ -5,19 +5,13 @@
 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 @@
 # 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, $<, $@)
 
--- a/xsls/dump.xsls	Thu Feb 27 18:12:20 2014 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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="'&#xA;'") = "*" {
-        !{$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(.)='']" {}
--->
-
-}