0
|
1 #!/usr/bin/perl -w
|
|
2
|
1
|
3 our @ClassPath = qw(
|
|
4 /usr/share/java/xalan-j2-serializer.jar
|
|
5 /usr/share/java/xalan-j2.jar
|
|
6 /usr/share/java/xerces-j2.jar
|
|
7 /usr/share/java/xml-commons-resolver.jar
|
|
8 .
|
|
9 );
|
|
10
|
|
11 xalan(
|
|
12 -IN => "bug-list1.xml",
|
|
13 -XSL => "bug-list.xsl",
|
|
14 -URIRESOLVER => "org.apache.xml.resolver.tools.CatalogResolver",
|
|
15 -ENTITYRESOLVER => "org.apache.xml.resolver.tools.CatalogResolver"
|
|
16 );
|
0
|
17
|
|
18 sub xalan {
|
|
19 my %params = @_;
|
1
|
20 return system 'java',
|
|
21 -cp => join( ':', @ClassPath ),
|
|
22 "org.apache.xalan.xslt.Process", %params;
|
0
|
23 }
|
|
24
|
|
25 __END__
|
|
26
|
|
27 =pod
|
|
28
|
|
29 =head1 NAME
|
|
30
|
|
31 C<translate.pl> - translates bugzilla xml buglist to TaskJuggler format
|
|
32
|
|
33 =head1 METHODS
|
|
34
|
|
35 =head2 xalan(%args)
|
|
36
|
|
37 =over
|
|
38
|
|
39 =item * -IN
|
|
40
|
|
41 Input file
|
|
42
|
|
43 =item * -OUT
|
|
44
|
|
45 Output file
|
|
46
|
|
47 =item * -XSL
|
|
48
|
|
49 XSLT file
|
|
50
|
|
51 =back
|
|
52
|
1
|
53 =cut
|