/** * Determine whether this node has the is-id property * * @return true if the node is an ID */ public boolean isId() { try { return getFingerprint() == StandardNames.XML_ID || getSchemaType().isIdType(); } catch (MissingComponentException e) { return false; } }
/** * Determine whether this node has the is-id property * * @return true if the node is an ID */ public boolean isId() { try { return getFingerprint() == StandardNames.XML_ID || getSchemaType().isIdType(); } catch (MissingComponentException e) { return false; } }
/** * Ask whether an element is an ID element. (The represents the * is-id property in the data model) * * @param nr the element node whose is-id property is required * @return true if the node has the is-id property */ public boolean isIdElement(int nr) { try { return getSchemaType(nr).isIdType() && getTypedValueOfElement(nr).getLength() == 1; } catch (XPathException e) { return false; } }
/** * Ask whether an element is an ID element. (The represents the * is-id property in the data model) * * @param nr the element node whose is-id property is required * @return true if the node has the is-id property */ public boolean isIdElement(int nr) { try { return getSchemaType(nr).isIdType() && getTypedValueOfElement(nr).getLength() == 1; } catch (XPathException e) { return false; } }
/** * Determine whether this node has the is-id property * * @return true if the node is an ID */ public boolean isId() { // This is an approximation. For a union type, we check that the actual value is a valid NCName, // but we don't check that it was validated against the member type of the union that is an ID type. try { SchemaType type = getSchemaType(); return type.getFingerprint() == StandardNames.XS_ID || type.isIdType() && NameChecker.isValidNCName(getStringValueCS()); } catch (MissingComponentException e) { return false; } } }
/** * Determine whether this node has the is-id property * * @return true if the node is an ID */ public boolean isId() { // This is an approximation. For a union type, we check that the actual value is a valid NCName, // but we don't check that it was validated against the member type of the union that is an ID type. try { SchemaType type = getSchemaType(); return type.getFingerprint() == StandardNames.XS_ID || type.isIdType() && NameChecker.isValidNCName(getStringValueCS()); } catch (MissingComponentException e) { return false; } } }
tt.setNilled(nodeNr); if (!isIDElement && type.isIdType()) { isIDElement = true;
tt.setNilled(nodeNr); if (!isIDElement && type.isIdType()) { isIDElement = true;