private void checkAssignedValue(Identifier id, AssignedValue val) 
                                     throws SemanticsException {
        int val_size = val.oidValue.size();
        /* Has the oid value hierarchy?? */
        if (val_size < 2) {
            Message.error(id, "has no parent defined (need 2 oids at least)");
            return;
        }
        /* Is the first oid value in the numerical range?? */
        OidValue parent = (OidValue)val.oidValue.firstElement();
        if (3 <= ((NumericValue)parent.getNumber()).getValue()) {
           Message.error(id, "parent number " + parent.getNumber() + " not accepted");
        }
        /* Has the last oid value the same name as assignment when present?? */
        /* Otherwise add the name. */
        OidValue child = (OidValue)val.oidValue.lastElement();
        if (child.hasName()) {
            if (! id.equals(child.getName())) {
                throw new SemanticsException("different name as the last Oid");
            }
        } else {
            child.setName(id);
        }

        if (parent.hasName()) {
            /* Check if all (except first and last) values have a name. */
            for (int i = 0; i < val_size - 2 ; i++) {
                parent = (OidValue)val.oidValue.elementAt(i);
                child = (OidValue)val.oidValue.elementAt(i+1);
                if (child.hasName() && ! child.hasNumber()) {
                    throw new SemanticsException("name only is not allowed");
                }
                if (! child.hasName()) {
                    String newname = new String(parent.getName() + "." + child.getNumber().getValue());
                    ((OidValue)val.oidValue.elementAt(i+1)).setName(newname);
                }
            }
        }
    }