question: private void insertProsodySettings ( Utterance utterance , Element element ) { Element prosody = ( Element ) DomUtils . getAncestor ( element , MaryXML . PROSODY ) ; if ( prosody == null ) { return ; } Element voice = ( Element ) DomUtils . getAncestor ( element , MaryXML . VOICE ) ; if ( voice != null && DomUtils . isAncestor ( prosody , voice ) ) { return ; } Element paragraph = ( Element ) DomUtils . getAncestor ( element , MaryXML . PARAGRAPH ) ; if ( paragraph != null && DomUtils . isAncestor ( prosody , paragraph ) ) { return ; } for ( String att : PROSODY_ATTRIBUTES ) { String val = prosody . getAttribute ( att ) ; if ( ! val . equals ( "" ) ) { utterance . setString ( att , val ) ; } } }
target:  For a given element, extract essential settings defined by the closest ancestor prosody element and save them into the Utterance. Note that prosody settings outside of a paragraph or voice element, are not to be stored here, since they are dealt with elsewhere or are not relevant.