Subject: Re: Lotus XSL extensions From: Scott Boag <sboag@xxxxxxxxxxxxx> Date: Thu, 18 Nov 1999 11:49:34 -0500 |
Kevin, here is an example: ==== input xml ==== <?xml version="1.0"?> <doc> <?a-pi some data?> </doc> === xsl === <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" xmlns:lxslt="http://xsl.lotus.com/" xmlns:extn1="http://foo.com" extension-element-prefixes="extn1"> <lxslt:component prefix="extn1" functions="getPIData"> <lxslt:script lang="javascript"> <![CDATA[ function getPIData(nodes) { if (nodes.getLength() > 0) { node = nodes.item(0); returnVal = node.getData(); } else { returnVal = ""; } return returnVal; } ]]> </lxslt:script> </lxslt:component> <xsl:template match="/"> <out> <xsl:value-of select="extn1:getPIData(doc/processing-instruction('a-pi'))"/> </out> </xsl:template> </xsl:stylesheet> The type passed into the function is a com.lotus.xpath.MutableNodeListImpl, which implements the NodeList interface (but which is not a true NodeList since the nodes it holds are not reparented, and it is not owned by an element). -scott Kevin Jones wrote: > I'm using the Lotus XSL parser (0_18_5) and have been trying to get > Javascript extensions to work. Does anybody here have any experience with > this - and/or any examples they could share? > > Thanks, > > Kevin Jones > > 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Lotus XSL extensions, Kevin Jones | Thread | RE: Lotus XSL extensions, Kevin Jones |
Re: Lotus XSL extensions, Tangi Vass | Date | RE: Lotus XSL extensions, Kevin Jones |
Month |