@Test public void xincludeParserNoBaseURIFixup() throws SAXException { SAXParser parser = XMLParserUtils.createXIncludeAwareSAXParser(false); assertNotNull(parser); XMLReader reader = parser.getXMLReader(); reader.setFeature("http: boolean baseURIFixup = reader .getFeature(Constants.XERCES_FEATURE_PREFIX + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE); assertFalse("Expected feature to be false: " + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE, baseURIFixup); }
public static SAXParser createXIncludeAwareSAXParser(boolean doBaseURIFixup) { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setXIncludeAware(true); SAXParser parser = null; try { factory.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE, doBaseURIFixup); parser = factory.newSAXParser(); } catch (Exception x) { throw new RuntimeException(x); } return parser; }
XMLParserUtils { public static SAXParser createXIncludeAwareSAXParser(boolean doBaseURIFixup) { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setXIncludeAware(true); SAXParser parser = null; try { factory.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE, doBaseURIFixup); parser = factory.newSAXParser(); } catch (Exception x) { throw new RuntimeException(x); } return parser; } }
XMLParserUtils { public static SAXParser createXIncludeAwareSAXParser(boolean doBaseURIFixup) { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setXIncludeAware(true); SAXParser parser = null; try { factory.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE, doBaseURIFixup); parser = factory.newSAXParser(); } catch (Exception x) { throw new RuntimeException(x); } return parser; } private  XMLParserUtils(); }
XMLParserUtils { public static SAXParser createXIncludeAwareSAXParser(boolean doBaseURIFixup) { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setXIncludeAware(true); SAXParser parser = null; try { factory.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE, doBaseURIFixup); parser = factory.newSAXParser(); } catch (Exception x) { throw new RuntimeException(x); } return parser; } private  XMLParserUtils(); static SAXParser createXIncludeAwareSAXParser(boolean doBaseURIFixup); }
XMLParserUtils { public static SAXParser createXIncludeAwareSAXParser(boolean doBaseURIFixup) { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); factory.setXIncludeAware(true); SAXParser parser = null; try { factory.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE, doBaseURIFixup); parser = factory.newSAXParser(); } catch (Exception x) { throw new RuntimeException(x); } return parser; } private  XMLParserUtils(); static SAXParser createXIncludeAwareSAXParser(boolean doBaseURIFixup);  }