}
case Node.PROCESSING_INSTRUCTION_NODE: {
//do the well-formed valid PI target name , data check when application has set the value of well-formed feature to true
if (fDocument.errorChecking && (fConfiguration.features & DOMConfigurationImpl.WELLFORMED) != 0 ) {
ProcessingInstruction pinode = (ProcessingInstruction)node ;
String target = pinode.getTarget();
//1.check PI target name
if(fDocument.isXML11Version()){
wellformed = XML11Char.isXML11ValidName(target);
}
else{
wellformed = XMLChar.isValidName(target);
}
if (!wellformed) {
String msg = DOMMessageFormatter.formatMessage(
DOMMessageFormatter.DOM_DOMAIN,
"wf-invalid-character-in-node-name",
new Object[]{"Element", node.getNodeName()});
reportDOMError(fErrorHandler, fError, fLocator, msg, DOMError.SEVERITY_ERROR,
"wf-invalid-character-in-node-name");
}
//2. check PI data
//processing isntruction data may have certain characters
//which may not be valid XML character
isXMLCharWF(fErrorHandler, fError, fLocator, pinode.getData(), fDocument.isXML11Version());
}
if (fValidationHandler != null) {
// Don't bother filling an XMLString with the data section of the
// processing instruction. We only send the processing instruction