/** * Get the string value of a given attribute of this node * * @param uri the namespace URI of the attribute name. Supply the empty string for an attribute * that is in no namespace * @param local the local part of the attribute name. * @return the attribute value if it exists, or null if it does not exist. Always returns null * if this node is not an element. */ public String getAttributeValue(/*@NotNull*/ String uri, /*@NotNull*/ String local) { return original.getAttributeValue(uri, local); }
/** * Get the string value of a given attribute of this node * * @param uri the namespace URI of the attribute name. Supply the empty string for an attribute * that is in no namespace * @param local the local part of the attribute name. * @return the attribute value if it exists, or null if it does not exist. Always returns null * if this node is not an element. * @since 9.4 */ public String getAttributeValue(/*@NotNull*/ String uri, /*@NotNull*/ String local) { return node.getAttributeValue(uri, local); }
@Override public String getAttributeValue(String uri, String local) { return externalNode.getAttributeValue(uri, local); }
/** * Get the value of a given attribute of this node * * @param fingerprint The fingerprint of the attribute name * @return the attribute value if it exists or null if not */ public String getAttributeValue(int fingerprint) { return original.getAttributeValue(fingerprint); }
/** * Get the value of a given attribute of this node * @param fingerprint The fingerprint of the attribute name * @return the attribute value if it exists or null if not */ public String getAttributeValue(int fingerprint) { return node.getAttributeValue(fingerprint); }
/** * Get the value of a given attribute of this node * @param fingerprint The fingerprint of the attribute name * @return the attribute value if it exists or null if not */ public String getAttributeValue(int fingerprint) { return node.getAttributeValue(fingerprint); }
public String getInheritedAttribute(NodeInfo element, String localName) { while (element != null) { String val = element.getAttributeValue("", localName); if (val != null) { return val; } element = element.getParent(); } return null; }
private String getDefaultCollationName(NodeInfo element) { while (element != null) { String coll = element.getAttributeValue("", "defaultCollation"); if (coll != null) { return coll; } element = element.getParent(); } return NamespaceConstant.CODEPOINT_COLLATION_URI; }
/** * Get the string value of a named attribute (in no namespace) of this element * * @param name the name of the required attribute, interpreted as a no-namespace name * @return null if this node is not an element, or if this element has no * attribute with the specified name. Otherwise return the string value of the * selected attribute node. * @since 9.9 */ public String attribute(String name) { return getUnderlyingNode().getAttributeValue("", name); }
public List<StructuredQName> getListOfQNameAttribute(NodeInfo element, String localName) throws XPathException { String val = element.getAttributeValue("", localName); if (val == null) { return Collections.emptyList(); } List<StructuredQName> result = new ArrayList<>(); for (String s : val.split(" ")) { StructuredQName sq = resolveQName(s, element); result.add(sq); } return result; }
/** * Get the string value of a named attribute (in no namespace) of this element * * @param name the name of the required attribute, interpreted as a no-namespace name * @return null if this node is not an element, or if this element has no * attribute with the specified name. Otherwise return the string value of the * selected attribute node. * @since 9.9 */ public String attribute(String name) { return getUnderlyingNode().getAttributeValue("", name); }
/** * Get the value of a given attribute of this node * * @param fingerprint The fingerprint of the attribute name * @return the attribute value if it exists or null if not */ public String getAttributeValue(int fingerprint) { if (node == null) { tryToConstruct(); } return node.getAttributeValue(fingerprint); }
/** * Get the value of a given attribute of this node * * @param fingerprint The fingerprint of the attribute name * @return the attribute value if it exists or null if not */ public String getAttributeValue(int fingerprint) { if (node == null) { tryToConstruct(); } return node.getAttributeValue(fingerprint); }
public NodeInfo getChildWithRole(NodeInfo parent, String role) { AxisIterator iter = parent.iterateAxis(AxisInfo.CHILD, NodeKindTest.ELEMENT); NodeInfo node; while ((node = iter.next()) != null) { String roleAtt = node.getAttributeValue("", "role"); if (role.equals(roleAtt)) { return node; } } return null; }
public NodeInfo getChildWithRole(NodeInfo parent, String role) { AxisIterator iter = parent.iterateAxis(AxisInfo.CHILD, NodeKindTest.ELEMENT); NodeInfo node; while ((node = iter.next()) != null) { String roleAtt = node.getAttributeValue("", "role"); if (role.equals(roleAtt)) { return node; } } return null; }
public static boolean isNull(Item i) { if (i instanceof NodeInfo) { NodeInfo ni = (NodeInfo)i; return ni.getNodeKind() == net.sf.saxon.type.Type.ELEMENT && !ni.hasChildNodes() && Boolean.valueOf(ni.getAttributeValue(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, "nil")); //$NON-NLS-1$ /* ideally we'd be able to check for nilled, but that doesn't work without validation if (ni.isNilled()) { tuple.add(null); continue; }*/ } return false; }
public static boolean isNull(Item i) { if (i instanceof NodeInfo) { NodeInfo ni = (NodeInfo)i; return ni.getNodeKind() == net.sf.saxon.type.Type.ELEMENT && !ni.hasChildNodes() && Boolean.valueOf(ni.getAttributeValue(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, "nil")); //$NON-NLS-1$ /* ideally we'd be able to check for nilled, but that doesn't work without validation if (ni.isNilled()) { tuple.add(null); continue; }*/ } return false; }
public static boolean isNull(Item i) { if (i instanceof NodeInfo) { NodeInfo ni = (NodeInfo)i; return ni.getNodeKind() == net.sf.saxon.type.Type.ELEMENT && !ni.hasChildNodes() && Boolean.valueOf(ni.getAttributeValue(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, "nil")); //$NON-NLS-1$ /* ideally we'd be able to check for nilled, but that doesn't work without validation if (ni.isNilled()) { tuple.add(null); continue; }*/ } return false; }
/** * Get the string value of a named attribute of this element * * @param name the name of the required attribute * @return null if this node is not an element, or if this element has no * attribute with the specified name. Otherwise return the string value of the * selected attribute node. */ public String getAttributeValue(QName name) { NodeInfo node = getUnderlyingNode(); return node.getAttributeValue(name.getNamespaceURI(), name.getLocalName()); }
/** * Get the string value of a named attribute of this element * * @param name the name of the required attribute * @return null if this node is not an element, or if this element has no * attribute with the specified name. Otherwise return the string value of the * selected attribute node. */ public String getAttributeValue(QName name) { NodeInfo node = getUnderlyingNode(); return node.getAttributeValue(name.getNamespaceURI(), name.getLocalName()); }