@Override
  public FileIncludeInfo @NotNull [] getIncludeInfos(@NotNull FileContent content) {
    CharSequence contentAsText = content.getContentAsText();
    if (CharArrayUtil.indexOf(contentAsText, XmlUtil.XINCLUDE_URI, 0) == -1) {
      return FileIncludeInfo.EMPTY;
    }

    List<FileIncludeInfo> infos = new ArrayList<>();
    try {
      XMLStreamReader2 reader = StaxFactory.createXmlStreamReader(new CharSequenceReader(contentAsText));
      while (reader.hasNext()) {
        int next = reader.next();
        if (next == XMLStreamConstants.START_ELEMENT) {
          if (XmlUtil.XINCLUDE_URI.equals(reader.getNamespaceURI()) && "include".equals(reader.getLocalName())) {
            int attributeCount = reader.getAttributeCount();
            if (attributeCount > 0) {
              for (int i = 0; i < attributeCount; i++) {
                String localName = reader.getAttributeLocalName(i);
                if ("href".equals(localName)) {
                  infos.add(new FileIncludeInfo(reader.getAttributeValue(i)));
                }
              }
            }
          }
        }
      }
    }
    catch (XMLStreamException e) {
      // ignore
    }
    return infos.toArray(FileIncludeInfo.EMPTY);
  }
@Override
  public FileIncludeInfo @NotNull [] getIncludeInfos(@NotNull FileContent content)