I am trying to parse a string in an xml element to imported into Access. I have created the following xslt with a vbscript function to accomplish this. I'm getting the following error when browsing the xml in IE: "Microsoft VBScript runtime error Wrong number of arguments or invalid property assignment line = 4, col = 0"
xslt:
<xsl:stylesheet version="1.0" xmlns:xsl=" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:myfunc="urn:extra-functions">
<msxsl:script language="VBScript" implements-prefix="myfunc">
<![CDATA[
Dim length, pos, string2
function ordernum(x)
pos=InStr(x,"-")
length=Len(x)
string2=(length-pos)
ordernum=Right(x,string2)
end function
]]>
</msxsl:script>
<xsl:template match="OrderList">
<html>
<body>
<h1>Orders</h1>
<table width="640">
<xsl:for-each select="Order">
<tr>
<td>
<xsl:value-of select="myfuncrdernum(@id)"/>
</td>
<td>
<xsl:value-of select="NumericTime"/>
</td>
<td>
<xsl:value-of select="Entry-Point"/>
</td>
<td>
<xsl:value-of select="Referer"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Any help would be much appreciated
xslt:
<xsl:stylesheet version="1.0" xmlns:xsl=" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:myfunc="urn:extra-functions">
<msxsl:script language="VBScript" implements-prefix="myfunc">
<![CDATA[
Dim length, pos, string2
function ordernum(x)
pos=InStr(x,"-")
length=Len(x)
string2=(length-pos)
ordernum=Right(x,string2)
end function
]]>
</msxsl:script>
<xsl:template match="OrderList">
<html>
<body>
<h1>Orders</h1>
<table width="640">
<xsl:for-each select="Order">
<tr>
<td>
<xsl:value-of select="myfuncrdernum(@id)"/>
</td>
<td>
<xsl:value-of select="NumericTime"/>
</td>
<td>
<xsl:value-of select="Entry-Point"/>
</td>
<td>
<xsl:value-of select="Referer"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Any help would be much appreciated