protected int _documentRoot ( int nodeIdentifier ) { if ( nodeIdentifier == NULL ) return NULL ; for ( int parent = _parent ( nodeIdentifier ) ; parent != NULL ; nodeIdentifier = parent , parent = _parent ( nodeIdentifier ) ) ; return nodeIdentifier ; }
Given a node identifier find the owning document node . Unlike the DOM this considers the owningDocument of a Document to be itself . Note that in shared DTMs this may not be zero .