In
Code:
<careers dcr="foo">
<jobtitle>...</jobtitle>
</careers>
the 'careers' element is the parent element of the 'jobtitle' element.
And inside of your nested for-each the context node is a 'jobtitle' element where you can access the parent element with parent::careers and then its 'dcr' attribute with parent::careers/@dcr.