|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsl:script (again)
Hi Alia,
> But I got as output: SalesPosition=1 function SalesPos()
> SalesPos=SalesPosition SalesPosition=SalesPosition+1 end function
> function calcul(node) m=node.childnodes.item(1).text
> n=node.childnodes.item(2).text calcul=m*n end function
It looks as though the stylesheet isn't being interpreted properly. It
could be a couple of things:
- are you accidentally running the transformation on the stylesheet
rather than on the source document?
- are you using MSXML2, which doesn't support XSLT?
You could try adding an extension-element-prefixes attribute to the
xsl:stylesheet element to state that the prefix 'msxsl' is being used
for extension elements, though I don't think that would make a
difference.
By the way, your function seems a little peculiar, since you can
easily get the position of a particular Salesperson through the
position() function. Rather than using your xslscript:SalesPos()
function, why not just do:
<xsl:template match="Salesperson">
<tr>
<td><xsl:value-of select="position()" /></td>
<td><xsl:value-of select="Name" /></td>
<td><xsl:value-of select="Sales" /></td>
</tr>
</xsl:template>
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
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








