code: void initXmlReader() throws SAXException {
          if (parserMap.containsKey(ATTR_FORMAT_VALUE_DITA)) {
              reader = XMLReaderFactory.createXMLReader(parserMap.get(ATTR_FORMAT_VALUE_DITA));
              final Map<String, Boolean> features = parserFeatures.getOrDefault(ATTR_FORMAT_VALUE_DITA, emptyMap());
              for (final Map.Entry<String, Boolean> feature : features.entrySet()) {
                  try {
                      reader.setFeature(feature.getKey(), feature.getValue());
                  } catch (final SAXNotRecognizedException e) {
                      // Not Xerces, ignore exception
                  }
              }
          } else {
              reader = XMLUtils.getXMLReader();
          }
  
          reader.setFeature(FEATURE_NAMESPACE_PREFIX, true);
          if (validate) {
              reader.setFeature(FEATURE_VALIDATION, true);
              try {
                  reader.setFeature(FEATURE_VALIDATION_SCHEMA, true);
              } catch (final SAXNotRecognizedException e) {
                  // Not Xerces, ignore exception
              }
          }
          if (gramcache) {
              final XMLGrammarPool grammarPool = GrammarPoolManager.getGrammarPool();
              try {
                  reader.setProperty(FEATURE_GRAMMAR_POOL, grammarPool);
                  logger.info("Using Xerces grammar pool for DTD and schema caching.");
              } catch (final NoClassDefFoundError e) {
                  logger.debug("Xerces not available, not using grammar caching");
              } catch (final SAXNotRecognizedException | SAXNotSupportedException e) {
                  logger.warn("Failed to set Xerces grammar pool for parser: " + e.getMessage());
              }
          }
  
          CatalogUtils.setDitaDir(ditaDir);
          reader.setEntityResolver(CatalogUtils.getCatalogResolver());
      }
docs: XML reader used for pipeline parsing DITA documents.
  
  @throws SAXException if parser configuration failed