xsl-list
[Top] [All Lists]

RE: Portability function-available tips

2004-01-09 04:33:50
No I don't think you want that, I think you want

  <xsl:for-each select="exsl:node-set($foo-rtf)">

Together with 

<msxsl:script language="JScript" implements-prefix="exsl">
   function node-set(r) {
some javascript to return the thing cast to a node set
which I'm sure you can do but don't have the doc to hand
}
</msxsl:script>

Thanks David, spell it out and I get there eventually...

However, the next stumbling block and possibly the nail in the coffin is
that function names cannot contain hypens.  So merely having:

function node-set() { }

Throws an error.

Can any msxsl:script'ers on the list get this stylesheet working with
msxml 4 purely by editing the script block?

<xsl:stylesheet version="1.0"
  xmlns:exsl="http://exslt.org/common";
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:msxsl="urn:schemas-microsoft-com:xslt">

<msxsl:script language="JScript" implements-prefix="exsl">
  function node-set(nodelist) {
    //return me a node set
  }
</msxsl:script>

<xsl:variable name="foo-rtf">
  <foo>hello</foo>
</xsl:variable>
<xsl:variable name="foo" select="esxsl:node-set($foo-rtf)"/>

<xsl:template match="/">
  <xsl:value-of select="$foo/foo"/>
</xsl:template>

</xsl:stylesheet>


Thanks
andrew


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list