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(_at_)fedins(_dot_)com 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