Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Cannot access NodeList in JScript >Thread Next - Re: Cannot access NodeList in JScript Re: Cannot access NodeList in JScriptTo: NULL Date: 10/5/2004 8:53:00 AM Martin Honnen <mahotrash@y...> wrote in message news:<OajxXX7pEHA.3520@T...>... > Pat Buxton wrote: > > > I'm attempting to convert some old xsl documents so I can use the > > XSLTransform object in .NET and have been replacing the old xsl:eval > > tag with xsl:value-of. I can't seem to access the mode passed though > > if I use "." or current(). The old xsl:eval used to pass "this". Can > > anyone help please?? > > The documentation lists the .NET types arguments passed from XSLT to > script have: > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemXmlXslXslTransformClassTopic.asp > > An XSLT/XPath node set passed to a script function has the type > System.Xml.XPath.XPathNodeIterator > so there is no NodeList available but instead a subclass of that > abstract class XPathNodeIterator and you need to use the properties > (like Current) and methods (like MoveNext()) of that class. I have done this and it now works great as long as I use the XSLTransform object in .NET to transform the xml. If I enter the stylesheet processing instruction into the xml, pointing at the stylesheet, when I open the xml in IE 6, it gives me a scripting error, assigning null eg. function DoSomething(xpNodeIt) { var xpNav=xpNodeIt.Current; // works fine in Transform, assigns null in Browser return ""; } Am I missing something obvious | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
