[PHP-DOC] #28452 [Opn-WFx]: XML documentation unclear
ID: 28452 Updated by: [EMAIL PROTECTED] Reported By: prof_moriarty at veryfast dot biz -Status: Open +Status: Wont fix Bug Type: Documentation problem Operating System: Win XP PHP Version: 5.0.0RC2 New Comment: There are at least 3 examples on http://php.net/manual/ en/ref.xml.php about how to parse an XML document with ext/xml. If that's not enough, there are tons of articles and books about XML and PHP. Google's your friend. Thanks for your time Previous Comments: [2004-05-20 07:55:11] prof_moriarty at veryfast dot biz changed category. wrong one. :/ [2004-05-20 07:54:30] prof_moriarty at veryfast dot biz Description: Forgive me for being obtuse, but i've been staring at the XML documentation for parsing XML files into PHP for what seems like rather too long, and i still havn't got the foggiest what is going on. I'm not a newbie to PHP (been deving with it for 3+ years), but i am new to XML. My problems seem to revolve around the fact that none of the examples are all that clear. There isn't a simple way to parse a file (xml_parse_into_struct is there, but the documentation doesn't actually say anything about what makes the parallel arrays parralel! (i.e. why there are 2 arrays rather than 1). Worst of all is xml_parse. It's not all that clear how to use this function. I know it parses stuff. However it's not made clear what is required for it to be succussful. If i just run: xml_create_parser(args); xml_parse(args); xml_free_parser(args); i get nothing. I doubt i'm supposed to just run those 3, however without being told what to run, what am i supposed to do try every combination of all the xml functions until i get something? :) And before you say it's just me, there are at least 2 comments on the ref-XML page that explicitly how unclear things are, as well as a few others that infer such things. I'll try explaining it another way: Many functions within SE (and hence explanations in the docs), are stand-alone. i.e They don't generally require other functions to work. array functions, string functions, maths functions etc, etc. However for things like XML, MySQL, File handling, dir handling etc, they are all interelated. i.e., i can't use mysql_query, without first using mysql_db_connect and then mysql_db_select. Generally the examples for these inter-related functions are clear, however, i've seen tar that is clearer than the explanations of how to use the XML functions together. :) -- Edit this bug report at http://bugs.php.net/?id=28452edit=1
[PHP-DOC] #20794 [Opn]: xsl:output not affecting output correctly
ID: 20794 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Documentation problem Operating System: Linux, FreeBSD PHP Version: 4.3.0RC2 New Comment: What's the problem with the solution I showed you? It should exactly give you the output expected from xsl:output method=html you don't have to insert output parameters from php. Although, you do need PHP4.3 ... chregu Previous Comments: [2002-12-03 15:03:25] [EMAIL PROTECTED] IMHO it is not so perfect to insert output parameters from application. However, the example you have given is working quite well and that's what I wanted to achieve. On the other hand I think users would appreciate having XSLT engine that is fully W3C compliant :) I'm not into internals of PHP so my question is - is it very difficult to make xsl:output working, or even - is it possible? :) [2002-12-03 12:04:01] [EMAIL PROTECTED] Let's make it a Doc problem then [2002-12-03 11:44:45] [EMAIL PROTECTED] Use $xsldoc = domxml_xslt_stylesheet_file($filename); $result = $xsldoc-process($xmldoc[,$params]); $xsldoc-result_dump_mem($result); (or $xsldoc-result_dump_file($result,$filename);) to get what you want. (undocument, AFAIK...) chregu [2002-12-03 11:34:58] [EMAIL PROTECTED] LibXML 2.4.28, LibXSLT 1.0.23 (both the most recent). xsl:output method=html/ is not working properly. The output should follow w3c rules (http://www.w3.org/TR/xslt#section-HTML-Output-Method) but it doesn't. However when using xsltproc (binary for testing transformations, it's in LibXSLT package) output is correct - that means that this is a PHP bug. To be honest I think none of xsl:output .../ attributes is really working (like omit-xml-declaration or cdata-section-elements). -- Edit this bug report at http://bugs.php.net/?id=20794edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #18387 [Fbk-NoF]: Incorrect work with xml encoding
ID: 18387 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: No Feedback Bug Type: Documentation problem Operating System: Windows (98,2000) PHP Version: 4.2.1 Assigned To: k.schroeder Previous Comments: [2002-11-27 04:07:46] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to Open. Thank you for your interest in PHP. Please try install sablotron complete package (including iconv). Regards, Kai [2002-07-17 16:11:16] [EMAIL PROTECTED] ooops. the text goes even further on that page: More over when compiled on an Unix platform with iconv support the full set of encodings supported by iconv can be instantly be used by libxml. On a linux machine with glibc-2.1 the list of supported encodings and aliases fill 3 full pages, and include UCS-4, the full set of ISO-Latin encodings, and the various Japanese ones. But that won't help the original poster since he's using windows.. chregu [2002-07-17 16:09:05] [EMAIL PROTECTED] Just for the record: From http://xmlsoft.org/encoding.html: Default supported encodings [by libxml2] libxml has a set of default converters for the following encodings (located in encoding.c): 1. UTF-8 is supported by default (null handlers) 2. UTF-16, both little and big endian 3. ISO-Latin-1 (ISO-8859-1) covering most western languages 4. ASCII, useful mostly for saving 5. HTML, a specific handler for the conversion of UTF-8 to ASCII with HTML predefined entities like copy; for the Copyright sign. chregu [2002-07-17 14:01:18] [EMAIL PROTECTED] reclassified [2002-07-17 13:48:52] [EMAIL PROTECTED] I think it is expected behaviour. According to XML specification the only encodings, XML parsers must support are UTF-8 and UTF-16. libxml2 by default supports them and iso-8859-1. So you should workaround your problem by converting your XML documents to UTF-8 (you can also do it on the fly using iconv() function). 2 PHP Developers: I think this bug should be moved to Documentation problem category, because documentation miss this important note about list of supported encodings and how to handle documents with other encodings. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18387 -- Edit this bug report at http://bugs.php.net/?id=18387edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] Bug #18387 Updated: Incorrect work with xml encoding
ID: 18387 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Documentation problem Operating System: Windows (98,2000) PHP Version: 4.2.1 New Comment: Just for the record: From http://xmlsoft.org/encoding.html: Default supported encodings [by libxml2] libxml has a set of default converters for the following encodings (located in encoding.c): 1. UTF-8 is supported by default (null handlers) 2. UTF-16, both little and big endian 3. ISO-Latin-1 (ISO-8859-1) covering most western languages 4. ASCII, useful mostly for saving 5. HTML, a specific handler for the conversion of UTF-8 to ASCII with HTML predefined entities like copy; for the Copyright sign. chregu Previous Comments: [2002-07-17 14:01:18] [EMAIL PROTECTED] reclassified [2002-07-17 13:48:52] [EMAIL PROTECTED] I think it is expected behaviour. According to XML specification the only encodings, XML parsers must support are UTF-8 and UTF-16. libxml2 by default supports them and iso-8859-1. So you should workaround your problem by converting your XML documents to UTF-8 (you can also do it on the fly using iconv() function). 2 PHP Developers: I think this bug should be moved to Documentation problem category, because documentation miss this important note about list of supported encodings and how to handle documents with other encodings. [2002-07-17 03:55:14] [EMAIL PROTECTED] short script: ?php if(!$dom = domxml_open_file(b001.xml)) { echo Error while parsing the document\n; exit; } $root = $dom-document_element(); print_r($root); ? return: Error while parsing the document when xml document has encoding option, like this: ?xml version=1.0 encoding='WINDOWS-1251' ? without encoding='WINDOWS-1251' it work ok. -- Edit this bug report at http://bugs.php.net/?id=18387edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] Bug #18387 Updated: Incorrect work with xml encoding
ID: 18387 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Documentation problem Operating System: Windows (98,2000) PHP Version: 4.2.1 New Comment: ooops. the text goes even further on that page: More over when compiled on an Unix platform with iconv support the full set of encodings supported by iconv can be instantly be used by libxml. On a linux machine with glibc-2.1 the list of supported encodings and aliases fill 3 full pages, and include UCS-4, the full set of ISO-Latin encodings, and the various Japanese ones. But that won't help the original poster since he's using windows.. chregu Previous Comments: [2002-07-17 16:09:05] [EMAIL PROTECTED] Just for the record: From http://xmlsoft.org/encoding.html: Default supported encodings [by libxml2] libxml has a set of default converters for the following encodings (located in encoding.c): 1. UTF-8 is supported by default (null handlers) 2. UTF-16, both little and big endian 3. ISO-Latin-1 (ISO-8859-1) covering most western languages 4. ASCII, useful mostly for saving 5. HTML, a specific handler for the conversion of UTF-8 to ASCII with HTML predefined entities like copy; for the Copyright sign. chregu [2002-07-17 14:01:18] [EMAIL PROTECTED] reclassified [2002-07-17 13:48:52] [EMAIL PROTECTED] I think it is expected behaviour. According to XML specification the only encodings, XML parsers must support are UTF-8 and UTF-16. libxml2 by default supports them and iso-8859-1. So you should workaround your problem by converting your XML documents to UTF-8 (you can also do it on the fly using iconv() function). 2 PHP Developers: I think this bug should be moved to Documentation problem category, because documentation miss this important note about list of supported encodings and how to handle documents with other encodings. [2002-07-17 03:55:14] [EMAIL PROTECTED] short script: ?php if(!$dom = domxml_open_file(b001.xml)) { echo Error while parsing the document\n; exit; } $root = $dom-document_element(); print_r($root); ? return: Error while parsing the document when xml document has encoding option, like this: ?xml version=1.0 encoding='WINDOWS-1251' ? without encoding='WINDOWS-1251' it work ok. -- Edit this bug report at http://bugs.php.net/?id=18387edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] Bug #17214 Updated: MING SWFBitmap Wrong Example
ID: 17214 Updated by: [EMAIL PROTECTED] -Summary: MING Reported By: [EMAIL PROTECTED] Status: Open -Bug Type: Ming related +Bug Type: Documentation problem Operating System: win2kServer PHP Version: 4.2.1 New Comment: Documentation Problem (therefore reclassified). See the first entry in the User Contributed Notes in http://www.php.net/manual/en/function.swfbitmap.php Previous Comments: [2002-05-26 14:46:09] [EMAIL PROTECTED] reclassify [2002-05-14 16:15:21] [EMAIL PROTECTED] The Ming extension does not work fine in this new version of PHP, the 4.2.1 It can not recognize the jpg file type. -- Edit this bug report at http://bugs.php.net/?id=17214edit=1