/** * Ask whether an element is an IDREF/IDREFS element. (The represents the * is-idref property in the data model) * * @param nr the element node whose is-idref property is required * @return true if the node has the is-idref property */ public boolean isIdrefElement(int nr) { SchemaType type = getSchemaType(nr); try { if (type.isIdRefType()) { if (type == BuiltInAtomicType.IDREF || type == BuiltInListType.IDREFS) { return true; } try { for (AtomicValue av : getTypedValueOfElement(nr)) { if (av.getItemType().isIdRefType()) { return true; } } } catch (XPathException err) { // no action } } } catch (MissingComponentException e) { return false; } return false; }
/** * Determine whether this node has the is-idref property * * @return true if the node is an IDREF or IDREFS element or attribute */ public boolean isIdref() { AttributeCollection alist = ((ElementImpl) getRawParent()).getAttributeList(); if ((alist.getProperties(getSiblingPosition()) & ReceiverOptions.IS_IDREF) != 0) { return true; } try { return getSchemaType().isIdRefType(); } catch (MissingComponentException e) { return false; } }
/** * Determine whether this node has the is-idref property * * @return true if the node is an IDREF or IDREFS element or attribute */ public boolean isIdref() { AttributeCollection alist = ((ElementImpl) getRawParent()).getAttributeList(); if ((alist.getProperties(getSiblingPosition()) & ReceiverOptions.IS_IDREF) != 0) { return true; } try { return getSchemaType().isIdRefType(); } catch (MissingComponentException e) { return false; } }
/** * Ask whether an element is an IDREF/IDREFS element. (The represents the * is-idref property in the data model) * * @param nr the element node whose is-idref property is required * @return true if the node has the is-idref property */ public boolean isIdrefElement(int nr) { SchemaType type = getSchemaType(nr); try { if (type.isIdRefType()) { if (type == BuiltInAtomicType.IDREF || type == BuiltInListType.IDREFS) { return true; } try { for (AtomicValue av : getTypedValueOfElement(nr)) { if (av.getItemType().isIdRefType()) { return true; } } } catch (XPathException err) { // no action } } } catch (MissingComponentException e) { return false; } return false; }