I tried using the following code sample out of help.
Dim xslt As New Msxml2.XSLTemplate50
Dim xslDoc As Msxml2.FreeThreadedDOMDocument50
Dim xmlDoc As New Msxml2.DOMDocument50
Dim xslProc As IXSLProcessor
Problem is vbscript is not vb there for there must be a way to reference the
object by referencing the dll that it is found in. I thought that maybe
because it was inside my infopath doc it would be an intrinsic object. I
also tried using asp's method of
Set xslt = Server.CreateObject("Msxml2.XSLTemplate50")
Set xslDoc = Server.CreateObject("Msxml2.FreeThreadedDOMDocument50")
Set xslProc = Server.CreateObject("IXSLProcessor")
But that doesn't work either since I'm not pulling this from a webserver.
How do I initialize these object in VbScript?
A plain old "CreateObject" without the "Server" part should work if the DLL
is registered on your machine. So try using
Set xslt = CreateObject("Msxml2.XSLTemplate50")
---
S.Y.M. Wong-A-Ton
> I tried using the following code sample out of help.
> Dim xslt As New Msxml2.XSLTemplate50
[quoted text clipped - 13 lines]
> But that doesn't work either since I'm not pulling this from a webserver.
> How do I initialize these object in VbScript?
Caeanis - 15 Feb 2006 09:35 GMT
Thank you for stating the obvious. I don't know why I didn't see it right
away. Now I have a new problem; the following line:
xslDoc.Load "myRecipes.xsl"
Generates this error at run-time:
"The stylesheet does not contain a document element. The stylesheet may be
empty, or it may not be a well-formed XML document."
!!!
I can use this same style sheet to successfully transform a xml document
generated by my infopath form in both Stylus Studio and Altova XMLSpy. I
have validated it in both for being well formed and all that jazz. So why
is InfoPath having an issue with it? Does it need a special tag(s) for
Infopath to use it?
> A plain old "CreateObject" without the "Server" part should work if the DLL
> is registered on your machine. So try using
[quoted text clipped - 19 lines]
> > But that doesn't work either since I'm not pulling this from a webserver.
> > How do I initialize these object in VbScript?