Java Code Examples for com.sun.org.apache.xml.internal.resolver.readers.SAXCatalogReader#setCatalogParser()

The following examples show how to use com.sun.org.apache.xml.internal.resolver.readers.SAXCatalogReader#setCatalogParser() . 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: Resolver.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Setup readers.
 */
public void setupReaders() {
  SAXParserFactory spf = JdkXmlUtils.getSAXFactory(catalogManager.overrideDefaultParser());
  spf.setValidating(false);

  SAXCatalogReader saxReader = new SAXCatalogReader(spf);

  saxReader.setCatalogParser(null, "XMLCatalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");

  saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
                             "catalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.ExtendedXMLCatalogReader");

  addReader("application/xml", saxReader);

  TR9401CatalogReader textReader = new TR9401CatalogReader();
  addReader("text/plain", textReader);
}
 
Example 2
Source File: Resolver.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Setup readers.
 */
public void setupReaders() {
  SAXParserFactory spf = catalogManager.useServicesMechanism() ?
                  SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
  spf.setNamespaceAware(true);
  spf.setValidating(false);

  SAXCatalogReader saxReader = new SAXCatalogReader(spf);

  saxReader.setCatalogParser(null, "XCatalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");

  saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
                             "catalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.ExtendedXMLCatalogReader");

  addReader("application/xml", saxReader);

  TR9401CatalogReader textReader = new TR9401CatalogReader();
  addReader("text/plain", textReader);
}
 
Example 3
Source File: Catalog.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Setup readers.
 */
public void setupReaders() {
  SAXParserFactory spf = JdkXmlUtils.getSAXFactory(catalogManager.overrideDefaultParser());
  spf.setValidating(false);

  SAXCatalogReader saxReader = new SAXCatalogReader(spf);

  saxReader.setCatalogParser(null, "XMLCatalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");

  saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
                             "catalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");

  addReader("application/xml", saxReader);

  TR9401CatalogReader textReader = new TR9401CatalogReader();
  addReader("text/plain", textReader);
}
 
Example 4
Source File: Resolver.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Setup readers.
 */
public void setupReaders() {
  SAXParserFactory spf = JdkXmlUtils.getSAXFactory(catalogManager.overrideDefaultParser());
  spf.setValidating(false);

  SAXCatalogReader saxReader = new SAXCatalogReader(spf);

  saxReader.setCatalogParser(null, "XMLCatalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");

  saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
                             "catalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.ExtendedXMLCatalogReader");

  addReader("application/xml", saxReader);

  TR9401CatalogReader textReader = new TR9401CatalogReader();
  addReader("text/plain", textReader);
}
 
Example 5
Source File: Catalog.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Setup readers.
 */
public void setupReaders() {
  SAXParserFactory spf = catalogManager.useServicesMechanism() ?
                  SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
  spf.setNamespaceAware(true);
  spf.setValidating(false);

  SAXCatalogReader saxReader = new SAXCatalogReader(spf);

  saxReader.setCatalogParser(null, "XMLCatalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");

  saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
                             "catalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");

  addReader("application/xml", saxReader);

  TR9401CatalogReader textReader = new TR9401CatalogReader();
  addReader("text/plain", textReader);
}
 
Example 6
Source File: Catalog.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Setup readers.
 */
public void setupReaders() {
  SAXParserFactory spf = JdkXmlUtils.getSAXFactory(catalogManager.overrideDefaultParser());
  spf.setValidating(false);

  SAXCatalogReader saxReader = new SAXCatalogReader(spf);

  saxReader.setCatalogParser(null, "XMLCatalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");

  saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
                             "catalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");

  addReader("application/xml", saxReader);

  TR9401CatalogReader textReader = new TR9401CatalogReader();
  addReader("text/plain", textReader);
}
 
Example 7
Source File: Resolver.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Setup readers.
 */
public void setupReaders() {
  SAXParserFactory spf = catalogManager.useServicesMechanism() ?
                  SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
  spf.setNamespaceAware(true);
  spf.setValidating(false);

  SAXCatalogReader saxReader = new SAXCatalogReader(spf);

  saxReader.setCatalogParser(null, "XMLCatalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");

  saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
                             "catalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.ExtendedXMLCatalogReader");

  addReader("application/xml", saxReader);

  TR9401CatalogReader textReader = new TR9401CatalogReader();
  addReader("text/plain", textReader);
}
 
Example 8
Source File: Catalog.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Setup readers.
 */
public void setupReaders() {
  SAXParserFactory spf = catalogManager.useServicesMechanism() ?
                  SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
  spf.setNamespaceAware(true);
  spf.setValidating(false);

  SAXCatalogReader saxReader = new SAXCatalogReader(spf);

  saxReader.setCatalogParser(null, "XMLCatalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");

  saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
                             "catalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");

  addReader("application/xml", saxReader);

  TR9401CatalogReader textReader = new TR9401CatalogReader();
  addReader("text/plain", textReader);
}
 
Example 9
Source File: Catalog.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Setup readers.
 */
public void setupReaders() {
  SAXParserFactory spf = catalogManager.useServicesMechanism() ?
                  SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
  spf.setNamespaceAware(true);
  spf.setValidating(false);

  SAXCatalogReader saxReader = new SAXCatalogReader(spf);

  saxReader.setCatalogParser(null, "XMLCatalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");

  saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
                             "catalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");

  addReader("application/xml", saxReader);

  TR9401CatalogReader textReader = new TR9401CatalogReader();
  addReader("text/plain", textReader);
}
 
Example 10
Source File: Catalog.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Setup readers.
 */
