Howdy all.

I am trying to use the new XSLT translation stuff in 4.1.1 with Win2k and
IIS running ISAPI.

When I try to run even the simplest example, I get the following error:

>>>>>>>>>>>>>
unknown encoding ''
62
<<<<<<<<<<<<<

I have tried specifying the encoding in both the XML and XSL files, and even
tried both "UTF-8" and "ISO-8859-1".

Has anyone seen this?  I am pretty much stuck and in need of at least a
suggestion.

Below are the following xml, xsl, and php source files I am using.

t1.xml >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

<Company>
        <Employee>
                <Name>
                        Mike
                </Name>
                <Email>
                        [EMAIL PROTECTED]
                </Email>
        </Employee>
</Company>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

t1.xsl >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

        <xsl:output method="html" encoding="UTF-8
                                         omit-xml-declaration="yes""/>

        <xsl:template match="/">
                <html>
                        <head>
                                <title>Mike's php xml test</title>
                        </head>
                        <body>
                                <xsl:apply-templates select="//Employee"/>
                        </body>
                </html>
        </xsl:template>

        <xsl:template match="Employee">
                <xsl:apply-templates select="Email"/>
        </xsl:template>

        <xsl:template match="Email">
                <xsl:value-of select="."/>
        </xsl:template>

</xsl:stylesheet>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

t1.php >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

<?php
    $xsl_parser = xslt_create();

        $xmlf="c:\\t1.xml";
        $xslf="c:\\t1.xsl";
        $outf="c:\\out.html";

        if(is_file($xmlf)){
                print("XML Exists<BR>\n");
        }
        if(is_file($xslf)){
                print("XSL Exists<BR>\n");
        }

    $result = xslt_process($xsl_parser,$xmlf,$xslf,$outf);

    if ($result)
    {
        echo "$result";
    }
        else
    {
        $err1 = xslt_error($xsl_parser);
        $err2 = xslt_errno($xsl_parser);
        echo "<BR><BR><B>Bummer.</B> <br><br><br>";
        echo "$err1 <br>";
        echo "$err2 <br>";
    }

    xslt_free($xsl_parser);
?>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

I robbed some of my test code from the example Christian posted
a couple days ago.  Thanks Christian.


// Mike Eynon
// www.MikeEynon.com
// 1366 Bulb Ave
// Santa Cruz, CA  95062
// [EMAIL PROTECTED]
// 831.588.2388 (cell)


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

Reply via email to