[support] Using XSLT in Drupal

Kim, Soonho (IFPRI) SOONHO.KIM at cgiar.org
Tue Oct 23 22:28:07 UTC 2012


Hi, I am trying to run the following code in Drupal to update local view theme.


// get the iso3 code
$ISO3 = $data->node_data_field_country_iso_code_field_country_iso_code_valu;

// read the xslt file

$themePath = path_to_theme();
$filePath = $themePath.'/xslt/GHI_en.xslt';
print $filePath;
  $xsl = new DOMDocument();

  $xsl->load($filePath);

  $xslt = new XSLTProcessor();
  $xslt->importStyleSheet($xsl);
   $xslt->setParameter( '', 'ISO3',$ISO3);
  $xml = new DOMDocument();
  $xml->load('http:/data.ifpri.org/lod/ghi.rdf');
  print (string) $xslt->transformToXML($xml);
 print $data->node_data_field_country_iso_code_field_country_iso_code_valu;

However, I keep getting the error message saying :

Fatal error: Class 'XSLTProcessor' not found in

I installed php-xml and php-xslt extension. You can find my php info () here --> http://www.hyalina.com/country/SDN
I also update the php.ini file to enable php-xslt and php-xml and restart the server.

I guess that I did something wrong.

Could you help me to find what step I was wrong?

Thanks so much for your support!

Best,
Soonho


From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On Behalf Of Jeff Greenberg
Sent: Tuesday, October 23, 2012 8:48 AM
To: support at drupal.org
Subject: Re: [support] Trouble with block boxes

You're right. It is not. Hmmm, is there a known issue of the conversion of isam->innodb losing autonum?
On Tue, Oct 23, 2012 at 8:33 AM, Richard Damon <Richard at damon-family.org<mailto:Richard at damon-family.org>> wrote:
The fields probably aren't defined as being an "auto-increment" field in the actual database schema. Auto-increment fields automatically assign 0 values to the next number in sequence.



--

Richard Damon

--
[ Drupal support list | http://lists.drupal.org/ ]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20121023/076e2f61/attachment-0001.html 


More information about the support mailing list