From: Andris S. <an...@do...> - 2001-09-09 18:23:29
|
Hello all, The previous version of xml2php does not correctly handle xml-based arrays which need to be key-less (for example, "load" array in bcp.xml). xml2php CAN'T know when you need a keyless array (unfortunately it has no artifical intelligence built-in...), so we must tell it. In the LATEST xml2php version it uses <things><thing></thing></things> syntax. The idea was that a standart array defined in xml as <load> <module> <id>product_list</id> </module> </load> would be rendered as (note that we DO NOT want the "module" array to have it's name (key) here! 'load' => array( 'module' => array( 'name' => "product_list", ) ), but some xml-thing like this <modules> <module> <id>product_list</id> </module> </modules> will be rendered as following (note that this time the array has no key, which is what we all want). 'modules' => array( array( 'id' => "product_list", ), ), The only place in which we need to change something is bcp.xml definition, where we should rename "load" array to "modules" array AND change the page to use "modules" instead of "load" as well. The latest (included) XMLUtils version handles that properly. A changed Page.php is included as well. Good luck with testing. Andris Spruds P.S. I had no free time to deal with xml.php => php.xml problem, but this should be fairly easy to fix. Even more, since we will be using file_name.file_type.xml naming scheme (for example index..bcp.xml for page definition or god.rle.xml for a role definition), there is no need to have xml file's type definded in makefile (we can read it from the file name! mmm...) |