Oleg thanks for the quick response,
I got it working but not really the way I wanted. If you could answer the
namespace question that would be great. This is what I changed
XPathNavigator nav = props.CreateNavigator();
XsltArgumentList args = new XsltArgumentList();
args.AddParam("properties", "", nav.Select("./*")); //changed this to no
namespace XPath
Then used <xsl:for-each select="$properties"> to output rows
Thanks,
Tim
"Tim Menninger" <tmenninger@forensicsexplorers.com> wrote in message
news:%2397Q9R6$DHA.2180@TK2MSFTNGP09.phx.gbl...[color=blue]
> 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[/color]
using.[color=blue]
>
> //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[/color]
work.[color=blue]
>
> 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:%23JGjQ45$DHA.1288@TK2MSFTNGP10.phx.gbl...[color=green]
> > Tim Menninger wrote:
> >[color=darkred]
> > > I have seen the postings about passing XML into an XSL transformation.[/color][/color]
> The[color=green][color=darkred]
> > > problem is that I cannot use any XPath navigation in the XSL that[/color][/color][/color]
won't[color=blue][color=green][color=darkred]
> > > generate an error. If I use <xsl:copy-of select="$var"/> then the XML[/color][/color][/color]
is[color=blue][color=green][color=darkred]
> > > output into the html page but this <xsl:copy-of[/color][/color]
> select="$var/NS:Child"/>,[color=green][color=darkred]
> > > and all other XPath navigation, fails with the error that 'The[/color][/color]
> expression[color=green][color=darkred]
> > > passed to this method should result in a NodeSet'. The real goal is to[/color][/color]
> use[color=green][color=darkred]
> > > xsl:for-each to navigate over all $var's children but can't get it to[/color][/color]
> work.[color=green]
> >
> > 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[/color]
>
>[/color]