You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by je...@locus.apache.org on 2000/09/12 02:35:15 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/utils URI.java
jeffreyr 00/09/11 17:35:14
Modified: java/src/org/apache/xerces/utils URI.java
Log:
Fixed bug in datatypes. According to URI spec you could
have a standalone fragment such as:
URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]
Revision Changes Path
1.3 +4 -3 xml-xerces/java/src/org/apache/xerces/utils/URI.java
Index: URI.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/utils/URI.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- URI.java 2000/08/08 20:58:54 1.2
+++ URI.java 2000/09/12 00:35:14 1.3
@@ -88,10 +88,10 @@
* default port for a specific scheme). Rather, it only knows the
* grammar and basic set of operations that can be applied to a URI.
*
-* @version $Id: URI.java,v 1.2 2000/08/08 20:58:54 jeffreyr Exp $
+* @version $Id: URI.java,v 1.3 2000/09/12 00:35:14 jeffreyr Exp $
*
**********************************************************************/
-public class URI implements Serializable {
+ public class URI implements Serializable {
/*******************************************************************
* MalformedURIExceptions are thrown in the process of building a URI
@@ -379,7 +379,8 @@
// check for scheme
if (uriSpec.indexOf(':') == -1) {
- if (p_base == null) {
+ int fragmentIdx = uriSpec.indexOf('#');
+ if (p_base == null && fragmentIdx != 0 ) {//A standalone base is a valid URI according to spec
throw new MalformedURIException("No scheme found in URI.");
}
}