From 57ead4c9806dbd3f32bc937bccc3be91972fd6d7 Mon Sep 17 00:00:00 2001 From: Ian Young Date: Fri, 24 Apr 2009 14:07:33 +0000 Subject: [PATCH] Scope-counting utility. --- build/count_scopes.pl | 12 ++++++++++++ build/extract_scopes.xsl | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100755 build/count_scopes.pl create mode 100644 build/extract_scopes.xsl diff --git a/build/count_scopes.pl b/build/count_scopes.pl new file mode 100755 index 00000000..a6e51405 --- /dev/null +++ b/build/count_scopes.pl @@ -0,0 +1,12 @@ +#!/usr/bin/perl -w + +open(XML,"java -cp ../xalan-j_2_6_0/bin/xalan.jar org.apache.xalan.xslt.Process -IN ../xml/ukfederation-metadata-unsigned.xml -XSL extract_scopes.xsl|") || die "could not open input file"; +while () { + # print $_; + chop; + my $scope = $_; + $scopes{$scope} = 1; +} +close XML; + +print scalar(keys(%scopes)), "\n"; diff --git a/build/extract_scopes.xsl b/build/extract_scopes.xsl new file mode 100644 index 00000000..7d4fd015 --- /dev/null +++ b/build/extract_scopes.xsl @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + +