I have XSLT that creates HTML from XML. There are several parts of the resulting HTML that I need to create by external C# method (extension method).
Thank you very much!
Well if you want to return HTML tag soup not conforming to XML rules then you can only return a string and then use eg <xsl:value-of select="pf:yourFunction()" disable-output-escaping="yes"/>
. If you want to build a node-set of nodes or a result tree fragment then check the documentation , it shows the mapping between the XSLT types and the .NET framework types eg if you want your function to return an result that XSLT sees as a node-set then use the type XPathNodeIterator as the .NET return type of your extension function.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.