This is my first post on Perl Monks. Basically, my problem is with the XML::XSLT perl module. I have the following code:
print "Content-type: text/html\n\n";
open (XSL, "blog.xsl");
my $xslFile = "";
$xslFile .= $_;
#my $xslFile = get("blog.xsl") || die qq(No feed "blog.xsl": $!);
my $xslt = XML::XSLT->new ($xslFile); #, warnings => 1, debug => 1) or
+ die qq(Something Happened);
my $xmlFile = "";
open (XML, "posts.xml");
$xmlFile .= $_;
#print $xslt->serve $xmlFile;
Which produces the following error when run:
no element found at line 1, column 0, byte -1 at /usr/lib/perl5/vendor_perl/5.8.6/i686-linux/XML/Parser.pm line 187
I have tried everything. The contents of the $xmlFile and $xslFile are all there (ie: there isn't a problem filling these vars with content). Processing these two files with Xalan takes less than a second and produces exactly what I want. The reason I can't use Xalan is because my web host only has XML::XSLT available.
Thanks for the help.