< prev index next >
src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java
Print this page
*** 1,10 ****
/*
* Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
! * @LastModified: Oct 2017
! * @modifiedBy: Oracle Inc.
! * @modifiedOn: Nov 2015, Sept 2017
*/
/*
* 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,8 ----
/*
* Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
! * @LastModified: Nov 2017
*/
/*
* 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.
*** 619,629 ****
* this component. This method may return null if no features
* are recognized by this component.
*/
@Override
public String[] getRecognizedFeatures() {
! return (String[])(RECOGNIZED_FEATURES.clone());
} // getRecognizedFeatures():String[]
/**
* Sets the state of a feature. This method is called by the component
* manager any time after reset when a feature changes state.
--- 617,627 ----
* this component. This method may return null if no features
* are recognized by this component.
*/
@Override
public String[] getRecognizedFeatures() {
! return RECOGNIZED_FEATURES.clone();
} // getRecognizedFeatures():String[]
/**
* Sets the state of a feature. This method is called by the component
* manager any time after reset when a feature changes state.
*** 656,666 ****
* this component. This method may return null if no properties
* are recognized by this component.
*/
@Override
public String[] getRecognizedProperties() {
! return (String[])(RECOGNIZED_PROPERTIES.clone());
} // getRecognizedProperties():String[]
/**
* Sets the value of a property. This method is called by the component
* manager any time after reset when a property changes value.
--- 654,664 ----
* this component. This method may return null if no properties
* are recognized by this component.
*/
@Override
public String[] getRecognizedProperties() {
! return RECOGNIZED_PROPERTIES.clone();
} // getRecognizedProperties():String[]
/**
* Sets the value of a property. This method is called by the component
* manager any time after reset when a property changes value.
*** 1770,1780 ****
if (xpointer != null ) {
fChildConfig = fXPointerChildConfig ;
// Parse the XPointer expression
try {
! ((XPointerProcessor)fXPtrProcessor).parseXPointer(xpointer);
} catch (XNIException ex) {
// report the XPointer error as a resource error
reportResourceError(
"XMLResourceError",
--- 1768,1778 ----
if (xpointer != null ) {
fChildConfig = fXPointerChildConfig ;
// Parse the XPointer expression
try {
! fXPtrProcessor.parseXPointer(xpointer);
} catch (XNIException ex) {
// report the XPointer error as a resource error
reportResourceError(
"XMLResourceError",
*** 1801,1811 ****
}
// If the xpointer attribute is present
if (xpointer != null ) {
// and it was not resolved
! if (!((XPointerProcessor)fXPtrProcessor).isXPointerResolved()) {
Locale locale = (fErrorReporter != null) ? fErrorReporter.getLocale() : null;
String reason = fXIncludeMessageFormatter.formatMessage(locale, "XPointerResolutionUnsuccessful", null);
reportResourceError("XMLResourceError", new Object[] {href, reason});
// use the fallback
return false;
--- 1799,1809 ----
}
// If the xpointer attribute is present
if (xpointer != null ) {
// and it was not resolved
! if (!fXPtrProcessor.isXPointerResolved()) {
Locale locale = (fErrorReporter != null) ? fErrorReporter.getLocale() : null;
String reason = fXIncludeMessageFormatter.formatMessage(locale, "XPointerResolutionUnsuccessful", null);
reportResourceError("XMLResourceError", new Object[] {href, reason});
// use the fallback
return false;
*** 2839,2851 ****
protected void restoreBaseURI() {
fBaseURI.pop();
fLiteralSystemID.pop();
fExpandedSystemID.pop();
fBaseURIScope.pop();
! fCurrentBaseURI.setBaseSystemId((String)fBaseURI.peek());
! fCurrentBaseURI.setLiteralSystemId((String)fLiteralSystemID.peek());
! fCurrentBaseURI.setExpandedSystemId((String)fExpandedSystemID.peek());
}
// The following methods are used for language processing
/**
--- 2837,2849 ----
protected void restoreBaseURI() {
fBaseURI.pop();
fLiteralSystemID.pop();
fExpandedSystemID.pop();
fBaseURIScope.pop();
! fCurrentBaseURI.setBaseSystemId(fBaseURI.peek());
! fCurrentBaseURI.setLiteralSystemId(fLiteralSystemID.peek());
! fCurrentBaseURI.setExpandedSystemId(fExpandedSystemID.peek());
}
// The following methods are used for language processing
/**
*** 2862,2872 ****
* Discards the language at the top of the stack, and returns the one beneath it.
*/
public String restoreLanguage() {
fLanguageStack.pop();
fLanguageScope.pop();
! return (String) fLanguageStack.peek();
}
/**
* Gets the base URI that was in use at that depth
* @param depth
--- 2860,2870 ----
* Discards the language at the top of the stack, and returns the one beneath it.
*/
public String restoreLanguage() {
fLanguageStack.pop();
fLanguageScope.pop();
! return fLanguageStack.peek();
}
/**
* Gets the base URI that was in use at that depth
* @param depth
< prev index next >