ID:               24296
 Updated by:       [EMAIL PROTECTED]
 Reported By:      andrew at shh dot fi
-Status:           Open
+Status:           Assigned
 Bug Type:         XSLT related
 Operating System: win32 and linux
 PHP Version:      4.3.2
-Assigned To:      
+Assigned To:      edink
 New Comment:

Edin, can you update the expat lib in the win32 stuff..?
Andrew, what version did you use?



Previous Comments:
------------------------------------------------------------------------

[2003-06-25 02:17:41] andrew at shh dot fi

Problem resolved!!

Upgrade the expat to the latest version and everything works

------------------------------------------------------------------------

[2003-06-24 01:25:05] andrew at shh dot fi

I found another person who had experienced similar problems on the
Gingerall.com site. He had attached an example file. The size is 277034
characters - rather large. This appears to fail. 

However, I have installed the latest Expat Release 1.95.6 update and it
seems to have worked - from a command line. The problem will now need
to be addressed in the PHP sablot.

Heres the xslt file:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
<xsl:output method="html" encoding="iso-8859-1" version="1.0"
indent="yes"/>
<xsl:param name="login"/>
<xsl:template match="navigation">
        <xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>

Heres the xml file1: test.xml

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE navigation [<!ENTITY module1 SYSTEM "test2.xml">]>
<navigation>&module1;</navigation>

And heres part of the external xml file: test2.xml

<?xml version="1.0" encoding="iso-8859-1"?>
<test>
<![CDATA[
textetxtetxtäåöåäö ... 276,946 Bytes ... ]]>
</test>

Well these are examples but in the real work I need to pass a huge xml
file with lots of data.

regards

------------------------------------------------------------------------

[2003-06-23 17:51:31] [EMAIL PROTECTED]

Could you at least aproximate the size of the xml file at which the
problems begins to occur?

------------------------------------------------------------------------

[2003-06-23 06:43:02] andrew at shh dot fi

Description:
------------
The setup is an xml document with several external entities including
xml files.

Using the standard xslt functions in php the problem begins when the
filesize exceed a limit (don't know what the size is unless I start
couting all the includes). By choopping out a number of lines from the
files the problem is OK.

Its not about structure as this works OK in MsXML plus other packages
like XML Spy. The problem is definately with the sablot/expat
somewhere.

I am not sure whether its a combination of entities and filesize or
just filesize.

What appears to be happening is some kind of cache that chops the end
off therefore giving an error 3 which is an no element found error.

Perhaps the problem is with expat? Any ideas?

Reproduce code:
---------------
<?

$xml = "file://".getcwd()."\\index.xml";
$xsl = "file://".getcwd()."\\text.xsl";

//create the processor
$my_xslt = xslt_create();

//process the file and echo the result
$result = xslt_process($my_xslt,$xml,$xsl);

if (!$result) {
        print "Error Number: ".xslt_errno($my_xslt);
        print xslt_error($my_xslt);
}

//free the processor
xslt_free($my_xslt);

print htmlspecialchars($result);


?>

Expected result:
----------------
A load of text ....

Actual result:
--------------
Warning: Sablotron error on line 293: XML parser error 3: no element
found in E:\projects\studybuilder\parse.php on line 12
Error Number: 2
XML parser error 3: no element found


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24296&edit=1

Reply via email to