public static void htmlWriteExplanationResponsePage(String modulename, String query, org.powerloom.PrintableStringWriter stream) {
    { Module module = Stella.getStellaModule(modulename, false);

      if (module == null) {
        OntosaurusUtil.htmlUnknownModuleResponse(OntosaurusUtil.KWD_RELATION, query, modulename, stream);
        return;
      }
      { Module mdl000 = module;
        Context cxt000 = mdl000;

        if (mdl000 == null) {
          mdl000 = ((Module)(Stella.$MODULE$.get()));
          cxt000 = ((Context)(Stella.$CONTEXT$.get()));
        }
        { Object old$Module$000 = Stella.$MODULE$.get();
          Object old$Context$000 = Stella.$CONTEXT$.get();

          try {
            Native.setSpecial(Stella.$MODULE$, mdl000);
            Native.setSpecial(Stella.$CONTEXT$, cxt000);
            synchronized (Logic.$POWERLOOM_LOCK$) {
              { Object old$RecordJustificationsP$000 = Logic.$RECORD_JUSTIFICATIONSp$.get();

                try {
                  Native.setBooleanSpecial(Logic.$RECORD_JUSTIFICATIONSp$, true);
                  { QueryIterator queryiterator = Logic.createAskQuery(Cons.cons(Stella.readSExpressionFromString(query), Stella.NIL));
                    OutputStringStream explanation = OutputStringStream.newOutputStringStream();
                    Justification justification = null;

                    Logic.callAsk(queryiterator);
                    justification = ((Justification)(KeyValueList.dynamicSlotValue(queryiterator.baseControlFrame.dynamicSlots, OntosaurusUtil.SYM_LOGIC_JUSTIFICATION, null)));
                    { Object old$ExplanationFormat$000 = Logic.$EXPLANATION_FORMAT$.get();
                      Object old$ExplanationAudience$000 = Logic.$EXPLANATION_AUDIENCE$.get();
                      Object old$LogicDialect$000 = Logic.$LOGIC_DIALECT$.get();

                      try {
                        Native.setSpecial(Logic.$EXPLANATION_FORMAT$, OntosaurusUtil.KWD_HTML);
                        Native.setSpecial(Logic.$EXPLANATION_AUDIENCE$, OntosaurusUtil.KWD_LAY);
                        Native.setSpecial(Logic.$LOGIC_DIALECT$, OntosaurusUtil.KWD_KIF_ONTOSAURUS);
                        Justification.printExplanation(justification, explanation, null, 4, ((Keyword)(Logic.$EXPLANATION_AUDIENCE$.get())));

                      } finally {
                        Logic.$LOGIC_DIALECT$.set(old$LogicDialect$000);
                        Logic.$EXPLANATION_AUDIENCE$.set(old$ExplanationAudience$000);
                        Logic.$EXPLANATION_FORMAT$.set(old$ExplanationFormat$000);
                      }
                    }
                    { String tag012 = OntosaurusUtil.makeHtmlBodyTag("FFFFFF");

                      stream.print("<" + tag012 + ">");
                      stream.println(explanation.theStringReader());
                      stream.println("</" + Native.string_subsequence(tag012, 0, Native.string_position(tag012, ' ', 0)) + ">");
                    }
                  }

                } finally {
                  Logic.$RECORD_JUSTIFICATIONSp$.set(old$RecordJustificationsP$000);
                }
              }
            }

          } finally {
            Stella.$CONTEXT$.set(old$Context$000);
            Stella.$MODULE$.set(old$Module$000);
          }
        }
      }
    }
  }