hi.
it seems as if this is no install-error, but your xml/xsl is not valid or
has some conflicts with how the php-extensions except the code to be. couple
of things changed (specially in the xslt-extension). try error-traping
first. maybe this helps:
// define error-traping-function
function xslt_trap_error($parser, $number, $level, $messages) {
if(is_array($messages)) {
$data = array();
foreach ($messages as $key => $value) {
$data[$key] = $value;
}
echo sprintf("%s in %s on line %d", $data['msg'], $data['URI'],
$data['line']);
} else {
echo $messages;
}
}
// create xslt-processor
$xProc = xslt_create();
// set error handler
xslt_set_error_handler($xProc, 'xslt_trap_error');
// define $args and $params as you're used to it
// ...
// do transforming
$out = @xslt_process($xProc, 'arg:/_xml', 'arg:/_xsl', null, $args,
$params);
if($out) {
return $out;
} else {
echo '<h2>Error using sablotron</h2>'.$this->debug();
trigger_error('parsing did not work: <pre>'.xslt_error($xProc),
E_USER_ERROR);
}
there is also another alternative: as it seems from your script you do not
need xsl-parameters. so you can alternatively use expat (which is used by
the DomXML-extension) as parser instead of sablotron (which is used by the
xslt-extension).
hth
- ma
# life would be easier if i knew the source code...
> Von: �B� ���th�ѽ <[EMAIL PROTECTED]>
> Antworten an: [EMAIL PROTECTED]
> Datum: Tue, 13 Apr 2004 11:50:57 -0700
> An: [EMAIL PROTECTED]
> Betreff: [PHP-INSTALL] xslt_process
>
> I'm trying to use Sablotron to server-side parse my XML. I've used an RPM
> of php 4.3.4 on RH9. I'm using also Plesk 6, a virtual hosting environment.
>
> After installing this RPM, I run the www.domain.com/phpfile.php?x=file.xml
>
> and I get the warning XML parser error 3: no element found in ......... on
> line 85
>
> My line 85 says:
>
> xslt_process($this->processor, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments)
>
> so I assume xslt_process is the problem (don't know why, worked in php 4
> .3.3). All different XML & XSL files cause the same error. I would really
> appreciate it if someone could give me some pointers on a workaround for
> this, I'm desperate!!
>
> THANKS!!!!!!!!!!!!!
>
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.657 / Virus Database: 422 - Release Date: 4/13/2004
>