List Info

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




XML_Query2XML: ISO/IEC 9075-14:2005 mapping
user name
2006-04-21 15:32:15
Hi Lukas

(Sorry I could not answer your message before, I was
preparing some classes and
talks)

--- Lukas Feiler <lukasempoweredmail.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.ph
p.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 (jcastagnettoyahoo.com)
Web site: http://www.castagnetto.or
g/
Research: http://metallo.scripps.ed
u/
PEAR stuff: http://pear.ph
p.net/user/jmcastagnetto

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection
around 
http://mail.yahoo.com 

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

XML_Query2XML: ISO/IEC 9075-14:2005 mapping
user name
2006-04-21 16:31:31
Hi Jesus,

> Jesus M. Castagnetto wrote:
> 
> Hi Lukas
> 
> (Sorry I could not answer your message before, I was 
> preparing some classes and talks)
> 
> --- Lukas Feiler <lukasempoweredmail.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 

Not using ISO9075 mapping as the default also has the
advantage that the
dependency on I18N_UnicodeString is only optional.
Users that don't do ISO9075 mapping won't even have to
install
I18N_UnicodeString (which is currently only beta).

> 
> > 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. 
OK, I agree

> 
> > 
> > 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.ph
p.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.
Thanks for making me implement ISO 9075  It's a
great feature!

As soon as the PEPr voting process is over I'll make a new
release that
includes all changes suggested during the voting process.
I already implemented and documented everything but I'd
like to wait if
anything else turns up until tomorrow 08:00 UTC.

I just updated http://query2xml.sourceforge.net/ISO9075Mapper.php.html so
you can have a look at the new implementation using
I18N_UnicodeString.

Lukas

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )