try { return new XDecimal(content, true); } catch (NumberFormatException nfe) { throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "integer"}); }