Okay, as best as I can figure out, from what you've provided me (assuming I understand correctly), you have:
DD1 is bound to [AccessDB]/myFields/dataFields/d:Register/Element
DD2 is bound to [AccessDB]/myFields/dataFields/d:Register/Task
where d:Register is a repeating node.
Then you populate DD1 from the XML file using the XPath dataFields/Register/@Element
And you populate DD2 from the same XML file using the XPath dataFields/Register/Task (using @id and @Value as the value and display name)
You want DD2 to only show those Tasks for which the ../Register/@Element is the same as the selected Element (namely [AccessDB]/myFields/dataFields/d:Register/Element)
Because you are in a repeating structure, you WILL need to use the current() function. BUT!! You must know what node current() refers to in order for this to work properly. In this case, it appears that current() is equivelant to the same node that DD2 is bound to (namely [AccessDB]/myFields/dataFields/d:Register/Task)
So your XPath, including the filter (in '[]') for DD2 would look something like:
dataFields/Register/Task[../@Element = current()/../Element]
So then, you are comparing the attribute @Element on the parent node to Task, which is Register, to the selected value in node Element in the Main DOM, on the current row, which is (starting from the 'current()' node of Task) ../Element. Note the ".." gets you back to the current Register node, and then from there, go to the Element node.
You would select the left-side comparison (../@Element) as you normally do in your filter dialog, and then use a formula to type in the right-side comparison (current()/../Element).
Greg Collins [InfoPath MVP]
InfoPath Dev