int components = 0; if (!tok.hasMoreElements()) { return badDuration("empty string", s); return badDuration("+ sign not allowed in a duration", s); } else if ("-".equals(part)) { negative = true; return badDuration("missing 'P'", s); state = 4; if (!tok.hasMoreElements()) { return badDuration("T must be followed by time components", s); if (value < 0) { if (value == -2) { return badDuration("component of duration exceeds Saxon limits", s, "FODT0002"); } else { return badDuration("invalid or non-numeric component", s); return badDuration("missing unit letter at end", s); case 'Y': if (state > 0) { return badDuration("Y is out of sequence", s); return badDuration("Year component is not allowed in dayTimeDuration", s); if (state == 4 || state == 5) {
int components = 0; if (!tok.hasMoreElements()) { return badDuration("empty string", s); return badDuration("+ sign not allowed in a duration", s); } else if ("-".equals(part)) { negative = true; return badDuration("missing 'P'", s); state = 4; if (!tok.hasMoreElements()) { return badDuration("T must be followed by time components", s); if (value < 0) { if (value == -2) { return badDuration("component of duration exceeds Saxon limits", s, "FODT0002"); } else { return badDuration("invalid or non-numeric component", s); return badDuration("missing unit letter at end", s); case 'Y': if (state > 0) { return badDuration("Y is out of sequence", s); return badDuration("Year component is not allowed in dayTimeDuration", s); if (state == 4 || state == 5) {
int components = 0; if (!tok.hasMoreElements()) { return badDuration("empty string", s); return badDuration("+ sign not allowed in a duration", s); } else if ("-".equals(part)) { negative = true; return badDuration("missing 'P'", s); state = 4; if (!tok.hasMoreElements()) { return badDuration("T must be followed by time components", s); if (value < 0) { if (part.length() > 8) { return badDuration("component invalid or too large", s); } else { return badDuration("non-numeric component", s); return badDuration("missing unit letter at end", s); case'Y': if (state > 0) { return badDuration("Y is out of sequence", s); break; } else { return badDuration("M is out of sequence", s);
int components = 0; if (!tok.hasMoreElements()) { return badDuration("empty string", s); return badDuration("+ sign not allowed in a duration", s); } else if ("-".equals(part)) { negative = true; return badDuration("missing 'P'", s); state = 4; if (!tok.hasMoreElements()) { return badDuration("T must be followed by time components", s); if (value < 0) { if (part.length() > 8) { return badDuration("component invalid or too large", s); } else { return badDuration("non-numeric component", s); return badDuration("missing unit letter at end", s); case'Y': if (state > 0) { return badDuration("Y is out of sequence", s); break; } else { return badDuration("M is out of sequence", s);