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

XSLT Extension Functions

Subject: XSLT Extension Functions
From: "Hushagen, Michael E." <MEHushagen@xxxxxxxxxx>
Date: Thu, 12 Sep 2002 13:21:41 -0500
jscript selectnodes
Hi all!
I recently entered the wonderful world of XSLT Extensions.  I'm converting
an XSL stylesheet from a Microsoft environment to a Java environment.  The
stylesheet has several extension functions defined such as this:

 <msxsl:script language="JScript" implements-prefix="local"><![CDATA[
		  function selectNodes(contextNodeList,path)
		  {
		    return contextNodeList.item(0).selectNodes(path);
	}
 ]]></msxsl:script>

As you can see, it's using Jscript and is called during the transformation
process using MSXML.

I converted the functions to Java methods such as this:

public NodeList selectNodes(NodeList contextNodeList,String path) {   
return XPathAPI.selectNodeList(contextNodeList.item(0), path);
}

This Java function is called during the transformation process using Xalan.
These functions are called from inside the XSL stylesheet like this:
<xsl:variable name="vRoot" select="/"/>
<xsl:value-of select="local:selectNodes($vRoot,'Xpath expression goes
here')"/>


My problem is this:
The node list that is passed into these functions seem to be of different
types depending on what transformer/function type is used.  The nodelist
that is passed into my Java function is a DTMNodeList which is a Xalan
class.  The nodelist that is passed into the Microsoft Jscript function is a
different, generic node list.
This difference in types is causing problems.  Does anybody know anything
about this???
Any help would be greatly appreciated.

Thanks!
 -Mike H.


__________________________________________________________________
This information is intended only for the use of the addressee(s) and may contain privileged, confidential or proprietary information.  If you are not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, displaying, copying, or use of this information is strictly prohibited.  If you have received this communication in error, please notify us immediately at Administrator@xxxxxxxxxx or by telephone at (800) 533-0472, and return the information to the sender with all copies deleted and destroyed.  Thank you.


 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.