Bug #15845 Updated: xslt_process() errors...

2002-03-03 Thread cmk

 ID:   15845
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Sablotron XSL
 Operating System: Linux
 PHP Version:  4.0.6
 New Comment:

The new extension for xslt processing is called ext/xslt and was
released first with PHP 4.1.0

You have to ask around if someone can send you an old version of the
documentation or check it out via cvs.

And yes, xslt_process won't take a handle as an argument, but you
already found that out.


Previous Comments:


[2002-03-03 14:42:03] [EMAIL PROTECTED]

when you say "does not need a handle" you wanna say "won't take one",
right?
and... what version of php uses the new ext/sablot, if this is the
old?
is the old version documented somewhere? could not find anything...

jj



[2002-03-03 13:27:54] [EMAIL PROTECTED]

This is not a bug. It is intended to work that way.

You are using the old ext/sablot and there xslt_process does not need a
sablotron processor handle.

Please ask further questions on php-general.



[2002-03-03 11:08:45] [EMAIL PROTECTED]

I tried to do some transformations using sablotron and
the PHP xslt functions.

After running into troubles from the first moment, I tried
some example scripts, but all of them won't work.

To get an idea of what i did i will post the xml-file content, the
xsl-file content and the script...


THE XSL FILE
--

http://www.w3.org/1999/XSL/Transform";>

  
  

  
Title
Artist
  
  
  


  
  

  
  


--

THE XML FILE
--


  
Empire Burlesque
Bob Dylan
USA
Columbia
10.90
1985
  

--

THE SCRIP (taken from the php-online-documentation for
xslt_process())
--
 $xml,
 '/_xsl' => $xsl
);
// Allocate a new XSLT processor
$xh = xslt_create();
// Process the document
$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL,
$arguments); 
if ($result) {
print "\n";
print $result;
print "\n";
}
else {
print xslt_error($xh); 
print xslt_errno($xh);
}
xslt_free($xh);
?>
--


THE PROBLEM
**

Running the script produces the following error:
"Only variables can be passed by reference"


So i tried the following:

...
$result = xslt_process($xh,$xml,$xsl,NULL,$output);
echo $output;
...

Running the script with this xslt_process line produces
the following error:

"Wrong parameter count for xslt_process()"



So i changed the thing again and again and again until i
got a call of xslt_process which worked:

...
$result = xslt_process($xsl,$xml,$output);
echo $output;
...

As you can see, i DO NOT pass the reference to the created processor
($xh), and i also did not pass the other stuff, and !! the ORDER OF
$xsl and $xml WAS CHANGED.

This works! But why???

It even works, if i don't use xslt_create() function.
Why is that???

The whole xslt_ stuff seems to be a bit tricky...

**






ADDITIONAL INFORMATION
==
PHP Version 4.0.6
--
Linux Kernel 2.4.16
--'./configure'
'--with-apxs=/usr/local/apache/bin/apxs'
'--with-mysql=/usr/local/mysql' '--enable-track-vars'
'--enable-sysvsem' '--disable-debug' '--enable-ftp' '--enable-bcmath'
'--with-gd' '--with-jpeg-dir' '--with-png-dir=/usr/lib'
'--with-zlib-dir=/usr/include' '--with-pdflib' '--with-ttf'
'--with-ming=/usr/src/ming-0.2a' '--with-imap=/usr/src/imap-4.7c'
'--with-swf=/usr/src/dist' '--with-dom' '--with-curl' '--with-sablot'
'--enable-memory-limit'
--
NO INFORMATION ABOUT SABLOTRON AVAILABLE, BUT SABLTRON
HAS BEEN INSTALLED BY THE PROVIDER ON MY REQUEST, SO I
THINK IT SHOULD BE THE LATEST VERSION
==




-- 
Edit this bug report at http://bugs.php.net/?id=15845&edit=1




Bug #15845 Updated: xslt_process() errors...

2002-03-03 Thread jessenig

 ID:   15845
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: Sablotron XSL
 Operating System: Linux
 PHP Version:  4.0.6
 New Comment:

when you say "does not need a handle" you wanna say "won't take one",
right?
and... what version of php uses the new ext/sablot, if this is the
old?
is the old version documented somewhere? could not find anything...

jj


Previous Comments:


[2002-03-03 13:27:54] [EMAIL PROTECTED]

This is not a bug. It is intended to work that way.

You are using the old ext/sablot and there xslt_process does not need a
sablotron processor handle.

Please ask further questions on php-general.



[2002-03-03 11:08:45] [EMAIL PROTECTED]

I tried to do some transformations using sablotron and
the PHP xslt functions.

After running into troubles from the first moment, I tried
some example scripts, but all of them won't work.

To get an idea of what i did i will post the xml-file content, the
xsl-file content and the script...


THE XSL FILE
--

http://www.w3.org/1999/XSL/Transform";>

  
  

  
Title
Artist
  
  
  


  
  

  
  


--

THE XML FILE
--


  
Empire Burlesque
Bob Dylan
USA
Columbia
10.90
1985
  

--

THE SCRIP (taken from the php-online-documentation for
xslt_process())
--
 $xml,
 '/_xsl' => $xsl
);
// Allocate a new XSLT processor
$xh = xslt_create();
// Process the document
$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL,
$arguments); 
if ($result) {
print "\n";
print $result;
print "\n";
}
else {
print xslt_error($xh); 
print xslt_errno($xh);
}
xslt_free($xh);
?>
--


THE PROBLEM
**

Running the script produces the following error:
"Only variables can be passed by reference"


So i tried the following:

...
$result = xslt_process($xh,$xml,$xsl,NULL,$output);
echo $output;
...

Running the script with this xslt_process line produces
the following error:

"Wrong parameter count for xslt_process()"



So i changed the thing again and again and again until i
got a call of xslt_process which worked:

...
$result = xslt_process($xsl,$xml,$output);
echo $output;
...

As you can see, i DO NOT pass the reference to the created processor
($xh), and i also did not pass the other stuff, and !! the ORDER OF
$xsl and $xml WAS CHANGED.

This works! But why???

It even works, if i don't use xslt_create() function.
Why is that???

The whole xslt_ stuff seems to be a bit tricky...

**






ADDITIONAL INFORMATION
==
PHP Version 4.0.6
--
Linux Kernel 2.4.16
--'./configure'
'--with-apxs=/usr/local/apache/bin/apxs'
'--with-mysql=/usr/local/mysql' '--enable-track-vars'
'--enable-sysvsem' '--disable-debug' '--enable-ftp' '--enable-bcmath'
'--with-gd' '--with-jpeg-dir' '--with-png-dir=/usr/lib'
'--with-zlib-dir=/usr/include' '--with-pdflib' '--with-ttf'
'--with-ming=/usr/src/ming-0.2a' '--with-imap=/usr/src/imap-4.7c'
'--with-swf=/usr/src/dist' '--with-dom' '--with-curl' '--with-sablot'
'--enable-memory-limit'
--
NO INFORMATION ABOUT SABLOTRON AVAILABLE, BUT SABLTRON
HAS BEEN INSTALLED BY THE PROVIDER ON MY REQUEST, SO I
THINK IT SHOULD BE THE LATEST VERSION
==




-- 
Edit this bug report at http://bugs.php.net/?id=15845&edit=1




Bug #15845 Updated: xslt_process() errors...

2002-03-03 Thread cmk

 ID:   15845
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: Sablotron XSL
 Operating System: Linux
 PHP Version:  4.0.6
 New Comment:

This is not a bug. It is intended to work that way.

You are using the old ext/sablot and there xslt_process does not need a
sablotron processor handle.

Please ask further questions on php-general.


Previous Comments:


[2002-03-03 11:08:45] [EMAIL PROTECTED]

I tried to do some transformations using sablotron and
the PHP xslt functions.

After running into troubles from the first moment, I tried
some example scripts, but all of them won't work.

To get an idea of what i did i will post the xml-file content, the
xsl-file content and the script...


THE XSL FILE
--

http://www.w3.org/1999/XSL/Transform";>

  
  

  
Title
Artist
  
  
  


  
  

  
  


--

THE XML FILE
--


  
Empire Burlesque
Bob Dylan
USA
Columbia
10.90
1985
  

--

THE SCRIP (taken from the php-online-documentation for
xslt_process())
--
 $xml,
 '/_xsl' => $xsl
);
// Allocate a new XSLT processor
$xh = xslt_create();
// Process the document
$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL,
$arguments); 
if ($result) {
print "\n";
print $result;
print "\n";
}
else {
print xslt_error($xh); 
print xslt_errno($xh);
}
xslt_free($xh);
?>
--


THE PROBLEM
**

Running the script produces the following error:
"Only variables can be passed by reference"


So i tried the following:

...
$result = xslt_process($xh,$xml,$xsl,NULL,$output);
echo $output;
...

Running the script with this xslt_process line produces
the following error:

"Wrong parameter count for xslt_process()"



So i changed the thing again and again and again until i
got a call of xslt_process which worked:

...
$result = xslt_process($xsl,$xml,$output);
echo $output;
...

As you can see, i DO NOT pass the reference to the created processor
($xh), and i also did not pass the other stuff, and !! the ORDER OF
$xsl and $xml WAS CHANGED.

This works! But why???

It even works, if i don't use xslt_create() function.
Why is that???

The whole xslt_ stuff seems to be a bit tricky...

**






ADDITIONAL INFORMATION
==
PHP Version 4.0.6
--
Linux Kernel 2.4.16
--'./configure'
'--with-apxs=/usr/local/apache/bin/apxs'
'--with-mysql=/usr/local/mysql' '--enable-track-vars'
'--enable-sysvsem' '--disable-debug' '--enable-ftp' '--enable-bcmath'
'--with-gd' '--with-jpeg-dir' '--with-png-dir=/usr/lib'
'--with-zlib-dir=/usr/include' '--with-pdflib' '--with-ttf'
'--with-ming=/usr/src/ming-0.2a' '--with-imap=/usr/src/imap-4.7c'
'--with-swf=/usr/src/dist' '--with-dom' '--with-curl' '--with-sablot'
'--enable-memory-limit'
--
NO INFORMATION ABOUT SABLOTRON AVAILABLE, BUT SABLTRON
HAS BEEN INSTALLED BY THE PROVIDER ON MY REQUEST, SO I
THINK IT SHOULD BE THE LATEST VERSION
==




-- 
Edit this bug report at http://bugs.php.net/?id=15845&edit=1