code: public static void parse(final URI baseURI, final OutputStream output)
              throws XIncludeFatalException
      {
          final Processor processor = XIncProcEngine.CONFIGURATION.getProcessor();
          final XMLFilter filter = XIncProcEngine.newXIncludeFilter(baseURI);
          final InputSource inputSource = new InputSource(baseURI.toASCIIString());
          try
          {
              final XMLReader xmlReader = SAXParserFactory.newInstance().newSAXParser().getXMLReader();
              filter.setParent(xmlReader);
              final SAXSource saxSource = new SAXSource(filter, inputSource);
              final XdmNode node = processor.newDocumentBuilder().wrap(saxSource);
              final Serializer serializer = processor.newSerializer(output);
              processor.writeXdmValue(node, serializer);
          }
          catch (final SAXException | SaxonApiException | ParserConfigurationException e)
          {
              throw new XIncludeFatalException(e);
          }
      }
docs: Statically parse an {@link URI}
  
  @param baseURI URI to be parsed
  @param output {@link OutputStream} will store result
  @throws XIncludeFatalException Fatal exception