< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. */ /* * 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. --- 1,7 ---- /* ! * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. */ /* * 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.
*** 73,83 **** import java.util.Objects; import javax.xml.catalog.CatalogException; import javax.xml.catalog.CatalogFeatures; import javax.xml.catalog.CatalogManager; import javax.xml.catalog.CatalogResolver; - import javax.xml.catalog.CatalogUriResolver; import javax.xml.transform.Source; import jdk.xml.internal.JdkXmlUtils; import org.xml.sax.InputSource; /** --- 73,82 ----
*** 369,379 **** /** indicate whether Catalog should be used for resolving external resources */ private boolean fUseCatalog = true; CatalogFeatures fCatalogFeatures; CatalogResolver fCatalogResolver; - CatalogUriResolver fCatalogUriResolver; private String fCatalogFile; private String fDefer; private String fPrefer; private String fResolve; --- 368,377 ----
*** 1636,1649 **** Although URI entry is preferred for resolving XInclude, system entry is allowed as well. */ Source source = null; try { ! if (fCatalogUriResolver == null) { ! fCatalogUriResolver = CatalogManager.catalogUriResolver(fCatalogFeatures); } ! source = fCatalogUriResolver.resolve(href, fCurrentBaseURI.getExpandedSystemId()); } catch (CatalogException e) {} if (source != null && !source.isEmpty()) { includedSource = new XMLInputSource(null, source.getSystemId(), fCurrentBaseURI.getExpandedSystemId(), true); --- 1634,1647 ---- Although URI entry is preferred for resolving XInclude, system entry is allowed as well. */ Source source = null; try { ! if (fCatalogResolver == null) { ! fCatalogResolver = CatalogManager.catalogResolver(fCatalogFeatures); } ! source = fCatalogResolver.resolve(href, fCurrentBaseURI.getExpandedSystemId()); } catch (CatalogException e) {} if (source != null && !source.isEmpty()) { includedSource = new XMLInputSource(null, source.getSystemId(), fCurrentBaseURI.getExpandedSystemId(), true);
*** 1667,1677 **** includedSource = createInputSource(includedSource.getPublicId(), includedSource.getSystemId(), includedSource.getBaseSystemId(), accept, acceptLanguage); } } ! catch (IOException e) { reportResourceError( "XMLResourceError", new Object[] { href, e.getMessage()}); return false; } --- 1665,1675 ---- includedSource = createInputSource(includedSource.getPublicId(), includedSource.getSystemId(), includedSource.getBaseSystemId(), accept, acceptLanguage); } } ! catch (IOException | CatalogException e) { reportResourceError( "XMLResourceError", new Object[] { href, e.getMessage()}); return false; }
< prev index next >