private static void useSourceInfoForNewQName ( Node newQName , Node basisNode ) { if ( newQName . getStaticSourceFile ( ) == null ) { newQName . setStaticSourceFileFrom ( basisNode ) ; newQName . setSourceEncodedPosition ( basisNode . getSourcePosition ( ) ) ; } if ( newQName . getOriginalName ( ) == null ) { newQName . putProp ( Node . ORIGINALNAME_PROP , basisNode . getOriginalName ( ) ) ; } for ( Node child = newQName . getFirstChild ( ) ; child != null ; child = child . getNext ( ) ) { useSourceInfoForNewQName ( child , basisNode ) ; } }
Custom update new QName node with source info from another node .