protected function getIDs( \DOMDocument $dom_doc, $tag = 'footnoteReference', $attr = 'w:id' ) {
		$fn_ids = [];
		$doc_elem = $dom_doc->documentElement;

		$tags_fn_ref = $doc_elem->getElementsByTagName( $tag );

		// if footnotes are in the document, get the ids
		if ( $tags_fn_ref->length > 0 ) {
			foreach ( $tags_fn_ref as $id ) {
				/** @var \DOMElement $id */
				if ( '' !== $id->getAttribute( $attr ) ) { // don't add if its empty
					$fn_ids[] = $id->getAttribute( $attr );
				}
			}
		}

		return $fn_ids;
	}