docs: private void isolateNextStep(String selector,
                                 int start,
                                 StepProperties stepProperties) 
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        tc.entry(cclass,
                 "isolateNextStep",
                 "selector: " + selector + ", start: " + start);    
      int end = -1;
  
      boolean wrapWholeStep = false;
  
      String subSelector = selector.substring(start);
      char[] chars = subSelector.toCharArray();
  
      // Is a full stop acceptable - at this stage in processing we should only
      // have decimal points left. Might want to stop testing this.
      boolean acceptDot = false;
      // If we locate a * we assume that we'll need to wrap the whole location step. We
      // cannot currently distinguish between single levelwildcards and multiplication signs.
      boolean acceptStar = true;
      // becomes false on non-separator, true on separator
      boolean acceptOrdinary = true;
      // becomes true on separator
      boolean prevSeparator = true;
  
      // Square bracket related
      boolean acceptOpenBracket = true;
      boolean acceptCloseBracket = false;
      int openBracketCount = 0;
      
      boolean acceptOpenRoundBracket = false;
      boolean acceptCloseRoundBracket = false;
      int openRoundBracketCount = 0;
      //boolean withinPredicate = false;
      boolean maybeIntegerPredicate = false;
      
      // Process the string character by character
      try
      {
        int subSelectorLength = chars.length;
        for (int i = 0; i < subSelectorLength; i++)
        {
          char cand = chars[i];
   
          // First lets attempt to catch the case where we have a position predicate 
          if(openBracketCount > 0 && maybeIntegerPredicate)
          {
            // If we're in a predicate check to see if its integral
            if(!Character.isDigit(cand) &&  cand != ']')
            {
              maybeIntegerPredicate = false;
            }
          }
        
          if (cand == MatchSpace.SUBTOPIC_MATCHONE_CHAR)
          {
            if (acceptStar)
            {
              wrapWholeStep = true;
              acceptStar = false;
              //acceptOrdinary = false;
              acceptDot = false;
              prevSeparator = false;
            }
            else
            {
              throw new QuerySyntaxException("Wilcard error: " + subSelector + ", at: " + (i+1));
            }
          }
          else if (cand == MatchSpace.SUBTOPIC_STOP_CHAR)
          {
            if (acceptDot)
            {
              if(prevSeparator)
              {
                acceptOrdinary = false;
              }
              else
              {
                acceptOrdinary = true;
              }
              acceptStar = prevSeparator = false;
            }
            else
            {
              throw new QuerySyntaxException("Dot error: " + subSelector + ", at: " + (i+1));
            }
          }
          else if (cand == MatchSpace.SUBTOPIC_SEPARATOR_CHAR)
          {
            // Key bit of code here
            // Is the separator within brackets? Is it part of a wildcard? or have
            // we determined the  end of a location step?
            if(openBracketCount == 0 && openRoundBracketCount == 0)
            {
              // This is the end of the location step
              end = i;
              break;
            }
            acceptStar=true;
            acceptOrdinary = true;
            acceptDot = true;
            prevSeparator = true;
          }
          else if( cand == '[')
          {
            if (acceptOpenBracket)
            {
              // Start of a predicate
              acceptStar = true;
              acceptOrdinary = true;
              prevSeparator = false;
              acceptDot = true;
              openBracketCount++;
              // Check for nested predicates
              if(openBracketCount>1)
              {
                wrapWholeStep = true;
              }
              //acceptOpenBracket = false;
              acceptCloseBracket = true;
              acceptOpenRoundBracket = true;
              maybeIntegerPredicate = true;
            }
            else
            {
              throw new QuerySyntaxException("Open Bracket error: " + subSelector + ", at: " + (i+1));
            }
          }
          else if( cand == ']')
          {
            if (acceptCloseBracket)
            {
              // End of a predicate
              acceptStar = true;
              acceptOrdinary = true;
              prevSeparator = false;
              acceptDot = true;
              acceptOpenBracket = true;
              openBracketCount--;
              if(openBracketCount < 0)
              {
                throw new QuerySyntaxException("Bracket error: " + subSelector + ", at: " + (i+1));
              }            
              //acceptCloseBracket = false;
              // Test to see whether the predicate was entirely numeric
              // Looking for department[2], etc
              if(maybeIntegerPredicate)
              {
                maybeIntegerPredicate = false;
                wrapWholeStep = true;
              }
            }
            else
            {
              throw new QuerySyntaxException("Close Bracket error: " + subSelector + ", at: " + (i+1));
            }
          }
          else if( cand == '(')
          {
            if (acceptOpenRoundBracket)
            {
              // A function
              wrapWholeStep = true;
              acceptStar = true;
              acceptOrdinary = true;
              prevSeparator = false;
              acceptDot = true;
              acceptOpenRoundBracket = false;
              acceptCloseRoundBracket = true;
              openRoundBracketCount++;
            }
            else
            {
              throw new QuerySyntaxException("Open Round Bracket error: " + subSelector + ", at: " + (i+1));
            }
          }
          else if( cand == ')')
          {
            if (acceptCloseRoundBracket)
            {
              // End of a predicate
              acceptStar = true;
              acceptOrdinary = true;
              prevSeparator = false;
              acceptDot = true;
              acceptOpenRoundBracket = true;
              acceptCloseRoundBracket = false;
              openRoundBracketCount--;
            }
            else
            {
              throw new QuerySyntaxException("Close Round Bracket error: " + subSelector + ", at: " + (i+1));
            }
          }      
          else // Ordinary character
          {
            if (acceptOrdinary)
            {
              acceptStar = true;
              prevSeparator = false;
              acceptDot = true;
              acceptOpenRoundBracket = true;
            }
            else
            {
              throw new QuerySyntaxException("Character error: " + subSelector + ", at: " + (i+1));
            }
          }
        }
        
        // Finished processing char by char, did the brackets pair up ok?
        if(openBracketCount != 0)
        {
          throw new QuerySyntaxException("Matching Bracket error: " + subSelector + ", non-matching square brackets");
        }      
      }
      catch (QuerySyntaxException qex)
      {
        // No FFDC Code Needed.
        // FFDC driven by wrapper class.
        // This signals that the character parsing encountered a problem, we FFDC
        // but continue processing
        FFDC.processException(cclass,
          "com.ibm.ws.sib.matchspace.selector.impl.XPath10ParserImpl",
          qex,
          "1:1377:1.16");
   
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
          tc.debug(this,cclass, "isolateNextStep", qex);         
      }
      
      // Set the StepProperties
      if(wrapWholeStep)
        stepProperties.wrapStep = true;
      else
        stepProperties.wrapStep = false;
      
      // Set the end of step value
      if(end == -1)
        stepProperties.endOfStep = -1;
      else
      {
        stepProperties.endOfStep = end+start;
      }
      
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        tc.exit(this,cclass, "isolateNextStep");     
    }