Events
Mar 17, 11 PM - Mar 21, 11 PM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Extension objects are used to extend the functionality of style sheets. Extension objects are maintained by the XsltArgumentList class.
The following are advantages to using an extension object rather than embedded script:
Provides better encapsulation and reuse of classes.
Allows style sheets to be smaller and more maintainable.
XSLT extension objects are added to the XsltArgumentList object using the AddExtensionObject method. A qualified name and namespace URI are associated with the extension object at that time.
Note
The FullTrust permission set is required to call the AddExtensionObject method. For more information, see Code Access Security and Named Permission Sets.
The data types returned from extension objects are one of the four basic XPath data types of number
, string
, Boolean
, and node set
.
Any method that is defined with the params
keyword, which allows an unspecified number of parameters to be passed, is not currently supported by the XslCompiledTransform class. XSLT style sheets that utilize any method defined with the params
keyword will not work correctly. For details, see params.
Create an XsltArgumentList object and add the extension object using AddExtensionObject method.
Call the extension object from the style sheet.
Pass the XsltArgumentList object to the Transform method.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 11 PM - Mar 21, 11 PM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Explore extensions and the extension framework in finance and operations apps - Training
Finance and operations apps are customized by using extensions, which let you add functionality to model elements and source code in the Application Object Tree (AOT) by using Visual Studio.