399 if((limitsUsage & LimitUpwards) && |
399 if((limitsUsage & LimitUpwards) && |
400 num > maxInclusive) |
400 num > maxInclusive) |
401 { |
401 { |
402 return ValidationError::createError(QtXmlPatterns::tr( |
402 return ValidationError::createError(QtXmlPatterns::tr( |
403 "Value %1 of type %2 exceeds maximum (%3).") |
403 "Value %1 of type %2 exceeds maximum (%3).") |
404 .arg(formatData(static_cast<xsInteger>(num))) |
404 .arg(QPatternist::formatData(static_cast<xsInteger>(num))) |
405 .arg(formatType(np, itemType())) |
405 .arg(formatType(np, itemType())) |
406 .arg(formatData(static_cast<xsInteger>(maxInclusive)))); |
406 .arg(QPatternist::formatData(static_cast<xsInteger>(maxInclusive)))); |
407 } |
407 } |
408 else if((limitsUsage & LimitDownwards) && |
408 else if((limitsUsage & LimitDownwards) && |
409 lessThan(num, minimum)) |
409 lessThan(num, minimum)) |
410 { |
410 { |
411 return ValidationError::createError(QtXmlPatterns::tr( |
411 return ValidationError::createError(QtXmlPatterns::tr( |
412 "Value %1 of type %2 is below minimum (%3).") |
412 "Value %1 of type %2 is below minimum (%3).") |
413 .arg(formatData(static_cast<xsInteger>(num))) |
413 .arg(QPatternist::formatData(static_cast<xsInteger>(num))) |
414 .arg(formatType(np, itemType())) |
414 .arg(formatType(np, itemType())) |
415 .arg(formatData(static_cast<xsInteger>(minInclusive)))); |
415 .arg(QPatternist::formatData(static_cast<xsInteger>(minInclusive)))); |
416 } |
416 } |
417 else |
417 else |
418 return AtomicValue::Ptr(new DerivedInteger(num)); |
418 return AtomicValue::Ptr(new DerivedInteger(num)); |
419 } |
419 } |
420 |
420 |