Open GoogleCodeExporter opened 9 years ago
[deleted comment]
[deleted comment]
I've also just found that places like Salt Lake City, UT also do not work.
Original comment by amoffet@gmail.com
on 4 Mar 2010 at 10:59
It became necessary to use a different pattern for values. I've modified
nextToken
to look like this:
public void nextToken(boolean skipWhiteSpace, boolean isValue) {
previousLine = line;
previousColumn = column;
// Advance the line counter to the current position.
while (pos < matcher.regionStart()) {
if (text.charAt(pos) == '\n') {
++line;
column = 0;
}
else {
++column;
}
++pos;
}
// Match the next token.
if (matcher.regionStart() == matcher.regionEnd()) {
// EOF
currentToken = "";
}
else {
if (isValue) {
matcher.usePattern(VALUE_TOKEN);
}
else {
matcher.usePattern(IDENTIFIER_TOKEN);
}
if (matcher.lookingAt()) {
currentToken = matcher.group();
matcher.region(matcher.end(), matcher.regionEnd());
}
else {
if (isValue) {
// there is no content in ths element
currentToken = "";
}
else {
// Take one character.
currentToken = String.valueOf(text.charAt(pos));
matcher.region(pos + 1, matcher.regionEnd());
}
}
if (skipWhiteSpace) {
skipWhitespace();
}
}
}
where VALUE_TOKEN is "[^<>]+";
This is really ugly and isn't a well defined method. I'm leaving it to you guys
to
decide how to handle this. I'd rather refactor this into more specialized
methods.
If I have some more time, I'll see what I can do.
amoffetATgmailDOTcom
Original comment by amoffet@gmail.com
on 7 Mar 2010 at 4:09
This appears to be fixed in the code provided in item 10
Original comment by amoffet@gmail.com
on 11 Mar 2010 at 6:37
I was incorrect. An old maven dependency fooled me. This is still an issue.
Original comment by amoffet@gmail.com
on 11 Mar 2010 at 11:04
Original comment by eliran.bivas
on 3 May 2011 at 1:36
Original issue reported on code.google.com by
amoffet@gmail.com
on 4 Mar 2010 at 10:12