Re: XML_Query2XML: ISO/IEC 9075-14:2005 mapping

From: Date: Fri, 21 Apr 2006 15:32:15 +0000
Subject: Re: XML_Query2XML: ISO/IEC 9075-14:2005 mapping
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-42308@lists.php.net to get a copy of this message
Hi Lukas (Sorry I could not answer your message before, I was preparing some classes and talks) --- Lukas Feiler <lukas@empoweredmail.com> wrote: > 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. Agree on this one. The extended mapping will be useful in the cases of accessing some legacy or foreign language named identifiers, thus it should not be the default but an option. I've dealt with some old dbs that included spaces and other random stuff in the names, just because of some internal standard that mandated a fixed number of chars, so the db admins got inventive in their naming schemes :-) > 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. I would not implement that just yet. I am not sure what could be the exact applicability of that in most day to day work. Seems to me that the usual mapping of database names, tables and fields in a hierachical manner in XML should suffice for most purposes, no need to have a multipart fo!!.ba++r.bo1#ng mapping to a single element. > > 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. I see that your request has been attended so you can now use the methods in the aforementioned package instead of the internally defined ones in your code. I am impressed with having implemented this, and that you had the stamina to waddle through that standard (which is not light reading at all). Cheers and keep the good work. -- Jesus M. Castagnetto (jcastagnetto@yahoo.com) Web site: http://www.castagnetto.org/ Research: http://metallo.scripps.edu/ PEAR stuff: http://pear.php.net/user/jmcastagnetto __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

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