protected void isElementWellFormed ( Node node ) { boolean isNameWF = false ; if ( ( fFeatures & NAMESPACES ) != 0 ) { isNameWF = isValidQName ( node . getPrefix ( ) , node . getLocalName ( ) , fIsXMLVersion11 ) ; } else { isNameWF = isXMLName ( node . getNodeName ( ) , fIsXMLVersion11 ) ; } if ( ! isNameWF ) { String msg = Utils . messages . createMessage ( MsgKey . ER_WF_INVALID_CHARACTER_IN_NODE_NAME , new Object [ ] { "Element" , node . getNodeName ( ) } ) ; if ( fErrorHandler != null ) { fErrorHandler . handleError ( new DOMErrorImpl ( DOMError . SEVERITY_FATAL_ERROR , msg , MsgKey . ER_WF_INVALID_CHARACTER_IN_NODE_NAME , null , null , null ) ) ; } } }
Checks if an element node is well - formed by checking its Name for well - formedness .