code: private boolean isNsAware(Element mathNode) {
          Field field;
          Document document = mathNode.getOwnerDocument();
          try {
              field = document.getClass().getDeclaredField("fNamespacesEnabled");
              field.setAccessible(true);
              return (boolean) field.get(document);
          } catch (NoSuchFieldException | IllegalAccessException e) {
              logger.debug("Possible performance issue: Can not determine if node document is namespace aware.", e);
              return false;
          }
      }
docs: Guesses if the Node is in a namespace aware document.
  <p>
  Implementation Note: Unfortunately this information (about the parser) is lost after parsing.
  However, the  DeferredDocumentImpl fortunately caches parser.getNamespaces().
  
  @param mathNode
  @return