mrglavas 2005/01/27 12:54:34 Modified: java/src/org/apache/xerces/impl/dv/xs AnyURIDV.java Log: Fixing JIRA Bug #1039: http://issues.apache.org/jira/browse/XERCESJ-1039 To validate an anyURI we apply the escaping rules from XLink to make it a URI that we then validate with Xerces' URI class. We were returning the escaped value instead of the original as the actual value. i.e. "http://www.exa mple.com" was being returned as "http://www.exa%20mple.com". Revision Changes Path 1.8 +3 -3 xml-xerces/java/src/org/apache/xerces/impl/dv/xs/AnyURIDV.java Index: AnyURIDV.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs/AnyURIDV.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- AnyURIDV.java 6 Oct 2004 14:56:47 -0000 1.7 +++ AnyURIDV.java 27 Jan 2005 20:54:34 -0000 1.8 @@ -53,11 +53,11 @@ try { if( content.length() != 0 ) { // encode special characters using XLink 5.4 algorithm - content = encode(content); + final String encoded = encode(content); // Support for relative URLs // According to Java 1.1: URLs may also be specified with a // String and the URL object that it is related to. - new URI(BASE_URI, content ); + new URI(BASE_URI, encoded ); } } catch (URI.MalformedURIException ex) { throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "anyURI"});
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]