<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Data Connections</title><link>https://www.infopathdev.com:443/forums/44.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Filter secondary data based on primary data values</title><link>https://www.infopathdev.com:443/forums/thread/40897.aspx</link><pubDate>Thu, 23 Apr 2009 07:24:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40897</guid><dc:creator>Moumst</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40897.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=40897</wfw:commentRss><description>&lt;p&gt;Hi there,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Is it possible to use the xdXDocument extension in&amp;nbsp;XPathExpression within managed code function.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Let&amp;#39;s say I need to extract some secondary data values for a specific treatment based on values contained in primary data source. In fact I need to get the same values I have in a given dropdown list box to populate&amp;nbsp;a reapeating table.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Here is my problem:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;DataSource dsPostes = DataSources[&amp;quot;Secondary DataSource&amp;quot;];&lt;br /&gt;XPathNavigator navPostes = dsPostes.CreateNavigator();&lt;br /&gt;XPathNodeIterator listePostesEquipement = navPostes.Select(&amp;quot;/dfs:myFields/dfs:dataFields/tns:GetAllDataResponse/tns:GetAllDataResult/ns1:Equipement/ns1:Poste[../ns1:Equipement = &lt;strong&gt;xdXDocument:get-DOM()&lt;/strong&gt;/my:OrdreManoeuvre/my:ListeElementReseau/my:ElementRéseau]&amp;quot;, NamespaceManager);&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;In other terms this is what I have in my combobox source data. But when I execute this query in managed code the xdXDocument is not present in the XsltContext. How can I access nodes of another datasource in my query? my:ListeElementReseau is a repeating field.&lt;/p&gt;
&lt;p&gt;If it is not possible I will query the primary data source and loop through the repeating field values to query x times the secondary datasource. But if I can make the xdXdocument extension to work it will be more elegent ;)&lt;/p&gt;
&lt;p&gt;I will appreciate any accurate answer ;)&lt;/p&gt;</description></item></channel></rss>