Есть скрипт:| Код | #!C:/Perl/bin/perl.exe -w
use diagnostics; use strict;
use XML::XSLT;
my $path = "D:/winnet/task/"; my $xslfile = $path."steps/11.xsl"; my $xmlfile = $path."data.xml";
if (!-e $xslfile) { print "XSL file $xslfile does not exist!\n"; } if (!-e $xmlfile) { print "XML file $xmlfile does not exist~\n"; }
my $parser = XML::XSLT->new ($xslfile, "FILE", use_deprecated => 1);
$parser->transform_document ($xmlfile, "FILE"); #$parser->print_result;
#$parser->dispose ();
|
при запуске выдает вот такой еррор:
| Код | Unrecognized escape \d passed through at c:/Perl/site/lib/XML/DOM.pm line 136. Argument syntax of call to XML::XSLT::new deprecated. See the documentation for XML::XSLT::new at D:\winnet\task\steps\step3.pl line 19 Use of uninitialized value in subroutine entry at c:/Perl/site/lib/XML/Parser/Expat.pm line 444 (#1) (W uninitialized) An undefined value was used as if it were already defined. It was interpreted as a "" or a 0, but maybe it was a mistake. To suppress this warning assign a defined value to your variables.
To help you figure out what was undefined, perl tells you what operation you used the undefined value in. Note, however, that perl optimizes your program and the operation displayed in the warning may not necessarily appear literally in your program. For example, "that $foo" is usually optimized into "that " . $foo, and the warning will refer to the concatenation (.) operator, even though there is no . in your program.
Can't call method "getNextSibling" on an undefined value at c:/Perl/site/lib/XML/XSLT.pm line 484 (#2) (F) You used the syntax of a method call, but the slot filled by the object reference or package name contains an undefined value. Something like this will reproduce the error:
$BADREF = undef; process $BADREF 1,2,3; $BADREF->process(1,2,3);
Uncaught exception from user code: Can't call method "getNextSibling" on an undefined value at c:/Perl/site /lib/XML/XSLT.pm line 484. XML::XSLT::__get_first_element('XML::XSLT=HASH(0x183f0a8)') called at c: /Perl/site/lib/XML/XSLT.pm line 413 XML::XSLT::__preprocess_stylesheet('XML::XSLT=HASH(0x183f0a8)') called a t c:/Perl/site/lib/XML/XSLT.pm line 312 XML::XSLT::open_xsl('XML::XSLT=HASH(0x183f0a8)', 'use_deprecated', 1, 'S ource', 'D:/winnet/task/steps/11.xsl') called at c:/Perl/site/lib/XML/XSLT.pm li ne 102 XML::XSLT::new('XML::XSLT', 'D:/winnet/task/steps/11.xsl', 'FILE', 'use_ deprecated', 1) called at D:\winnet\task\steps\step3.pl line 19 |
Первоначально думал на xls, но пробывал разные одно и тоже Подскажите в чем может быть проблема |