code: public boolean parseUnrecognizedElement(final Element element,
                                              final Properties props)
              throws Exception {
          if (XSLT_NS.equals(element.getNamespaceURI()) ||
                  element.getNodeName().indexOf("transform") != -1 ||
                  element.getNodeName().indexOf("stylesheet") != -1) {
              //
              //   DOMConfigurator typically not namespace aware
              //     serialize tree and reparse.
              ByteArrayOutputStream os = new ByteArrayOutputStream();
              DOMSource source = new DOMSource(element);
              TransformerFactory transformerFactory = TransformerFactory.newInstance();
              Transformer transformer = transformerFactory.newTransformer();
              transformer.transform(source, new StreamResult(os));
  
              ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());
              DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
              domFactory.setNamespaceAware(true);
              Document xsltdoc = domFactory.newDocumentBuilder().parse(is);
              setTransform(xsltdoc);
              return true;
          }
          return false;
      }
docs: {@inheritDoc}