A recap of our obstacle:
I was able to get a stub function working for the GML function (The earlier error of "no such function" was resolved). I have implemented the function based on this page: http://community.ingres.com/wiki/Implementing_New_SQL_Function