Perl -v
This is perl, v5.8.8 built for darwin-thread-multi-2level Copyright 1987-2006, Larry Wall....
####
uname -a
Darwin machine-maci 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu3248.30.4~1/RELEASE_X86_64 x86_64
##
##
Article:-
Authors:-
always Generate this output!!
##
##
My Article
Mr. Foo
Mr. Bar
This is my article text.
##
##
#!/usr/local/bin/perl -w
use strict;
use warnings;
use File::Path;
use File::Spec;
use File::Basename;
use XML::LibXSLT;
use XML::LibXML;
my $isfile;
my ($xmlfile,$xsltfile,$samplefile) = qw/ Example.xml trans.xsl sample.xml/;
if(-f $samplefile)
{
$isfile = "true";
print "File is present\n";
}
else
{
$isfile = "false";
print "File is absent\n";
}
my %args = ( "isfile" => $isfile );
my $xslt = XML::LibXSLT->new;
my $stylesheet = $xslt->parse_stylesheet_file($xsltfile);
my $results =
$stylesheet->transform_file($xmlfile,XML::LibXSLT::xpath_to_string(%{args}));
0;
##
##
xmlXPathCompOpEval: function year not found
Unregistered function
xmlXPathCompiledEval: evaluation failed
runtime error: file trans.xsl line 24 element value-of
XPath evaluation returned no result.