Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
xml-commons Resolver Source Code Files
xml-commons Resolver Source Code Files are provided in the source package file, xml-commons-resolver-1.2-fyi.zip.
You can download xml-commons-resolver-1.2-fyi.zip as described in the previous tutorial and go to the "src/" sub-folder to view Source Code files.
You can also browse xml-commons Resolver Source Code files below:
✍: FYIcenter
⏎ org/apache/xml/resolver/tests/BasicResolverTests.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.xml.resolver.tests; import junit.framework.TestCase; import java.net.URL; import org.apache.xml.resolver.Catalog; import org.apache.xml.resolver.CatalogManager; import org.apache.xml.resolver.tools.CatalogResolver; public class BasicResolverTests extends TestCase { protected Catalog catalog; public static void main(String args[]) { junit.textui.TestRunner.run(BasicResolverTests.class); } protected void setUp() throws Exception { super.setUp(); CatalogManager manager = new CatalogManager(); // Just do this to make sure that the debug level gets set. // I could set the value explicitly, but I know that the // ant build file is going to set the system property, so just // make sure that that gets used. int verbosity = manager.getVerbosity(); catalog = new Catalog(manager); catalog.setupReaders(); catalog.loadSystemCatalogs(); } public void testResolveSystem() { String resolved = null; String local = "file:/local/system-resolver.dtd"; try { resolved = catalog.resolveSystem("http://example.org/resolver.dtd"); } catch (Exception e) { e.printStackTrace(); } assertTrue(local.equals(resolved)); } public void testResolvePublic() { String resolved = null; String local = "file:/local/public-resolver.dtd"; try { resolved = catalog.resolvePublic("-//Apache//DTD Resolver Test//EN", "some-broken-system-identifier"); } catch (Exception e) { e.printStackTrace(); } assertTrue(local.equals(resolved)); } public void testRewriteSystem() { String resolved = null; String local = "file:/longest/path"; try { resolved = catalog.resolveSystem("http://rewrite.example.org/longest/path"); } catch (Exception e) { e.printStackTrace(); } assertTrue(local.equals(resolved)); } public void testResolveURI() { String resolved = null; String local = "file:/local/uri"; try { resolved = catalog.resolveURI("http://example.org/someURI"); } catch (Exception e) { e.printStackTrace(); } assertTrue(local.equals(resolved)); } public void testGroup() { String resolved = null; String local = "file:/local/other/uri"; try { resolved = catalog.resolveURI("http://example.org/someOtherURI"); } catch (Exception e) { e.printStackTrace(); } assertTrue(local.equals(resolved)); } public void testDelegateSystem() { String resolved = null; String local = "file:/local/delegated/system-resolver.dtd"; try { resolved = catalog.resolveSystem("http://delegate.example.org/resolver.dtd"); } catch (Exception e) { e.printStackTrace(); } assertTrue(local.equals(resolved)); } public void testDocument() { String resolved = null; String local = "file:/default-document"; try { resolved = catalog.resolveDocument(); } catch (Exception e) { e.printStackTrace(); } assertTrue(local.equals(resolved)); } public void testSystemSuffix() { String resolved = null; String local = "file:/usr/local/xml/docbook/4.4/docbookx.dtd"; try { resolved = catalog.resolveSystem("http://any/random/path/to/docbookx.dtd"); } catch (Exception e) { e.printStackTrace(); } assertTrue(local.equals(resolved)); } public void testUriSuffix() { String resolved = null; String local = "file:/usr/local/xsl/docbook/html/docbook.xsl"; try { resolved = catalog.resolveURI("http://any/path/to/html/docbook.xsl"); } catch (Exception e) { e.printStackTrace(); } assertTrue(local.equals(resolved)); } }
⏎ org/apache/xml/resolver/tests/BasicResolverTests.java
Or download all of them as a single archive file:
File name: xml-commons-resolver-1.2-fyi.zip File size: 101319 bytes Release date: 2006-11-20 Download
⇒ FAQ for Apache Xerces XML Parser
⇐ What Is in xml-commons-resolver-1.2.zip
2016-06-15, 24438👍, 1💬
Popular Posts:
JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module. JDK 11 XML...
What is the sax\Counter.java provided in the Apache Xerces package? I have Apache Xerces 2.11.0 inst...
How to download and install JDK (Java Development Kit) 6? If you want to write Java applications, yo...
What Is jaxb-api-2.1.6.jar? Java Architecture for XML Binding (JAXB) is a Java API that allows Java ...
Guava is a suite of core and expanded libraries that include utility classes, google's collections, ...