private void postProcessSelectorTree ( Selector parsed , String fullPath ) throws InvalidXPathSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "postProcessSelectorTree" , "parsed: " + parsed + ", fullPath: " + fullPath ) ; // Walk the selector tree looking for Identifiers if ( parsed instanceof IdentifierImpl ) { IdentifierImpl parsedIdentifier = ( IdentifierImpl ) parsed ; String identName = parsedIdentifier . getName ( ) ; // Reinstate any ampersands and slashes that were removed prior to // parsing String newIdentName = replaceSubForSpecials ( identName ) ; if ( newIdentName != null ) { parsedIdentifier . setName ( newIdentName ) ; parsedIdentifier . setFullName ( fullPath + newIdentName ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) tc . debug ( this , cclass , "postProcessSelectorTree" , "Identifier name has been reset to: " + ( ( IdentifierImpl ) parsed ) . getName ( ) ) ; } else { // Set the full path name into the identifier parsedIdentifier . setFullName ( fullPath + identName ) ; } // Set the appropriate XPath parameters for this Identifier setXPathCharacteristics ( ( IdentifierImpl ) parsed ) ; } else if ( parsed instanceof OperatorImpl ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) tc . debug ( this , cclass , "postProcessSelectorTree" , parsed + " is an OperatorImpl" ) ; // Set the extended flag in the Operator parsed . setExtended ( ) ; postProcessOperands ( ( OperatorImpl ) parsed , fullPath ) ; } else if ( parsed instanceof LiteralImpl ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) tc . debug ( this , cclass , "postProcessSelectorTree" , parsed + " is an LiteralImpl" ) ; LiteralImpl literal = ( LiteralImpl ) parsed ; if ( literal . getType ( ) == Selector . STRING ) { // Reinstate any ampersands and slashes that were removed prior to // parsing String literalString = ( String ) literal . getValue ( ) ; String newLiteralString = replaceSubForSpecials ( literalString ) ; if ( newLiteralString != null ) { ( ( LiteralImpl ) parsed ) . value = newLiteralString ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) tc . debug ( this , cclass , "postProcessSelectorTree" , "Literal Value has been reset to: " + ( ( LiteralImpl ) parsed ) . getValue ( ) ) ; } } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) tc . debug ( this , cclass , "postProcessSelectorTree" , "No post processing can be done on: " + parsed ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . exit ( this , cclass , "postProcessSelectorTree" ) ; }
Handle special character substitution .