I type the following command:nxslt2.exe MyXml.xml stylesheet.xsl -o output.xml -ext ClassLibrary1.MyClass -af ClassLibrary1.dll xmlns:ExtHelper="ClassLibrary1.MyClass"
NOTE: ClassLibrary1.dll is found is in the same directory as nxslt2.exe
I get the following error:An error occurred while instantiating 'ClassLibrary1.MyClass' type: Extension object 'ClassLibrary1.MyClass' must be bound to a namespace URI.
Where do I need to bind the Extension Object to a namespace URI? and how do I do it?
Thanks,
/Daniel
Take a look at http://www.xmllab.net/Products/nxslt2/tabid/73/Default.aspx?PageContentID=9
You need
nxslt2.exe MyXml.xml stylesheet.xsl -o output.xml -ext ClassLibrary1.MyClass -af ClassLibrary1.dll xmlns="ClassLibrary1.MyClass"
or
nxslt2.exe MyXml.xml stylesheet.xsl -o output.xml -ext ExtHelper:ClassLibrary1.MyClass -af ClassLibrary1.dll xmlns:ExtHelper="ClassLibrary1.MyClass"
Provided that "ClassLibrary1.MyClass" is namespace URI you are using in your stylesheet to call extension functions from :ClassLibrary1.MyClass class.