else if (value.equals("1"))
else if (trimmed.equals("1") || trimmed.equals("true"))
	public AtomicValue convertTo(int requiredType) throws XPathException {		switch (requiredType) {			case Type.ATOMIC :			case Type.ITEM :			case Type.UNTYPED_ATOMIC :				return this;			case Type.STRING :				return new StringValue(value);            case Type.ANY_URI :                return new AnyURIValue(value);			case Type.BOOLEAN :                                if (value.equals("0"))                    return BooleanValue.FALSE;                else if (value.equals("1"))                    return BooleanValue.TRUE;                else if (value.equals("false"))                    return BooleanValue.FALSE;                else if (value.equals("true"))                    return BooleanValue.TRUE;				else					throw new XPathException("FORG0001: cannot cast '" + 							Type.getTypeName(this.getItemType()) + "(\"" + getStringValue() + "\")' to " +							Type.getTypeName(requiredType));			case Type.FLOAT :				return new FloatValue(value);			case Type.DOUBLE :				return new DoubleValue(this);			case Type.NUMBER :				//TODO : more complicated				return new DoubleValue(this);			case Type.DECIMAL :				return new DecimalValue(getStringValue());			case Type.INTEGER :			case Type.NON_POSITIVE_INTEGER :			case Type.NEGATIVE_INTEGER :			case Type.LONG :			case Type.INT :			case Type.SHORT :			case Type.BYTE :			case Type.NON_NEGATIVE_INTEGER :			case Type.UNSIGNED_LONG :			case Type.UNSIGNED_INT :			case Type.UNSIGNED_SHORT :			case Type.UNSIGNED_BYTE :				return new IntegerValue(value, requiredType);			case Type.BASE64_BINARY :				return new Base64Binary(value);            case Type.HEX_BINARY :                return new HexBinary(value);			case Type.DATE_TIME :				return new DateTimeValue(value);			case Type.TIME :				return new TimeValue(value);			case Type.DATE :				return new DateValue(value);            case Type.GYEAR :                return new GYearValue(value);            case Type.GMONTH :                return new GMonthValue(value);            case Type.GDAY :                return new GDayValue(value);            case Type.GYEARMONTH :                return new GYearMonthValue(value);            case Type.GMONTHDAY :                return new GMonthDayValue(value);			case Type.DURATION :				return new DurationValue(value);			case Type.YEAR_MONTH_DURATION :				return new YearMonthDurationValue(value);			case Type.DAY_TIME_DURATION :				return new DayTimeDurationValue(value);			default :				throw new XPathException("FORG0001: cannot cast '" + 						Type.getTypeName(this.getItemType()) + "(\"" + getStringValue() + "\")' to " +						Type.getTypeName(requiredType));		}	}