Hi

Eric Kow wrote:

> This is where Kevin Ollivier of wxWidgets pointed out something
> interesting: in the current wxWidgets trunk, it should be possible to
> automatically generate the C bindings from the Doxygen XML output.  In
> fact, he has already done something similar for Python, metadata to
> Python objects:

....

> 
> Now that wxHaskell 0.11 has been released with wxWidgets 2.8 support, is
> it time to take this back-end stuff more seriously?  It sounds like what
> one of us could do is hack up a quick XSLT sheet or something similar to
> produce the C bindings.  Maybe a HaXml program as a prototype?

I have never done any XSLT programming before (have done some XPath
though), but still thought I would give it a try. I have attached the
XSL program and the output.

The XSLT program is nowhere near finished, just a beginning to see if it
is a path worth pursuing. And to get feedback...

Besides the overly verbose syntax, I did not feel like XSLT were a good
match for the task. It was hard to factor out common patterns - aka. the
composability of XSLT seems poor. But this may just be my lack of
experience with XSLT. If I could have done something smarter I am all
ears.

I used to Saxon 8.8J for processing.


Greetings,

Mads Lindstrøm

Attachment: cpp_to_c.xsl
Description: XML document

  #include <wx/button.h> 

	    /* Constructor */
	  wxButton wxButtonConstructor (  ); 

	    /* Constructor */
	  wxButton wxButtonConstructor (  wxWindow parent ,  wxWindowID id ,  wxString label ,  wxPoint pos ,  wxSize size ,   style ,  wxValidator validator ,  wxString name ); 
	    
	  /* Normal Method */
	  wxButton ~wxButton ( wxButton thisClass  ); 
	    
	  /* Normal Method */
	  bool Create ( wxButton thisClass  wxWindow parent ,  wxWindowID id ,  wxString label ,  wxPoint pos ,  wxSize size ,   style ,  wxValidator validator ,  wxString name ); 
	    
	  /* Normal Method */
	  wxString GetLabel ( wxButton thisClass  ); 
	    
	  /* Normal Method */
	  wxWindow* SetDefault ( wxButton thisClass  ); 
	    
	  /* Normal Method */
	  void SetLabel ( wxButton thisClass  wxString label ); 
	    
	  /* Normal Method */
	  wxSize GetDefaultSize ( wxButton thisClass  ); 
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

Reply via email to