Created
February 9, 2011 19:34
-
-
Save sideshowbarker/819101 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 a8d67c49a927 relaxng/datatype/java/src/org/whattf/datatype/Refresh.java | |
--- a/relaxng/datatype/java/src/org/whattf/datatype/Refresh.java Fri Jan 21 16:04:32 2011 +0900 | |
+++ b/relaxng/datatype/java/src/org/whattf/datatype/Refresh.java Thu Feb 10 04:31:51 2011 +0900 | |
@@ -1,5 +1,5 @@ | |
/* | |
- * Copyright (c) 2008 Mozilla Foundation | |
+ * Copyright (c) 2008-2011 Mozilla Foundation | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a | |
* copy of this software and associated documentation files (the "Software"), | |
@@ -117,6 +117,20 @@ | |
" instead."); | |
} | |
case EQUALS_SEEN: | |
+ if (c == '"' || c == '\'') { | |
+ throw newDatatypeException( | |
+ "Expected an unquoted IRI reference, but saw ", | |
+ c, " instead."); | |
+ } | |
+ if (' ' == c || '\t' == c || '\n' == c || '\f' == c | |
+ || '\r' == c) { | |
+ throw newDatatypeException("Expected an IRI reference, but saw whitespace instead."); | |
+ } | |
+ char l = literal.charAt(literal.length() - 1); | |
+ if (' ' == l || '\t' == l || '\n' == l || '\f' == l | |
+ || '\r' == l) { | |
+ throw newDatatypeException("Trailing whitespace."); | |
+ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment