XML_Query2XML: ISO/IEC 9075-14:2005 mapping

From: Date: Wed, 19 Apr 2006 23:03:39 +0000
Subject: XML_Query2XML: ISO/IEC 9075-14:2005 mapping
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-42299@lists.php.net to get a copy of this message
Hi, as Justin and Jesus suggested, I implemented ISO/IEC 9075-14:2005 for mapping SQL identifies to XML names within XML_Query2XML (voting in progress). I have 2 questions regarding the implementation: 1) What do you think about (not) making XML_Query2XML_ISO9075Mapper the default? ISO 9075-mapping is quite complex as it also requires Unicode support. Therefore my full implementation has 356 lines and on a PIII, 2.2 GHz it does only about 1755 mappings per second. Considering this overhead, I'm not sure if XML_Query2XML_ISO9075Mapper should be the default mapper. I guess a lot of people only use [a-Z_0-9]* for SQL identifiers and don't need any special mapping at all. 2) Why do you think that Section 9.2 of ISO/IEC 9075-14:2005 is relevant? XML_Query2XML only deals with column names but never with multiple SQL identifiers that would have to be mapped to a single XML name. The source of ISO9075Mapper.php (XML_Query2XML_ISO9075Mapper) can be found at: http://query2xml.sourceforge.net/ISO9075Mapper.php.html Unit tests can be found at: http://query2xml.sourceforge.net/ISO9075MapperTest.php.html Note: currently XML_Query2XML_ISO9075Mapper has its own methods for converting characters from UTF-8 to Unicode (and vice versa); as suggested by Justin, I placed a feature request for the PEAR package I18N_UnicodeString. This package actually contains the required functionality but does not currently provide it via public static methods. Lukas

« previous php.pear.dev (#42299) next »