As an example, to create a strongly-typed OpenGL header file for Pascal, you would do something like this:
Lets try glCullFace, in the XML file we find a list of valid enums for it, but the type name is a comment which makes it hard to extract.

For commands like GetIntegerv you could overload the function definition so that if the enum is in one range of values then the second parameter must be a pointer to an integer variable, and for another range it must be a pointer to an array of integer.
For some enums you might specify that it is a pointer to a record type, for example if you are reading a color value you might make a record type containing R,G,B and A values.
This would need the information from the state tables in chapter 23 of the spec.

Some reused enums are ranges inside of larger types so we can take the type for DrawBufferMode/ReadBufferMode and create a subrange type for ColorMaterialFace/CullFaceMode/MaterialFace:
eCullFaceMode = GL_FRONT..GL_BACK;

Then once we have the enums divided up into groups, we just overload the function to use all of the applicable groups.
procedure glDrawBuffer( Buffers: eNone ); stdcall; external 'OpenGL32.dll'; overload;
procedure glDrawBuffer( Buffers: eDrawBufferMode ); stdcall; external 'OpenGL32.dll'; overload;
procedure glDrawBuffer( Buffers: eBothFaces ); stdcall; external 'OpenGL32.dll'; overload;

FYI, I've put the .spec file parameter type & array length annotations into gl.xml. See here and feel free to provide feedback on the board, or patches in Bugzilla, if this helps address the concerns in this thread.