protected boolean checkSpecialPosition(Element currentRulePart,String specialPositionType){
  NamedNodeMap attNodes=currentRulePart.getAttributes();
  for (int z=0; z < attNodes.getLength(); z++) {
    Node el=attNodes.item(z);
    String currentAtt=el.getNodeName();
    String currentVal=el.getNodeValue();
    if (currentAtt.equals("type")) {
      if (!currentVal.startsWith("!")) {
        if (!specialPositionType.equals(currentVal))         return false;
      }
 else {
        currentVal=currentVal.substring(1,currentVal.length());
        if (specialPositionType.equals(currentVal))         return false;
      }
    }
  }
  return true;
}

protected boolean checkSpecialPosition ( Element currentRulePart , String specialPositionType ) { NamedNodeMap attNodes = currentRulePart . getAttributes ( ) ; for ( int z = 0 ; z < attNodes . getLength ( ) ; z ++ ) { Node el = attNodes . item ( z ) ; String currentAtt = el . getNodeName ( ) ; String currentVal = el . getNodeValue ( ) ; if ( currentAtt . equals ( "type" ) ) { if ( ! currentVal . startsWith ( "!" ) ) { if ( ! specialPositionType . equals ( currentVal ) ) return false ; } else { currentVal = currentVal . substring ( 1 , currentVal . length ( ) ) ; if ( specialPositionType . equals ( currentVal ) ) return false ; } } } return true ; }
checks rule part with tag " specialposition " ; there is only the " type " attribute right now : checks if specialposition value of a token is the same as the value of the type attribute in the rule ; values : endofvorfeld , endofpar ( end of paragraph )
