[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Allowed return data types using addobject?

Subject: RE: Allowed return data types using addobject?
From: Jeff Beadle <Jbeadle@xxxxxxxx>
Date: Thu, 28 Feb 2002 06:36:29 -0500
msxml data type
Hey Neil,

In msxml's msxsl:script element, the input and return datatypes
must either be:
   
   1.  simple (number or string), or...
   2.  a nodelist (IXMLDOMNodeList**)

That's why if you ever pass a "node" or nodeset into an msxsl:script
method, you have to call "nextNode()" or "item(index)" on the input 
parameter before you work with it all... even if you think you're only 
passing in a single node.

The most common way of returning a nodeset back to an xslt context from 
your msxsl:script method, would be to use "selectNodes" instead of 
"selectSingleNode".

Regards,
Jeff


-----Original Message-----
From: Neil Hunter [mailto:HunterN@xxxxxxx]
Sent: Thursday, February 28, 2002 5:58 AM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject:  Allowed return data types using addobject? 


Hi,

I am using ASP and MSXML.

I am calling a COM object (written in VB) that is made available to an XSLT
style sheet using XSLTprocessor.addobject.  I can successfully call a method
in the object from the style sheet that returns xml as a string ( so <
becomes &lt; etc.) to an xsl:variable but I want to call one that returns a
tree to be converted into a node-set. I have tried all sorts of methods to
accomplish this but none have been entirely successful. What data type
should I use for the return value (within VB) of the COM method to achieve
this and what should I be doing to turn this value into a node-set. Is it
even allowable to return an object? 

My current approach is call a method that takes a string and returns an
MSXML2.DOMDocument using:

<xsl:variable name="msid"><xsl:value-of
select="//rsc:docroot/@msid"/></xsl:variable>
<xsl:variable name="links" select="myObj:resolveLinks(string($msid))"/>
<xsl:variable name="doclinks" select="msxsl:node-set($links)"/>

The ASP page that does the work tends to hang and time out.

Any advice is much appreciated.

Thanks,

Neil.
      

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.