This line would suggest the the above for-each should select *"$content//cwrc/workflow"* as the *test* is checking for a attribute that only belongs to a workflow element and not it's children. What should this be doing?