|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-08-08 15:58 UTC] sitnikov at infonet dot ee
Description: ------------ b.xml ------------------------------------ <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="b.xsl"?> <test> </test> ------------------------------------ b.xsl ------------------------------------ <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/test"> <html> <head> <title>TEST</title> </head> <body bgcolor="blue" text="#000000"> <center>HELLO</center> </body> </html> </xsl:template> </xsl:stylesheet> ------------------------------------ b.php ------------------------------------ <? // Allocate a new XSLT processor $xh = xslt_create() or die('Can not do; xslt_create()'); xslt_set_log($xh, true); xslt_set_log($xh, '/tmp/sablot.log'); // Process the document if ($result = xslt_process($xh, './data/b.xml', './data/b.xsl')) { print "SUCCESS, test.xml was transformed by test.xsl into result.xml"; print ", result.xml has the following contents\n<br>\n"; print "<pre>\n"; echo $result; print "</pre>\n"; } else { print "Sorry, test.xml could not be transformed by test.xsl into"; print " result.xml the reason is that " . xslt_error($xh) . " and the "; print "error code is " . xslt_errno($xh); } xslt_free($xh); ?> -------------------------------------- Results: sabcmd: SUCCESS PHP 4.3.2: SUCCESS PHP 4.3.3RC3: ERROR (duplicate attribute and the error code is 2) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 03:00:01 2025 UTC |
Crashes for me with sablotron 0.96 and 4.3.3rc3, bt follows: #0 0x081f5eb5 in normal_nameLength (enc=0x1, ptr=0x400d7f70 "U\211?WVS\203?H?????\201??\005\a") at /dat/dev/php/php-4.3.3RC3/ext/xml/expat/xmltok_impl.c:1702 1702 switch (BYTE_TYPE(enc, ptr)) { (gdb) print enc $1 = (ENCODING *) 0x1 (gdb) bt #0 0x081f5eb5 in normal_nameLength (enc=0x1, ptr=0x400d7f70 "U\211?WVS\203?H?????\201??\005\a") at /dat/dev/php/php-4.3.3RC3/ext/xml/expat/xmltok_impl.c:1702 #1 0x401979a5 in reportProcessingInstruction () from /usr/lib/libexpat.so.0 #2 0x40196c82 in doProlog () from /usr/lib/libexpat.so.0 #3 0x40195634 in prologProcessor () from /usr/lib/libexpat.so.0 #4 0x40192e39 in XML_ParseBuffer () from /usr/lib/libexpat.so.0 #5 0x40192de6 in XML_Parse () from /usr/lib/libexpat.so.0 #6 0x400d5f48 in TreeConstructer::feedDocumentToParser () from /usr/lib/libsablot.so.0 #7 0x400d4dcf in TreeConstructer::parseDataLineUsingGivenExpat () from /usr/lib/libsablot.so.0 #8 0x400d503c in TreeConstructer::parseDataLineUsingExpat () from /usr/lib/libsablot.so.0 #9 0x400f5aeb in Tree::parse () from /usr/lib/libsablot.so.0 #10 0x400dbf27 in Processor::addLineParse () from /usr/lib/libsablot.so.0 #11 0x400dc64c in Processor::readTreeFromURI () from /usr/lib/libsablot.so.0 #12 0x400da14a in Processor::open () from /usr/lib/libsablot.so.0 #13 0x400e1317 in SablotRunProcessorGen () from /usr/lib/libsablot.so.0 #14 0x0820f169 in zif_xslt_process (ht=3, return_value=0x83c844c, this_ptr=0x0, return_value_used=1) at /dat/dev/php/php-4.3.3RC3/ext/xslt/sablot.c:590 #15 0x0825f17f in execute (op_array=0x83c774c) at /dat/dev/php/php-4.3.3RC3/Zend/zend_execute.c:1616 #16 0x0824efae in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /dat/dev/php/php-4.3.3RC3/Zend/zend.c:885 #17 0x0821d948 in php_execute_script (primary_file=0xbffff8f0) at /dat/dev/php/php-4.3.3RC3/main/main.c:1720 #18 0x0826d3bc in main (argc=2, argv=0xbffff994) at /dat/dev/php/php-4.3.3RC3/sapi/cli/php_cli.c:818 #19 0x407ad306 in __libc_start_main (main=0x826ca74 <main>, argc=2, ubp_av=0xbffff994, init=0x8080284 <_init>, fini=0x826db20 <_fini>, rtld_fini=0x4000d2dc <_dl_fini>, stack_end=0xbffff98c) at ../sysdeps/generic/libc-start.c:129