Oleg,
Thanks, I did try this but since my XML has a namespace I could not figure
out how to set the XsltContext for the query. Below is the code I am using.
//props is XmlNode
XPathNavigator nav = props.CreateNavigator();
XsltArgumentList args = new XsltArgumentList();
args.AddParam("properties", "", nav.Select("/FE:Properties"));
The .Select() method throws an exception 'Namespace Manager or XsltContext
needed. This query has a prefix,
variable, or user-defined function'. The XmlNode's XmlDocument has the
correct context set, so props.SelectSingleNode("/FE:Properties") does work.
I have tried to use the second param in AddParam but I do not think this
does what I need.
Tim
"Oleg Tkachenko [MVP]" <oleg@NO!SPAM!PLEASEtkachenko.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Tim Menninger wrote:
I have seen the postings about passing XML into an XSL transformation.
The problem is that I cannot use any XPath navigation in the XSL that won't
generate an error. If I use <xsl:copy-of select="$var"/> then the XML is
output into the html page but this <xsl:copy-of
select="$var/NS:Child"/>, and all other XPath navigation, fails with the error that 'The
expression passed to this method should result in a NodeSet'. The real goal is to
use xsl:for-each to navigate over all $var's children but can't get it to
work.
You must be passing XPathNavigator to XSLT?
You have to pass XPathNodeIterator to be able to work with it as with
nodeset in XSLT.
XPathNavigator is RTF in XSLT, XPathNodeIterator - nodeset.
--
Oleg Tkachenko [XML MVP, XmlInsider]
http://blog.tkachenko.com