<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Multi-attribute unique entries Preceding-Sibling</title><link>https://www.infopathdev.com:443/forums/thread/25139.aspx</link><pubDate>Sat, 15 Dec 2007 00:25:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25139</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25139.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25139</wfw:commentRss><description>&lt;p&gt;By the way, did this solve the problem?&lt;/p&gt;</description></item><item><title>Re: Multi-attribute unique entries Preceding-Sibling</title><link>https://www.infopathdev.com:443/forums/thread/25138.aspx</link><pubDate>Sat, 15 Dec 2007 00:25:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25138</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25138.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25138</wfw:commentRss><description>&lt;p&gt;Hi Justin... thanks for posting this for us.&lt;/p&gt;</description></item><item><title>Multi-attribute unique entries Preceding-Sibling</title><link>https://www.infopathdev.com:443/forums/thread/25126.aspx</link><pubDate>Fri, 14 Dec 2007 16:18:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25126</guid><dc:creator>justindevine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25126.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25126</wfw:commentRss><description>&lt;p&gt;I have read this post 
&lt;a href="http://www.infopathdev.com/blogs/greg/archive/2005/06/08/Display-Only-Unique-Options-in-a-List.aspx" title="http://www.infopathdev.com/blogs/greg/archive/2005/06/08/Display-Only-Unique-Options-in-a-List.aspx" target="_blank"&gt;http://www.infopathdev.com/blogs/greg/archive/2005/06/08/Display-Only-Unique-Options-in-a-List.aspx&lt;/a&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;I am doing something similar using a filter directly on the listbox. 
This Listbox is populated by the XMLDATA from a SharePoint List. The following 
is my filter. &lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;not(@ows_LinkTitle = preceding-sibling::z:row/@ows_LinkTitle)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Basically it filters out for unique entries. Here&amp;#39;s the problem, I now want to add another filter condition, what I have discovered is that if the first qualifying node is filtered out using this additional filter then it does not appear at all, even though there are subsequent entries.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;My goal is to enhance this filter to work with a subset of nodes, so while now it is getting the first node for each unique ows_LinkTitle I would like to get only the first ows_LinkTitle node where another attribute is equal to x i have tried variations of the following.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;not(@ows_LinkTitle[@ows_EventCancelled=&amp;quot;0&amp;quot;] = preceding-sibling::z:row/@ows_LinkTitle[@ows_EventCancelled=&amp;quot;0&amp;quot;])&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;I guess my inability to do this comes from not knowing how to reference an attribute filtered by atributes of the same node.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Can you help me out? &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Below was Greg&amp;#39;s reply&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; Hi Justin,&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;XML Nodes are one of three types: Root, Branch or Leaf. The root has no ancestor, just descendants. The branch has both an ancestor and descendants. A leaf had an ancestor, but no descendants.&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;An attribute is always a leaf node. So in your example below, you are attempting to access an attribute of an attribute -- which can never exist. You need to take a step back to the parent element of the attribute, and then get to the sibling attribute using &amp;quot;../&amp;quot;.&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;While the following change may not work in your scenario, it at least corrects that issue:&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;not(@ows_LinkTitle[../@ows_EventCancelled=&amp;quot;0&amp;quot;] = preceding-sibling::z:row/@ows_LinkTitle[../@ows_EventCancelled=&amp;quot;0&amp;quot;])&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;If this still doesn&amp;#39;t work, try this:&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;not(@ows_LinkTitle = preceding-sibling::z:row/@ows_LinkTitle[../@ows_EventCancelled=&amp;quot;0&amp;quot;])&lt;/p&gt;</description></item></channel></rss>