You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2004/02/10 21:12:30 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/jaxp DocumentBuilderImpl.java
mrglavas 2004/02/10 12:12:30
Modified: java/src/org/apache/xerces/impl/msg DOMMessages.properties
java/src/org/apache/xerces/jaxp DocumentBuilderImpl.java
Log:
Localizing DocumentBuilder messages.
Revision Changes Path
1.9 +5 -1 xml-xerces/java/src/org/apache/xerces/impl/msg/DOMMessages.properties
Index: DOMMessages.properties
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/msg/DOMMessages.properties,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- DOMMessages.properties 10 Feb 2004 19:14:06 -0000 1.8
+++ DOMMessages.properties 10 Feb 2004 20:12:30 -0000 1.9
@@ -50,6 +50,10 @@
MissingDocumentClassName = The class name of the document factory \"{0}\" used to construct the DOM tree could not be found.
CannotCreateDocumentClass = The class named \"{0}\" could not be constructed as a org.w3c.dom.Document.
+# Error codes used by JAXP DocumentBuilder
+jaxp-order-not-supported = Property ''{0}'' must be set before setting property ''{1}''.
+jaxp-null-input-source = The source specified cannot be null.
+
#Ranges
BAD_BOUNDARYPOINTS_ERR = The boundary-points of a Range do not meet specific requirements.
INVALID_NODE_TYPE_ERR = The container of a boundary-point of a Range is being set to either a node of an invalid type or a node with an ancestor of an invalid type.
1.23 +10 -8 xml-xerces/java/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java
Index: DocumentBuilderImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- DocumentBuilderImpl.java 8 May 2003 20:11:58 -0000 1.22
+++ DocumentBuilderImpl.java 10 Feb 2004 20:12:30 -0000 1.23
@@ -3,7 +3,7 @@
* The Apache Software License, Version 1.1
*
*
- * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -66,6 +66,7 @@
import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.xerces.dom.DOMImplementationImpl;
+import org.apache.xerces.dom.DOMMessageFormatter;
import org.apache.xerces.impl.Constants;
import org.apache.xerces.parsers.DOMParser;
import org.w3c.dom.DOMImplementation;
@@ -169,11 +170,10 @@
if(value !=null && W3C_XML_SCHEMA.equals(value)){
domParser.setProperty(name, val);
}else{
- throw new IllegalArgumentException(
- "'http://java.sun.com/xml/jaxp/properties/schemaLanguage' "+
- "property should be set before setting "+
- "'http://java.sun.com/xml/jaxp/properties/schemaSource'"+
- " property");
+ throw new IllegalArgumentException(
+ DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN,
+ "jaxp-order-not-supported",
+ new Object[] {JAXP_SCHEMA_LANGUAGE, JAXP_SCHEMA_SOURCE}));
}
}
} else {
@@ -199,7 +199,9 @@
public Document parse(InputSource is) throws SAXException, IOException {
if (is == null) {
- throw new IllegalArgumentException("InputSource cannot be null");
+ throw new IllegalArgumentException(
+ DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN,
+ "jaxp-null-input-source", null));
}
if (er != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org