Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: VS: JScript function not working XSLT


Message #1 by "Teemu Keiski" <wroxhelp@m...> on Thu, 9 May 2002 20:15:16 +0300
I suppose that because you are working with XSLT extension functions in
.NET, so .NET compiler expects that JScript code is valid JScript.NET
code. I think that you should define data types for xml function
parameters and return type and remember that they are .NET data types.

Teemu Keiski

-----Alkuper=E4inen viesti-----
L=E4hett=E4j=E4: Pratik Maroo [mailto:psmaroo@y...]
L=E4hetetty: 9. toukokuuta 2002 15:09
Vastaanottaja: ASP+
Aihe: [aspx] JScript function not working XSLT


I am trying to use JScript in XSLT file to return the node. Following
example is given in XML4.0 help, but it is not working when
loading XSLT through webform.

Am I doing missing something ?

Thx.

<xsl:stylesheet xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform"
                xmlns:msxsl=3D"urn:schemas-microsoft-com:xslt"
                xmlns:user=3D"http://mycompany.com/mynamespace"
                version=3D"1.0">
  <msxsl:script language=3D"JScript" implements-prefix=3D"user">
    function xml(nodelist) {
      return nodelist.nextNode().xml;
    }
  </msxsl:script>

  <xsl:template match=3D"/">
    <xsl:value-of select=3D"user:xml(.)"/>
  </xsl:template>
</xsl:stylesheet>


  Return to Index