public void setupReaders() {
  SAXParserFactory spf = JdkXmlUtils.getSAXFactory(catalogManager.overrideDefaultParser());
  spf.setValidating(false);

  SAXCatalogReader saxReader = new SAXCatalogReader(spf);

  saxReader.setCatalogParser(null, "XMLCatalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");

  saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
                             "catalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");

  addReader("application/xml", saxReader);

  TR9401CatalogReader textReader = new TR9401CatalogReader();
  addReader("text/plain", textReader);
}
 
Example 11
Source File: Resolver.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Setup readers.
 */
public void setupReaders() {
  SAXParserFactory spf = JdkXmlUtils.getSAXFactory(catalogManager.overrideDefaultParser());
  spf.setValidating(false);

  SAXCatalogReader saxReader = new SAXCatalogReader(spf);

  saxReader.setCatalogParser(null, "XMLCatalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");

  saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
                             "catalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.ExtendedXMLCatalogReader");

  addReader("application/xml", saxReader);

  TR9401CatalogReader textReader = new TR9401CatalogReader();
  addReader("text/plain", textReader);
}
 
Example 12
Source File: Catalog.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Setup readers.
 */
public void setupReaders() {
  SAXParserFactory spf = catalogManager.useServicesMechanism() ?
                  SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
  spf.setNamespaceAware(true);
  spf.setValidating(false);

  SAXCatalogReader saxReader = new SAXCatalogReader(spf);

  saxReader.setCatalogParser(null, "XMLCatalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");

  saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
                             "catalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");

  addReader("application/xml", saxReader);

  TR9401CatalogReader textReader = new TR9401CatalogReader();
  addReader("text/plain", textReader);
}
 
Example 13
Source File: Resolver.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Setup readers.
 */
public void setupReaders() {
  SAXParserFactory spf = catalogManager.useServicesMechanism() ?
                  SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
  spf.setNamespaceAware(true);
  spf.setValidating(false);

  SAXCatalogReader saxReader = new SAXCatalogReader(spf);

  saxReader.setCatalogParser(null, "XMLCatalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");

  saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
                             "catalog",
                             "com.sun.org.apache.xml.internal.resolver.readers.ExtendedXMLCatalogReader");

  addReader("application/xml", saxReader);

  TR9401CatalogReader textReader = new TR9401CatalogReader();
  addReader("text/plain", textReader);
}
 
Example 14
Source File: XMLCatalogResolver.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Attaches the reader to the catalog.
 */
private void attachReaderToCatalog (Catalog catalog) {

    SAXParserFactory spf = new SAXParserFactoryImpl();
    spf.setNamespaceAware(true);
    spf.setValidating(false);

    SAXCatalogReader saxReader = new SAXCatalogReader(spf);
    saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName, "catalog",
        "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");
    catalog.addReader("application/xml", saxReader);
}
 
Example 15
Source File: XMLCatalogResolver.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Attaches the reader to the catalog.
 */
private void attachReaderToCatalog (Catalog catalog) {

    SAXParserFactory spf = JdkXmlUtils.getSAXFactory(
            catalog.getCatalogManager().overrideDefaultParser());
    spf.setValidating(false);

    SAXCatalogReader saxReader = new SAXCatalogReader(spf);
    saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName, "catalog",
        "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");
    catalog.addReader("application/xml", saxReader);
}
 
Example 16
Source File: XMLCatalogResolver.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Attaches the reader to the catalog.
 */
private void attachReaderToCatalog (Catalog catalog) {

    SAXParserFactory spf = new SAXParserFactoryImpl();
    spf.setNamespaceAware(true);
    spf.setValidating(false);

    SAXCatalogReader saxReader = new SAXCatalogReader(spf);
    saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName, "catalog",
        "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");
    catalog.addReader("application/xml", saxReader);
}
 
Example 17
Source File: XMLCatalogResolver.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Attaches the reader to the catalog.
 */
private void attachReaderToCatalog (Catalog catalog) {

    SAXParserFactory spf = new SAXParserFactoryImpl();
    spf.setNamespaceAware(true);
    spf.setValidating(false);

    SAXCatalogReader saxReader = new SAXCatalogReader(spf);
    saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName, "catalog",
        "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");
    catalog.addReader("application/xml", saxReader);
}
 
Example 18
Source File: XMLCatalogResolver.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Attaches the reader to the catalog.
 */
private void attachReaderToCatalog (Catalog catalog) {

    SAXParserFactory spf = JdkXmlUtils.getSAXFactory(
            catalog.getCatalogManager().overrideDefaultParser());
    spf.setValidating(false);

    SAXCatalogReader saxReader = new SAXCatalogReader(spf);
    saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName, "catalog",
        "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");
    catalog.addReader("application/xml", saxReader);
}
 
Example 19
Source File: XMLCatalogResolver.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Attaches the reader to the catalog.
 */
private void attachReaderToCatalog (Catalog catalog) {

    SAXParserFactory spf = JdkXmlUtils.getSAXFactory(
            catalog.getCatalogManager().overrideDefaultParser());
    spf.setValidating(false);

    SAXCatalogReader saxReader = new SAXCatalogReader(spf);
    saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName, "catalog",
        "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");
    catalog.addReader("application/xml", saxReader);
}
 
Example 20
Source File: XMLCatalogResolver.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Attaches the reader to the catalog.
 */
private void attachReaderToCatalog (Catalog catalog) {

    SAXParserFactory spf = new SAXParserFactoryImpl();
    spf.setNamespaceAware(true);
    spf.setValidating(false);

    SAXCatalogReader saxReader = new SAXCatalogReader(spf);
    saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName, "catalog",
        "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");
    catalog.addReader("application/xml", saxReader);
}