private static WstxInputSource sourceFromSS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, StreamSource ssrc) throws IOException, XMLStreamException { InputBootstrapper bs; Reader r = ssrc.getReader(); String pubId = ssrc.getPublicId(); String sysId0 = ssrc.getSystemId(); URL ctxt = (parent == null) ? null : parent.getSource(); URL url = (sysId0 == null || sysId0.length() == 0) ? null : URLUtil.urlFromSystemId(sysId0, ctxt); final SystemId systemId = SystemId.construct(sysId0, (url == null) ? ctxt : url); if (r == null) { InputStream in = ssrc.getInputStream(); if (in == null) { // Need to try just resolving the system id then if (url == null) { throw new IllegalArgumentException("Can not create Stax reader for a StreamSource -- neither reader, input stream nor system id was set."); } in = URLUtil.inputStreamFromURL(url); } bs = StreamBootstrapper.getInstance(pubId, systemId, in); } else { bs = ReaderBootstrapper.getInstance(pubId, systemId, r, null); } Reader r2 = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, systemId, xmlVersion, r2); }
r = bs.bootstrapInput(cfg, true, XmlConsts.XML_V_UNKNOWN); if (bs.declaredXml11()) { cfg.enableXml11(true);
Reader r = bs.bootstrapInput(rcfg, false, XmlConsts.XML_V_UNKNOWN); if (bs.declaredXml11()) { rcfg.enableXml11(true);
private static WstxInputSource sourceFromSS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, StreamSource ssrc) throws IOException, XMLStreamException { InputBootstrapper bs; Reader r = ssrc.getReader(); String pubId = ssrc.getPublicId(); String sysId = ssrc.getSystemId(); URL ctxt = (parent == null) ? null : parent.getSource(); URL url = (sysId == null || sysId.length() == 0) ? null : URLUtil.urlFromSystemId(sysId, ctxt); if (r == null) { InputStream in = ssrc.getInputStream(); if (in == null) { // Need to try just resolving the system id then if (url == null) { throw new IllegalArgumentException("Can not create StAX reader for a StreamSource -- neither reader, input stream nor system id was set."); } in = URLUtil.optimizedStreamFromURL(url); } bs = StreamBootstrapper.getInstance(in, pubId, sysId); } else { bs = ReaderBootstrapper.getInstance(r, pubId, sysId, null); } Reader r2 = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, sysId, xmlVersion, ((url == null) ? ctxt : url), r2); }
private static WstxInputSource sourceFromSS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, StreamSource ssrc) throws IOException, XMLStreamException { InputBootstrapper bs; Reader r = ssrc.getReader(); String pubId = ssrc.getPublicId(); String sysId0 = ssrc.getSystemId(); URL ctxt = (parent == null) ? null : parent.getSource(); URL url = (sysId0 == null || sysId0.length() == 0) ? null : URLUtil.urlFromSystemId(sysId0, ctxt); final SystemId systemId = SystemId.construct(sysId0, (url == null) ? ctxt : url); if (r == null) { InputStream in = ssrc.getInputStream(); if (in == null) { // Need to try just resolving the system id then if (url == null) { throw new IllegalArgumentException("Can not create Stax reader for a StreamSource -- neither reader, input stream nor system id was set."); } in = URLUtil.inputStreamFromURL(url); } bs = StreamBootstrapper.getInstance(pubId, systemId, in); } else { bs = ReaderBootstrapper.getInstance(pubId, systemId, r, null); } Reader r2 = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, systemId, xmlVersion, r2); }
private static WstxInputSource sourceFromSS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, StreamSource ssrc) throws IOException, XMLStreamException { InputBootstrapper bs; Reader r = ssrc.getReader(); String pubId = ssrc.getPublicId(); String sysId = ssrc.getSystemId(); URL ctxt = (parent == null) ? null : parent.getSource(); URL url = (sysId == null || sysId.length() == 0) ? null : URLUtil.urlFromSystemId(sysId, ctxt); if (r == null) { InputStream in = ssrc.getInputStream(); if (in == null) { // Need to try just resolving the system id then if (url == null) { throw new IllegalArgumentException("Can not create StAX reader for a StreamSource -- neither reader, input stream nor system id was set."); } in = URLUtil.optimizedStreamFromURL(url); } bs = StreamBootstrapper.getInstance(in, pubId, sysId); } else { bs = ReaderBootstrapper.getInstance(r, pubId, sysId, null); } Reader r2 = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, sysId, xmlVersion, ((url == null) ? ctxt : url), r2); }
private static WstxInputSource sourceFromSS(WstxInputSource parent, ReaderConfig cfg, String refName, int xmlVersion, StreamSource ssrc) throws IOException, XMLStreamException { InputBootstrapper bs; Reader r = ssrc.getReader(); String pubId = ssrc.getPublicId(); String sysId = ssrc.getSystemId(); URL ctxt = (parent == null) ? null : parent.getSource(); URL url = (sysId == null || sysId.length() == 0) ? null : URLUtil.urlFromSystemId(sysId, ctxt); if (r == null) { InputStream in = ssrc.getInputStream(); if (in == null) { // Need to try just resolving the system id then if (url == null) { throw new IllegalArgumentException("Can not create StAX reader for a StreamSource -- neither reader, input stream nor system id was set."); } in = URLUtil.optimizedStreamFromURL(url); } bs = StreamBootstrapper.getInstance(in, pubId, sysId); } else { bs = ReaderBootstrapper.getInstance(r, pubId, sysId, null); } Reader r2 = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, sysId, xmlVersion, ((url == null) ? ctxt : url), r2); }
Reader r2 = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, systemId, xmlVersion, r2);
Reader r2 = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, systemId, xmlVersion, r2);
Reader r2 = bs.bootstrapInput(cfg, false, xmlVersion); return InputSourceFactory.constructEntitySource (cfg, parent, refName, bs, pubId, systemId, xmlVersion, r2);
Reader r; try { r = bs.bootstrapInput(cfg, true, XmlConsts.XML_V_UNKNOWN); if (bs.declaredXml11()) { cfg.enableXml11(true);
Reader r; try { r = bs.bootstrapInput(cfg, true, XmlConsts.XML_V_UNKNOWN); if (bs.declaredXml11()) { cfg.enableXml11(true);
Reader r; try { r = bs.bootstrapInput(cfg, true, XmlConsts.XML_V_UNKNOWN); if (bs.declaredXml11()) { cfg.enableXml11(true);
Reader r = bs.bootstrapInput(rcfg, false, XmlConsts.XML_V_UNKNOWN); if (bs.declaredXml11()) { rcfg.enableXml11(true);
Reader r = bs.bootstrapInput(rcfg, false, XmlConsts.XML_V_UNKNOWN); if (bs.declaredXml11()) { rcfg.enableXml11(true);
Reader r = bs.bootstrapInput(rcfg, false, XmlConsts.XML_V_UNKNOWN); if (bs.declaredXml11()) { rcfg.enableXml11(true);
Reader r = bs.bootstrapInput(rcfg, false, XmlConsts.XML_V_UNKNOWN); if (bs.declaredXml11()) { rcfg.enableXml11(true);
Reader r = bs.bootstrapInput(rcfg, false, XmlConsts.XML_V_UNKNOWN); if (bs.declaredXml11()) { rcfg.enableXml11(true);
Reader r = bs.bootstrapInput(rcfg, false, XmlConsts.XML_V_UNKNOWN); if (bs.declaredXml11()) { rcfg.enableXml11(true);
Reader r = bs.bootstrapInput(rcfg, false, XmlConsts.XML_V_UNKNOWN); if (bs.declaredXml11()) { rcfg.enableXml11(true);