Subject: Populate an array -- extension functions in LotusXSL From: "Garriss Jr.,James P." <jgarriss@xxxxxxxxx> Date: Tue, 12 Oct 1999 11:19:24 -0400 |
<?xml version="1.0" encoding="UTF-8"?> <numbers> <number value="1"/> <number value="2"/> <number value="3"/> <number value="4"/> <number value="5"/> </numbers>
<?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://dev.mitre.org/" extension-element-prefixes="extn1">
<xsl:output method="text" indent="no"/> <xsl:strip-space elements="*"/>
<!-- root --> <xsl:template match="/"> <xsl:apply-templates select="*"/> </xsl:template>
<!-- numbers --> <xsl:template match="numbers"> <xsl:for-each select="*[@value]"> <xsl:variable name="value" select="@value"/> <xsl:variable name="foo1" select="extn1:fcnArray($value)"/> <!-- <xsl:value-of select="$foo1"/> --> </xsl:for-each> </xsl:template>
<lxslt:component prefix="extn1" elements="" functions="fcnArray"> <lxslt:script lang="javascript"> <![CDATA[
aryValue = new Array; // holds values var intPosition = 0; // counter
// populate an array function fcnArray(intNewValue) { aryPosition[intPosition] = intNewValue; intPosition = intPosition + 1; return; }
]]> </lxslt:script> </lxslt:component>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
linking xml files each others using, Emmanuel.Leguy | Thread | A FAQ question about non-Latin char, Jarno Elovirta |
linking xml files each others using, Emmanuel.Leguy | Date | A FAQ question about non-Latin char, Jarno Elovirta |
Month |