RE: [PHP] help with making an xslt class
| From: | Brian V Bonini | Date: | Wed, 11 Sep 2002 19:18:36 +0000 |
| Subject: | RE: [PHP] help with making an xslt class | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-116022@lists.php.net to get a copy of this message | ||
Isn't this what the salbatron library is for?
> -----Original Message-----
> From: Geoff [mailto:ghank@lawlead.com]
> Sent: Wednesday, September 11, 2002 2:52 PM
> To: php list
> Subject: [PHP] help with making an xslt class
>
>
> I am trying to make a class to process xslt transformations.
>
> Here is the class:
> class xslTransformer extends makexml {
> var $xh;
> function xslTransformer($xslfile) {
> $this->xh = xslt_create();
> $result=xslt_process($this->xh,$this->xmlstr,$xslfile);
> //errors if
> ($result) {
> print $result;
> }
> else {
> print "Sorry, the xml could not be transformed by the xsl
> into"; print
> " the \$result variable the reason is that . "xslt_error($this->xh) .
> print " and the error code is " . xslt_errno($this->xh);
> }
> xslt_free($this->xh);
> }
> }
>
> I call it as
>
> $this->xmlstr is valid xml (I have checked) the makexml class works fine
> as well.
>
> Here is the error I get:
> Warning: Sablotron error on line 1: XML parser error 3: no element found
> in /usr/lib/apache/htdocs/xml/clsmakexml.php on line 200
> Sorry, the xml could not be transformed by the xsl into and the error
> code is 2 the $result variable the reason is that XML parser error 3: no
> element found
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>