private void addTextTo(Template template, XmlTag rootTag) {
    String schemaPrefix = rootTag.getPrefixByNamespace(XmlUtil.XML_SCHEMA_URI);
    if (schemaPrefix == null) schemaPrefix = "";
    if (!schemaPrefix.isEmpty()) schemaPrefix += ":";

    template.addTextSegment(
      "<" + schemaPrefix + myDeclarationTagName + " name=\"" + XmlUtil.findLocalNameByQualifiedName(myRef.getCanonicalText()) + "\">"
    );
    template.addEndVariable();
    template.addTextSegment(
      "</" + schemaPrefix + myDeclarationTagName + ">\n"
    );
    template.setToReformat(true);
  }
private void addTextTo(Template template, XmlTag rootTag)