if (getRefValue() != null) { if (referencePath == null) {   referencePath = new ReferencePath(this); }  if (getChildCount() > 0) { boolean childElements = getChildElements().size() > 0; if (Constants.POLICY_NESTED_NODES_FORBIDDEN_IN_REFERENCES || childElements) { throw new CdlInvalidValueReferenceException( CdlInvalidValueReferenceException.ERROR_CHILDREN_IN_REFERENCE + getDescription()); } }  }
    public void bind() throws CdlXmlParsingException {        //parent        super.bind();        //what are we extending?        Attribute extendsAttr = getExtendsAttribute();        if (extendsAttr != null) {            String rawextension = extendsAttr.getValue();            //now split that into namespace            String prefix = NamespaceUtils.extractNamespacePrefix(rawextension);            String local = NamespaceUtils.extractLocalname(rawextension);            String namespace = null;            if (prefix != null) {                namespace = getNamespaceURI(prefix);                if (namespace == null) {                    throw new CdlXmlParsingException(                            ErrorMessages.ERROR_UNKNOWN_NAMESPACE + prefix);                }            }            setExtendsName(NamespaceUtils.makeQName(namespace, local, prefix));        }        //check for having a refroot and us not already being bound        if (getRefValue() != null) {            if (referencePath == null) {                //and create a reference path if so                //this will make a relative one absolute in the process, incidentally.                referencePath = new ReferencePath(this);            }            if (getChildCount() > 0) {                boolean childElements = getChildElements().size() > 0;                if (Constants.POLICY_NESTED_NODES_FORBIDDEN_IN_REFERENCES || childElements) {                    throw new CdlInvalidValueReferenceException(                            CdlInvalidValueReferenceException.ERROR_CHILDREN_IN_REFERENCE                                    + getDescription());                }            }        }    }