mrglavas 2004/02/10 11:14:06 Modified: java/src/org/apache/xerces/parsers AbstractDOMParser.java java/src/org/apache/xerces/impl/msg DOMMessages.properties Log: Localizing another message and fixing a few bugs. We were looking up messages from the wrong message domain. Revision Changes Path 1.104 +8 -7 xml-xerces/java/src/org/apache/xerces/parsers/AbstractDOMParser.java Index: AbstractDOMParser.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/AbstractDOMParser.java,v retrieving revision 1.103 retrieving revision 1.104 diff -u -r1.103 -r1.104 --- AbstractDOMParser.java 10 Feb 2004 17:25:28 -0000 1.103 +++ AbstractDOMParser.java 10 Feb 2004 19:14:06 -0000 1.104 @@ -2,7 +2,7 @@ * The Apache Software License, Version 1.1 * * - * Copyright (c) 2001, 2002 The Apache Software Foundation. + * Copyright (c) 2001-2004 The Apache Software Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -371,14 +371,14 @@ if (!Document.class.isAssignableFrom (_class)) { throw new IllegalArgumentException ( DOMMessageFormatter.formatMessage( - DOMMessageFormatter.SERIALIZER_DOMAIN, + DOMMessageFormatter.DOM_DOMAIN, "InvalidDocumentClassName", new Object [] {documentClassName})); } } catch (ClassNotFoundException e) { throw new IllegalArgumentException ( DOMMessageFormatter.formatMessage( - DOMMessageFormatter.SERIALIZER_DOMAIN, + DOMMessageFormatter.DOM_DOMAIN, "MissingDocumentClassName", new Object [] {documentClassName})); } @@ -811,10 +811,11 @@ // won't happen we already checked that earlier } catch (Exception e) { - // REVISIT: Localize this message. throw new RuntimeException ( - "Failed to create document object of class: " - + fDocumentClassName); + DOMMessageFormatter.formatMessage( + DOMMessageFormatter.DOM_DOMAIN, + "CannotCreateDocumentClass", + new Object [] {fDocumentClassName})); } } fCurrentNode = fDocument; 1.8 +2 -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.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- DOMMessages.properties 10 Feb 2004 17:25:27 -0000 1.7 +++ DOMMessages.properties 10 Feb 2004 19:14:06 -0000 1.8 @@ -48,6 +48,7 @@ #Error codes used in DOMParser InvalidDocumentClassName = The class name of the document factory \"{0}\" used to construct the DOM tree is not of type org.w3c.dom.Document. 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. #Ranges BAD_BOUNDARYPOINTS_ERR = The boundary-points of a Range do not meet specific requirements.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]