XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Ryan PeelSubject: The Parameter is Incorrect
Author: Ryan Peel
Date: 07 Mar 2005 09:19 AM
Okay, I have a problem between a VB6 component and an XSLT stylesheet
but I cannot figure out what it is.

My VB6 method is creating a new XSLT object and I am passing a valid
XML blob to the stylesheet. However, I continue to receive an error
in the event log that reads, "The parameter is incorrect." The error
code returned is -2147024809.

In Stylus Studio, my stylesheet parses the XML just as I want it to.
However, I keep getting an error during the call to the "input" method
of the XSLProcessor object within VB.

Can anyone help?

Here is part of my VB6 code.

Dim strXMLTemplate As String
Dim xslDoc As New FreeThreadedDOMDocument
Dim xslt As New XSLTemplate
Dim xslProc As IXSLProcessor
Dim xsltPath As String

strXMLTemplate = "D:\MyStyleSheets\AVMatchingOrder.xsl"
xslDoc.async = False
xslDoc.Load strXMLTemplate
Set xslt.stylesheet = xslDoc
Set xslProc = xslt.createProcessor()
xslProc.input = strViolation 'strViolation is the valid XML input declared as String
xslProc.Transform
strViolation = xslProc.output

I have included attachments of my stylesheet as well as a valid XML
input example.

Thank you for your help.





UnknownAVMatchingOrder.xsl
XSL Stylesheet

Unknownxml1.xml
Valid XML Input

Posttop
Ryan PeelSubject: The Parameter is Incorrect
Author: Ryan Peel
Date: 07 Mar 2005 09:56 AM
Okay, I think I've found the solution on my own and wanted to post it
here in case someone else has the same thing come up.

I had to Dim my VB6 variables differently than I was before. Now, they
are like this:

Dim strXMLTemplate As String
Dim xslt As New MSXML2.XSLTemplate30
Dim xslDoc As New MSXML2.FreeThreadedDOMDocument30
Dim xmlDoc As New MSXML2.DOMDocument30
Dim xslProc As IXSLProcessor

Instead of:

Dim xslDoc As New FreeThreadedDOMDocument
Dim xslt As New XSLTemplate
Dim xslProc As IXSLProcessor

In addition, I had to pass a DOM object to my stylesheet during the
"input" method call.

Now it is working!

Also, here is the URL of the MSDN site where I attempted some code
that they show.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/xmmthcreateprocessor.asp

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.