aboutsummaryrefslogtreecommitdiff
path: root/src/com/sun/org/apache/xerces/internal/impl
diff options
context:
space:
mode:
authorasaha <none@none>2014-09-11 15:32:12 -0700
committerasaha <none@none>2014-09-11 15:32:12 -0700
commitd4534403ad5f0bb607192f9bcb915f19367aa8cb (patch)
tree713a1ae06f81e540117402fb67b5231617cb1479 /src/com/sun/org/apache/xerces/internal/impl
parent8c0073db39df24fce81f8e372a69032a5a269ceb (diff)
parent585723f56a6c1971142fc8dddd56a095e49066c1 (diff)
downloadjdk8u_jaxp-d4534403ad5f0bb607192f9bcb915f19367aa8cb.tar.gz
Merge
Diffstat (limited to 'src/com/sun/org/apache/xerces/internal/impl')
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java4
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java18
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties2
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_de.properties2
4 files changed, 21 insertions, 5 deletions
diff --git a/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java b/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java
index aa0bfa3..d7080ca 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java
@@ -612,9 +612,9 @@ public class XMLDocumentFragmentScannerImpl
//fElementStack2.clear();
//fReplaceEntityReferences = true;
//fSupportExternalEntities = true;
- Boolean bo = (Boolean)propertyManager.getProperty(XMLInputFactoryImpl.IS_REPLACING_ENTITY_REFERENCES);
+ Boolean bo = (Boolean)propertyManager.getProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES);
fReplaceEntityReferences = bo.booleanValue();
- bo = (Boolean)propertyManager.getProperty(XMLInputFactoryImpl.IS_SUPPORTING_EXTERNAL_ENTITIES);
+ bo = (Boolean)propertyManager.getProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES);
fSupportExternalEntities = bo.booleanValue();
Boolean cdata = (Boolean)propertyManager.getProperty(Constants.ZEPHYR_PROPERTY_PREFIX + Constants.STAX_REPORT_CDATA_EVENT) ;
if(cdata != null)
diff --git a/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java b/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java
index 09a8260..d0f036f 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java
@@ -53,6 +53,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Stack;
import javax.xml.XMLConstants;
+import javax.xml.stream.XMLInputFactory;
/**
@@ -305,6 +306,11 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver {
/** Property Manager. This is used from Stax */
protected PropertyManager fPropertyManager ;
+ /** StAX properties */
+ boolean fSupportDTD = true;
+ boolean fReplaceEntityReferences = true;
+ boolean fSupportExternalEntities = true;
+
/** used to restrict external access */
protected String fAccessExternalDTD = EXTERNAL_ACCESS_DEFAULT;
@@ -1136,7 +1142,8 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver {
boolean parameter = entityName.startsWith("%");
boolean general = !parameter;
if (unparsed || (general && !fExternalGeneralEntities) ||
- (parameter && !fExternalParameterEntities)) {
+ (parameter && !fExternalParameterEntities) ||
+ !fSupportDTD || !fSupportExternalEntities) {
if (fEntityHandler != null) {
fResourceIdentifier.clear();
@@ -1431,6 +1438,10 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver {
fStaxEntityResolver = null;
}
+ fSupportDTD = ((Boolean)propertyManager.getProperty(XMLInputFactory.SUPPORT_DTD)).booleanValue();
+ fReplaceEntityReferences = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES)).booleanValue();
+ fSupportExternalEntities = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES)).booleanValue();
+
// Zephyr feature ignore-external-dtd is the opposite of Xerces' load-external-dtd
fLoadExternalDTD = !((Boolean)propertyManager.getProperty(Constants.ZEPHYR_PROPERTY_PREFIX + Constants.IGNORE_EXTERNAL_DTD)).booleanValue();
@@ -1502,6 +1513,11 @@ public class XMLEntityManager implements XMLComponent, XMLEntityResolver {
fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER, null);
entityExpansionIndex = fSecurityManager.getIndex(Constants.JDK_ENTITY_EXPANSION_LIMIT);
+ //StAX Property
+ fSupportDTD = true;
+ fReplaceEntityReferences = true;
+ fSupportExternalEntities = true;
+
// JAXP 1.5 feature
XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) componentManager.getProperty(XML_SECURITY_PROPERTY_MANAGER, null);
if (spm == null) {
diff --git a/src/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties b/src/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties
index 7dbeeaa..7108439 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties
+++ b/src/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties
@@ -26,7 +26,7 @@ NO_MODIFICATION_ALLOWED_ERR = Es wurde versucht, ein Objekt zu \u00E4ndern, bei
SYNTAX_ERR = Ung\u00FCltige Zeichenfolge angegeben.
VALIDATION_ERR = Aufruf einer Methode wie insertBefore oder removeChild w\u00FCrde die Dokumentgrammatik des Knotens ung\u00FCltig machen.
WRONG_DOCUMENT_ERR = Ein Knoten wird in einem anderen Dokument verwendet als dem, von dem er erstellt wurde.
-TYPE_MISMATCH_ERR = Der Wertetyp f\u00FCr diesen Parameternamen ist nicht mit dem erwarteten Wertetyp kompatibel.
+TYPE_MISMATCH_ERR = Der Werttyp f\u00FCr diesen Parameternamen ist nicht mit dem erwarteten Werttyp kompatibel.
#error messages or exceptions
FEATURE_NOT_SUPPORTED = Parameter {0} wird erkannt, aber der angeforderte Wert kann nicht festgelegt werden.
diff --git a/src/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_de.properties b/src/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_de.properties
index f03fed9..2a3f7d7 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_de.properties
+++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_de.properties
@@ -27,7 +27,7 @@ ContentIllegalAtTopLevel = Der Ersatz eines "include"-Elements, das als Dokument
UnexpandedEntityReferenceIllegal = Der Ersatz eines "include"-Elements, das als Dokumentelement im Quell-Infoset der obersten Ebene angezeigt wird, darf keine nicht erweiterten Entit\u00E4tsreferenzen enthalten.
HrefFragmentIdentifierIllegal = Fragment-IDs d\u00FCrfen nicht verwendet werden. Der "href"-Attributwert "{0}" ist nicht zul\u00E4ssig.
HrefSyntacticallyInvalid = "href"-Attributwert "{0}" hat eine ung\u00FCltige Syntax. Nach Anwenden der Escape-Regeln ist der Wert kein syntaktisch korrekter URI oder IRI.
-XPointerStreamability = Es wurde ein xpointer angegeben, der auf eine Stelle im Quell-Infoset verweist. Auf diese Stelle kann aufgrund des Streaming-Charakters des Prozessors nicht zugegriffen werden.
+XPointerStreamability = Es wurde ein xpointer angegeben, der auf eine Stelle im Quell-Infoset verweist. Auf diese Stelle kann aufgrund des Streamingcharakters des Prozessors nicht zugegriffen werden.
XPointerResolutionUnsuccessful = XPointer-Aufl\u00F6sung nicht erfolgreich.