Created
October 18, 2011 07:46
-
-
Save sideshowbarker/1294834 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 5922374b5f63 src/nu/validator/gnu/xml/aelfred2/SAXDriver.java | |
--- a/src/nu/validator/gnu/xml/aelfred2/SAXDriver.java Thu Dec 23 16:14:07 2010 +0900 | |
+++ b/src/nu/validator/gnu/xml/aelfred2/SAXDriver.java Tue Oct 18 16:44:42 2011 +0900 | |
@@ -820,6 +820,8 @@ | |
} | |
private void declarePrefix(String prefix, String uri) throws SAXException { | |
+ // NOTE: uri may be the empty string | |
+ | |
int index = uri.indexOf(':'); | |
// many versions of nwalsh docbook stylesheets | |
@@ -829,7 +831,7 @@ | |
} | |
// char [0] must be ascii alpha [RFC 2396] | |
- if (!isAlpha(uri.charAt(0))) { | |
+ if (uri.length() != 0 && !isAlpha(uri.charAt(0))) { | |
fatal("First character of the URI must be ascii alpha"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment