private AttrVersion(final String val) throws BOSHException {
        super(val);

        int idx = val.indexOf('.');
        if (idx <= 0) {
            throw(new BOSHException(
                    "Illegal ver attribute value (not in major.minor form): "
                    + val));
        }

        String majorStr = val.substring(0, idx);
        try {
            major = Integer.parseInt(majorStr);
        } catch (NumberFormatException nfx) {
            throw(new BOSHException(
                    "Could not parse ver attribute value (major ver): "
                    + majorStr,
                    nfx));
        }
        if (major < 0) {
            throw(new BOSHException(
                    "Major version may not be < 0"));
        }

        String minorStr = val.substring(idx + 1);
        try {
            minor = Integer.parseInt(minorStr);
        } catch (NumberFormatException nfx) {
            throw(new BOSHException(
                    "Could not parse ver attribute value (minor ver): "
                    + minorStr,
                    nfx));
        }
        if (minor < 0) {
            throw(new BOSHException(
                    "Minor version may not be < 0"));
        }
    }