/** * Used internally by the XML DOM wrapper to check if the subvariable name is just an element name, or a more * complex XPath expression. * * @return whether the name is a valid XML element name. (This routine might only be 99% accurate. REVISIT) * * @deprecated Don't use this outside FreeMarker; it's name if misleading, and it doesn't follow the XML specs. */ @Deprecated static public boolean isXMLID(String name) { return _ExtDomApi.isXMLNameLike(name); }
/** * @return whether the qname matches the combination of nodeName, nsURI, and environment prefix settings. */ static public boolean matchesName(String qname, String nodeName, String nsURI, Environment env) { return _ExtDomApi.matchesName(qname, nodeName, nsURI, env); }
public Object exec(List names) throws TemplateModelException { if (names == null || names.isEmpty()) { return this; } AncestorSequence result = new AncestorSequence(env); for (int i = 0; i < size(); i++) { TemplateNodeModel tnm = (TemplateNodeModel) get(i); String nodeName = tnm.getNodeName(); String nsURI = tnm.getNodeNamespace(); if (nsURI == null) { if (names.contains(nodeName)) { result.add(tnm); } } else { for (int j = 0; j < names.size(); j++) { if (_ExtDomApi.matchesName((String) names.get(j), nodeName, nsURI, env)) { result.add(tnm); break; } } } } return result; } }
/** * Used internally by the XML DOM wrapper to check if the subvariable name is just an element name, or a more * complex XPath expression. * * @return whether the name is a valid XML element name. (This routine might only be 99% accurate. REVISIT) * * @deprecated Don't use this outside FreeMarker; it's name if misleading, and it doesn't follow the XML specs. */ @Deprecated static public boolean isXMLID(String name) { return _ExtDomApi.isXMLNameLike(name); }
/** * @return whether the qname matches the combination of nodeName, nsURI, and environment prefix settings. */ static public boolean matchesName(String qname, String nodeName, String nsURI, Environment env) { return _ExtDomApi.matchesName(qname, nodeName, nsURI, env); }
/** * Used internally by the XML DOM wrapper to check if the subvariable name is just an element name, or a more * complex XPath expression. * * @return whether the name is a valid XML element name. (This routine might only be 99% accurate. REVISIT) * * @deprecated Don't use this outside FreeMarker; it's name if misleading, and it doesn't follow the XML specs. */ @Deprecated static public boolean isXMLID(String name) { return _ExtDomApi.isXMLNameLike(name); }
/** * @return whether the qname matches the combination of nodeName, nsURI, and environment prefix settings. */ static public boolean matchesName(String qname, String nodeName, String nsURI, Environment env) { return _ExtDomApi.matchesName(qname, nodeName, nsURI, env); }
public Object exec(List names) throws TemplateModelException { if (names == null || names.isEmpty()) { return this; } AncestorSequence result = new AncestorSequence(env); for (int i = 0; i < size(); i++) { TemplateNodeModel tnm = (TemplateNodeModel) get(i); String nodeName = tnm.getNodeName(); String nsURI = tnm.getNodeNamespace(); if (nsURI == null) { if (names.contains(nodeName)) { result.add(tnm); } } else { for (int j = 0; j < names.size(); j++) { if (_ExtDomApi.matchesName((String) names.get(j), nodeName, nsURI, env)) { result.add(tnm); break; } } } } return result; } }
public Object exec(List names) throws TemplateModelException { if (names == null || names.isEmpty()) { return this; } AncestorSequence result = new AncestorSequence(env); for (int i = 0; i < size(); i++) { TemplateNodeModel tnm = (TemplateNodeModel) get(i); String nodeName = tnm.getNodeName(); String nsURI = tnm.getNodeNamespace(); if (nsURI == null) { if (names.contains(nodeName)) { result.add(tnm); } } else { for (int j = 0; j < names.size(); j++) { if (_ExtDomApi.matchesName((String) names.get(j), nodeName, nsURI, env)) { result.add(tnm); break; } } } } return result; } }