docs: public void scanTemplates(LineNumberReader reader)
      {
          try {
              String string;
              boolean bTemplate = false;
              while ((string = reader.readLine()) != null)
              {
                  if (string.indexOf("<xsl:template ") != -1)
                      bTemplate = true;
                  if (bTemplate)
                  {
                      int iStart = string.indexOf("match=\"") + 7;
                      int iEnd = string.indexOf('\"', iStart);
                      if (iStart != 6)
                          if (iEnd != -1)
                          {
                              String strMatch = string.substring(iStart, iEnd);
                              this.addMatch(strMatch, false);
                          }               
                      iStart = string.indexOf("name=\"") + 6;
                      iEnd = string.indexOf('\"', iStart);
                      if (iStart != 5)
                          if (iEnd != -1)
                          {
                              String strName = string.substring(iStart, iEnd);
                              this.addName(strName, false);
                          }               
                  }
                  if (string.indexOf(">") != -1)
                      bTemplate = false;
              }
          } catch (FileNotFoundException ex)  {
              ex.printStackTrace();
          } catch (IOException ex)    {
              ex.printStackTrace();
          }
      }