Thanks Jon that worked. This is tricky stuff. The link I was referring to is on that page and under the "Metadata.xml Transform File" section. It points to "http://docs.xamarin.com/http%3a%2f%2fwww.mono-project.com/_GAPI#Metadata" which brings me back to the android documentation page.
Thanks, Jeremy -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Jonathan Pryor Sent: Thursday, September 20, 2012 2:33 PM To: Discussions related to Mono for Android Subject: Re: [mono-android] referencing constructor in Metadata.xml On Sep 20, 2012, at 2:08 PM, Jeremy A. Kolb - ARA/NED <[email protected]> wrote: > How do I change the name of a parameter in a constructor in metadata.xml? So > Far I have: > > <attr > path="/api/package[@name='org.osmdroid.util']/class[@name='GeoPoint']/method[@name='.ctor']/signature[@name='(II)V']/parameter[@name='p0']" > name="name">latitude</attr> Right idea... However, the //attr/@path XSLT expressions need to refer to Google AOSP format XML, in which constructors use a <constructor/> element, not a <method/> element with a name of ".ctor": http://docs.xamarin.com/android/tutorials/API_Metadata_Reference#Google_AOSP_Format Furthermore, there is no <signature/> element, so checking for that won't match either. What I believe you want is: <attr path="/api/package[@name='org.osmdroid.util']/class[@name='GeoPoint']/constructor[count(parameter)=2 and parameter[1][@type='int'] and parameter[2][@type='int']]/parameter[@name='p0']" name="name" >latitude</attr> Which is a bit of a mouthful. Assuming that org.osmdroid.util.GeoPoint is this: http://code.google.com/p/osmdroid/source/browse/trunk/osmdroid-android/src/org/osmdroid/util/GeoPoint.java?r=667 We can simplify that and instead say "if the constructor has more than one parameter, the first parameter is named "latitude": <attr path="/api/package[@name='org.osmdroid.util']/class[@name='GeoPoint']/constructor[count(parameter)>1]/parameter[@name='p0']" name="name" >latitude</attr> > Also on http://docs.xamarin.com/android/tutorials/API_Metadata_Reference the > link to "http://www.mono-project.com/ GAPI#Metadata" is wrong. Is it? It looks right to me... - Jon _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
