Well, it's been several hours I'm lost...
IXSLTemplate::putref_stylesheet
doesn't document any error except E_FAIL.
However in my case putref_stylesheet
returns E_INVALIDARG
. GetErrorInfo()
is only redundant telling me that the "Argument is invalid". So I am not left with much information.
However my code is pretty close to all examples I found on the web and msdn. And it does something like:
void xsltProcessing(MSXML2::IXMLDOMDocument* pXmlDoc, MSXML2::IXMLDOMDocument * pXslDoc)
{
IXSLTemplatePtr pTemplate;
pTemplate.CreateInstance( _T( "Msxml2.XSLTemplate" ));
pTemplate->putref_stylesheet(pXslDoc);
//...
}
As there is not much documentation for putref_stylesheet
. Do you have any idea what could go wrong for it to return E_INVALIDARG
?
My pXslDoc
is a IXMLDOMDocument
I have loaded from static const strings with success.
Any clue ? ( I guess it's pretty vague a question, but it's been hours I am searching )