annotate translate.pl @ 3:36ae3ec94442

xslt: prepare taskjuggler tasks structure
author cin
date Mon, 24 Aug 2015 10:16:41 +0300
parents d1400de5832b
children d2efec56373f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
1 #!/usr/bin/perl -w
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
2
1
d1400de5832b improved xsl
cin
parents: 0
diff changeset
3 our @ClassPath = qw(
d1400de5832b improved xsl
cin
parents: 0
diff changeset
4 /usr/share/java/xalan-j2-serializer.jar
d1400de5832b improved xsl
cin
parents: 0
diff changeset
5 /usr/share/java/xalan-j2.jar
d1400de5832b improved xsl
cin
parents: 0
diff changeset
6 /usr/share/java/xerces-j2.jar
d1400de5832b improved xsl
cin
parents: 0
diff changeset
7 /usr/share/java/xml-commons-resolver.jar
d1400de5832b improved xsl
cin
parents: 0
diff changeset
8 .
d1400de5832b improved xsl
cin
parents: 0
diff changeset
9 );
d1400de5832b improved xsl
cin
parents: 0
diff changeset
10
d1400de5832b improved xsl
cin
parents: 0
diff changeset
11 xalan(
d1400de5832b improved xsl
cin
parents: 0
diff changeset
12 -IN => "bug-list1.xml",
d1400de5832b improved xsl
cin
parents: 0
diff changeset
13 -XSL => "bug-list.xsl",
d1400de5832b improved xsl
cin
parents: 0
diff changeset
14 -URIRESOLVER => "org.apache.xml.resolver.tools.CatalogResolver",
d1400de5832b improved xsl
cin
parents: 0
diff changeset
15 -ENTITYRESOLVER => "org.apache.xml.resolver.tools.CatalogResolver"
d1400de5832b improved xsl
cin
parents: 0
diff changeset
16 );
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
17
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
18 sub xalan {
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
19 my %params = @_;
1
d1400de5832b improved xsl
cin
parents: 0
diff changeset
20 return system 'java',
d1400de5832b improved xsl
cin
parents: 0
diff changeset
21 -cp => join( ':', @ClassPath ),
d1400de5832b improved xsl
cin
parents: 0
diff changeset
22 "org.apache.xalan.xslt.Process", %params;
0
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
23 }
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
24
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
25 __END__
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
26
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
27 =pod
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
28
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
29 =head1 NAME
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
30
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
31 C<translate.pl> - translates bugzilla xml buglist to TaskJuggler format
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
32
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
33 =head1 METHODS
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
34
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
35 =head2 xalan(%args)
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
36
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
37 =over
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
38
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
39 =item * -IN
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
40
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
41 Input file
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
42
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
43 =item * -OUT
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
44
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
45 Output file
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
46
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
47 =item * -XSL
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
48
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
49 XSLT file
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
50
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
51 =back
8cae44c166d3 initial xslt and sample xml
cin
parents:
diff changeset
52
1
d1400de5832b improved xsl
cin
parents: 0
diff changeset
53 =cut