S
steve_h
I think the subject says it all, but just in case:
I know that I can call my own methods during an XSL transformation
using
<xsl:value-of select="myObject.someMethod(arg1)" />
having done something like:
dim xslTrans as System.Xml.Xsl.Xsltransform
dim xsltArg as new System.Xml.XsltArgumentList()
xsltArg.AddExtensionObject("urn:my-object")
....
dim navigator as System.Xml.Xpath.XPathNavigator = ..
xslTrans.transform(navigator, xslArg, myWriter, Nothing)
....
public function someMethod( arg as string) as String
...
end function
and I also know that I can define functions in a script inside
the xsl file using:
<msxsl:script language="VisualBasic" implements-prefix="user">
function myFunc (xx)
...
end function
</msxsl:script>
<xsl-value-of select="user:myFunc( elm/@value ) />
Is there an easy way to combine the two ideas so that my msxml:script
function calls the method of my extension object ?
<msxsl:script language="VisualBasic" implements-prefix="user">
<![CDATA[
function myFunc (xx)
myFunc = myObject.someMethod()
end function
]]>
</msxsl:script>
Steve.
I know that I can call my own methods during an XSL transformation
using
<xsl:value-of select="myObject.someMethod(arg1)" />
having done something like:
dim xslTrans as System.Xml.Xsl.Xsltransform
dim xsltArg as new System.Xml.XsltArgumentList()
xsltArg.AddExtensionObject("urn:my-object")
....
dim navigator as System.Xml.Xpath.XPathNavigator = ..
xslTrans.transform(navigator, xslArg, myWriter, Nothing)
....
public function someMethod( arg as string) as String
...
end function
and I also know that I can define functions in a script inside
the xsl file using:
<msxsl:script language="VisualBasic" implements-prefix="user">
function myFunc (xx)
...
end function
</msxsl:script>
<xsl-value-of select="user:myFunc( elm/@value ) />
Is there an easy way to combine the two ideas so that my msxml:script
function calls the method of my extension object ?
<msxsl:script language="VisualBasic" implements-prefix="user">
<![CDATA[
function myFunc (xx)
myFunc = myObject.someMethod()
end function
]]>
</msxsl:script>
Steve.