view translate.pl @ 3:36ae3ec94442

xslt: prepare taskjuggler tasks structure
author cin
date Mon, 24 Aug 2015 10:16:41 +0300
parents d1400de5832b
children d2efec56373f
line wrap: on
line source

#!/usr/bin/perl -w

our @ClassPath = qw(
  /usr/share/java/xalan-j2-serializer.jar
  /usr/share/java/xalan-j2.jar
  /usr/share/java/xerces-j2.jar
  /usr/share/java/xml-commons-resolver.jar
  .
);

xalan(
	-IN          => "bug-list1.xml",
	-XSL         => "bug-list.xsl",
	-URIRESOLVER => "org.apache.xml.resolver.tools.CatalogResolver",
	-ENTITYRESOLVER => "org.apache.xml.resolver.tools.CatalogResolver"
);

sub xalan {
	my %params = @_;
	return system 'java',
	  -cp => join( ':', @ClassPath ),
	  "org.apache.xalan.xslt.Process", %params;
}

__END__

=pod

=head1 NAME

C<translate.pl> - translates bugzilla xml buglist to TaskJuggler format

=head1 METHODS

=head2 xalan(%args)

=over

=item * -IN

Input file

=item * -OUT

Output file

=item * -XSL

XSLT file

=back

=cut