Re: Re: XSLTProcessor help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message ----

From: Colin Guthrie <gmane@xxxxxxxxxxxxxx>
Sent: Wednesday, 18 February, 2009 3:40:41 AM

'Twas brillig, and Tom Sparks at 17/02/09 15:17 did gyre and gimble:
> I have stopped XSLT from rendering out all the text
> but I am no further a long getting XSL stylescript  to work
> I have been reading w3schools (http://www.w3schools.com/xsl/default.asp )
> and XML 1.1 bible 3rd edition ( http://www.amazon.com/XML-Bible-Elliotte-Rusty-Harold/dp/0764549863 )
> I am at a lost still!!

>It looks more or less OK to me...

>Infact I tried it via the command line:

>My XML:
><?xml version="1.0" ?>
><vehicle><meta><title>Hellooooooo</title></meta></vehicle>


>The XSL is yours from the previous post:

>$ xsltproc test.xsl test.xml

><html>
><head>
><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
><title>vehicle: Hellooooooo</title>
></head>
><body><pre>
>vehicle: Hellooooooo</pre></body>
></html>

>Works fine.

>Are you sure you are not doing something odd in the calling code? e.g. make sure you are calling transformToXML() properly. Perhaps slap all your files >somewhere so we can download and test for you.
I have no where to put it yet, it is also a semi-private

i am using XAMPP for windows specs
 + Apache 2.2.11
  + MySQL 5.1.30 (Community Server)
  + PHP 5.2.8 + PEAR (Support for PHP 4 has been discontinued)
  + PHP-Switch win32 1.0 (use "php-switch.bat" in the xampp main directory) 
  + XAMPP Control Version 2.5 from www.nat32.com    
  + XAMPP Security 1.0    
  + SQLite 2.8.15
  + OpenSSL 0.9.8i
  + phpMyAdmin 3.1.1
  + ADOdb 4.990
  + Mercury Mail Transport System v4.52
  + FileZilla FTP Server 0.9.29
  + Webalizer 2.01-10
  + Zend Optimizer 3.3.0 
  + eAccelerator 0.9.5.3 für PHP 5.2.8 (but not activated in the php.ini)

I have also got domi.class.php (http://domi.sourceforge.net/ )
but is not needed with the comment sections
I am calling code by vehicle.php?id=1
there is a 1.xml in ./../vehicles/ from where the php file is

the code is bellow
-----------------cut here--------------------
<?php
include('domi.class.php');  

$id = $_GET['id'];

$DOMi = new DOMi('./../vehicles/'.$id.'.xml');
$DOMi->Render('./../xsl/vehicle.xsl');

//   $xslDoc = new DOMDocument();
//   $xslDoc->load("./../xsl/vehicle.xsl");

//   $xmlDoc = new DOMDocument();
//   $xmlDoc->load("./../vehicles/".$id.".xml");

//   $proc = new XSLTProcessor();
//   $proc->importStylesheet($xslDoc);
//   echo $proc->transformToXML($xmlDoc);

?>
------------cut here------------------------

 
tom_a_sparks

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html 


      Make Yahoo!7 your homepage and win a trip to the Quiksilver Pro. Find out more

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux