Java Code Examples for javax.xml.catalog.CatalogResolver#resolve()
The following examples show how to use
javax.xml.catalog.CatalogResolver#resolve() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CatalogTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider = "resolveUri") public void testMatch1(String cFile, String href, String expectedFile, String expectedUri, String msg) throws Exception { URI catalogFile = getClass().getResource(cFile).toURI(); CatalogResolver cur = CatalogManager.catalogResolver(CatalogFeatures.defaults(), catalogFile); Source source = cur.resolve(href, null); Assert.assertNotNull(source, "Source returned is null"); Assert.assertEquals(expectedUri, source.getSystemId(), msg); }
Example 2
Source File: ResolveFeatureTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Test public void testContinueResolutionOnUriResolver() { CatalogResolver resolver = createUriResolver(RESOLVE_CONTINUE); resolver.resolve("http://remote/dtd/bob/docBobDummy.dtd", null); checkUriResolution(resolver, "http://remote/dtd/bob/docBob.dtd", "http://local/base/dtd/docBobURI.dtd"); }
Example 3
Source File: ResolutionChecker.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
static void checkNoUriMatch(CatalogResolver resolver) { resolver.resolve("http://uri/noMatch/docNoMatch.dtd", getNotSpecified(null)); }
Example 4
Source File: PropertiesTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
private static void testPropertiesOnUriResolver() { CatalogResolver uriResolver = catalogUriResolver((String[]) null); uriResolver.resolve("http://remote/uri/dtd/docDummy.dtd", null); "http://local/base/dtd/docURI.dtd".equals(uriResolver.resolve( "http://remote/dtd/doc.dtd", null).getSystemId()); }