I am using mxsml 6 via COM to execute a transform. The source stylesheet has an xs:import statement that I know how to include, but how can I tell MSXML to do that? I can't seem to find a place to tell the IXSLTemplate to load the resolved source
Details:
- I get the error "the system cannot locate the object specified"
- I am setting the ResolveExternals = true on the source document
- I am trying to execute a schematron validation
- I am using Delphi, so using msxml seems to be my only option
- I have everything in memory in a server environment, so I very much want to avoid having to use files
Code:
var
v: variant;
doc : IXMLDOMDocument2;
xform: IXSLTemplate;
begin
v := CreateOLEObject('MSXML2.FreeThreadedDOMDocument.6.0')
doc := IUnknown(TVarData(v).VDispatch) as IXMLDomDocument2;
doc.async := false;
doc.resolveExternals := true;
doc.loadXML([my source for the first transform below]);
v := CreateOLEObject('MSXML2.XSLTemplate.6.0');
xform := IUnknown(TVarData(v).VDispatch) as IXSLTemplate;
xform.stylesheet := doc;
end;
original source for transforms:
- http://gforge.hl7.org/gf/project/fhir/scmsvn/?action=browse&path=%2Ftrunk%2Fbuild%2Ftools%2Fschematron%2Fiso_svrl_for_xslt1.xsl&view=markup
- http://gforge.hl7.org/gf/project/fhir/scmsvn/?action=browse&path=%2Ftrunk%2Fbuild%2Ftools%2Fschematron%2Fiso_schematron_skeleton_for_xslt1.xsl&revision=1319&view=markup