|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XSLT Extension Functions
Why not use the xalan:evaluate() extension function instead? Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > Hushagen, Michael E. > Sent: 12 September 2002 19:22 > To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx' > Subject: XSLT Extension Functions > > > 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 > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








