I found a round about solution, but think it would be nicer to find the information in the object model from the function arguments. The round about solution was to read the XSL document (XmlReader) and extract the <xsl:stylesheet xmlns: attributes and from those create a XmlNamespaceManager (and XmlNameTable). The XmlNamespaceManager was passed to the XSL Extension class constructor which places the value in a private class variable that is used in the .Select argument list. This makes the wrapper program have to read the XSL document twice, once to find the stylesheet element and close/reopen to pass to XslCompiledTransform. It works and now the extension function evaluate can accept XPath with namespace prefixes.