[Mono-devel-list] XSLT extension objects

Joshua Tauberer tauberer at for.net
Mon May 26 22:56:26 EDT 2003

I posted the following to Bugzilla as 

XSLT extension objects are as yet unimplemented.  Attached to this is a 
patch to implement them.

The patch modifies mcs/class/System.XML/System.Xml.Xsl/XslTransform.cs

If extension objects are not used by the user, then the behavior of 
XslTransform is unchanged, so working things won't break.  This isn't a 
complete implementation, but it's a working start.

Known issues with patch:
   requires -unsafe keyword (XPath only returns pointers to XSLT objects)
   the signatures of methods in extension objects must match exactly to 
the types of parameters that the method is called with from the 
stylesheet (this is fixable but takes more work).  The MS documentation 
examples indicate that parameters can be converted between types (ie 
double => decimal) as necessary.
   node set parameters are converted to an ArrayList of strings, since 
there isn't a good way to pass the actual nodes to the extension functions
   I added a Mono-specific feature of registering the static methods of 
a type as extension functions (ie System.Math's methods), which I don't 
think can be done in MS .NET.  This is useful for me for something else 
I'm working on.

I used this patch to write a Mono version of the xsltproc tool which I'm 
using to update existing Mono XML documentation files for the monodoc 
browser updates.

- Joshua Tauberer


** Nothing Unreal Exists **

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: extensionobjects.patch
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030526/84cbdcf4/attachment.pl 

More information about the Mono-devel-list mailing list