public void toplevel(NodeInfo element) {
    if (!myIsInitialized) {
      myIsInitialized = true;

      final Properties properties = myController.getOutputProperties();
      final String method = properties.getProperty(OutputKeys.METHOD);
      if (method == null || "xml".equals(method) || "html".equals(method)) {
        try {
          final Emitter emitter = myController.getOutputter().getEmitter();
          final GeneralOutputter outputter = new TracingOutputter(emitter, myController.getNamePool());

          final Field fOutputter = Controller.class.getDeclaredField("currentOutputter");
          fOutputter.setAccessible(true);
          fOutputter.set(myController, outputter);
        } catch (Exception e1) {
          System.err.println("Failed to change output emitter");
          e1.printStackTrace();
        }
      }
    }

    if (TRACE) {
      StyleElement e = (StyleElement)element;
      trace("<Top-level element=\"" + e.getDisplayName() + "\" line=\"" + e.getLineNumber() +
            "\" file=\"" + e.getSystemId() + "\" precedence=\"" + e.getPrecedence() + "\"/>");
    }
  }
public void toplevel(NodeInfo element)