Initializes the parsing process. @throws QueryException query exception
()
| 231 | * @throws QueryException query exception |
| 232 | */ |
| 233 | private void init() throws QueryException { |
| 234 | final IO baseIO = sc.baseIO(); |
| 235 | path = baseIO == null ? null : baseIO.path(); |
| 236 | if(!more()) throw error(QUERYEMPTY); |
| 237 | |
| 238 | // checks if the query string contains invalid characters |
| 239 | for(int i = 0; i < length; i++) { |
| 240 | final int cp = input[i]; |
| 241 | if(!XMLToken.valid(cp)) { |
| 242 | pos = i; |
| 243 | throw error(MODLEINV_X, currentAsString()); |
| 244 | } |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | /** |
| 249 | * Finishes the parsing step. |