php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44316 A PHP Object can not be converted to a XPath-string in XSLTProcessor::transform
Submitted: 2008-03-03 08:24 UTC Modified: 2008-03-03 12:28 UTC
From: undefined at users dot berlios dot de Assigned:
Status: Closed Package: XSLT related
PHP Version: 5.2.5 OS: GNU/Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: undefined at users dot berlios dot de
New email:
PHP Version: OS:

 

 [2008-03-03 08:24 UTC] undefined at users dot berlios dot de
Description:
------------
This Error Message is invalid. The Function becomes a DomDocument 
from my Class DomBuilder  method getDom()
[CODE]
   /** Parse Validate XML and returns the DomDocument.
   * @return \b DomDocument
   */
   public function getDom()
   {
      $dom = new DomDocument( "1.0", "utf-8" );
      $dom->validateOnParse = true;
      $dom->loadXml( $this->saveXML(), LIBXML_DTDVALID );
      return $dom;
   }
[/CODE]

This Problem comes up with the Implantation of mysqli Extension.
Before the mysqli Extension was inserted to my Code  the Script 100% 
works.

~> rpm -q libxml2 libxslt
libxml2-2.6.27-2007209
libxslt-1.1.20-2007209


Reproduce code:
---------------
function hjcms_transform_template( DOMDocument $doc, $Template )
{
   $tpl = $_SERVER['DOCUMENT_ROOT'] . "/tpl/" . $Template . "/index.xslt";
   if( is_readable( $tpl ) )
   {
      $style = new DOMDocument("1.0", "utf-8");
      $style->load( $tpl );

      $xslt = new XSLTProcessor;
      $xslt->registerPHPFunctions();
      $xslt->importStyleSheet( $style );
      return $xslt->transformToDoc( $doc );
   }
   return $doc;
}


Expected result:
----------------
Warning: XSLTProcessor::transformToDoc() 
[http://www.php.net/manual/de/function.XSLTProcessor-transformToDoc.php]: 
A PHP Object can not be converted to a XPath-string in 
$HOME/hjcms/website/src/hjcms_templates.php on line 36



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-03 08:32 UTC] chregu@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2008-03-03 12:28 UTC] undefined at users dot berlios dot de
no time no comment
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 11:01:34 2025 UTC