Lines Matching refs:node
62 * Standard XSLT functions. All standard functions expect the current node
91 * Standard function count(node-set)
109 * XSLT Standard function sum(node-set).
115 int node;
116 while ((node = iterator.next()) != DTMAxisIterator.END) {
117 result += Double.parseDouble(dom.getStringValueX(node));
129 public static String stringF(int node, DOM dom) {
130 return dom.getStringValueX(node);
141 return dom.getStringValueX(((Node)obj).node);
154 public static String stringF(Object obj, int node, DOM dom) {
159 return dom.getStringValueX(((Node)obj).node);
163 // DOM and not just a single node - that would not make sense.
164 //return ((DOM)obj).getStringValueX(node);
185 public static double numberF(int node, DOM dom) {
186 return stringToReal(dom.getStringValueX(node));
210 return stringToReal(dom.getStringValueX(((Node) obj).node));
373 public static String normalize_spaceF(int node, DOM dom) {
374 return normalize_spaceF(dom.getStringValueX(node));
406 public static String generate_idF(int node) {
407 if (node > 0)
408 // Only generate ID if node exists
409 return "N" + node;
470 * XSLT Standard function namespace-uri(node-set).
494 public static String namespace_uriF(int node, DOM dom) {
495 final String value = dom.getNodeName(node);
519 return "node-set";
538 runTimeError(DATA_CONVERSION_ERR, "node-set", className);
577 * Utility function: node-set/node-set compare.
607 public static boolean compare(int node, DTMAxisIterator iterator,
618 value = dom.getStringValueX(node);
620 if (node == rnode
630 value = dom.getStringValueX(node);
632 if (node != rnode
642 if (rnode > node) return true;
648 if (rnode < node) return true;
656 * Utility function: node-set/number compare.
660 int node;
665 while ((node = left.next()) != DTMAxisIterator.END) {
666 if (numberF(dom.getStringValueX(node), dom) == rnumber)
672 while ((node = left.next()) != DTMAxisIterator.END) {
673 if (numberF(dom.getStringValueX(node), dom) != rnumber)
679 while ((node = left.next()) != DTMAxisIterator.END) {
680 if (numberF(dom.getStringValueX(node), dom) > rnumber)
686 while ((node = left.next()) != DTMAxisIterator.END) {
687 if (numberF(dom.getStringValueX(node), dom) < rnumber)
693 while ((node = left.next()) != DTMAxisIterator.END) {
694 if (numberF(dom.getStringValueX(node), dom) >= rnumber)
700 while ((node = left.next()) != DTMAxisIterator.END) {
701 if (numberF(dom.getStringValueX(node), dom) <= rnumber)
714 * Utility function: node-set/string comparison.
718 int node;
720 while ((node = left.next()) != DTMAxisIterator.END) {
721 if (compareStrings(dom.getStringValueX(node), rstring, op, dom)) {
736 // If node-boolean comparison -> convert node to boolean
787 left = new SingletonIterator(((Node)left).node);
790 right = new SingletonIterator(((Node)right).node);
825 // Next, node-set/t for t in {real, string, node-set, result-tree}
859 * Utility function: used to test context node's language
861 public static boolean testLanguage(String testLang, DOM dom, int node) {
862 // language for context node (if any)
863 String nodeLang = dom.getLanguage(node);
869 // compare context node's language agains test language
1002 * Utility function: used to convert references to node-sets. If the
1006 // Convert var/param -> node
1008 return(new SingletonIterator(((Node)obj).node));
1010 // Convert var/param -> node-set
1016 runTimeError(DATA_CONVERSION_ERR, className, "node-set");
1114 return dom.getStringValueX(((Node)obj).node);
1129 public static DTMAxisIterator node2Iterator(org.w3c.dom.Node node,
1132 final org.w3c.dom.Node inNode = node;
1133 // Create a dummy NodeList which only contains the given node to make
1170 org.w3c.dom.Node node = nodeList.item(i);
1173 handle = dtmManager.getDTMHandleFromNode(node);
1175 else if (node instanceof DTMNodeProxy
1176 && ((DTMNodeProxy) node).getDTM() == dom) {
1177 handle = ((DTMNodeProxy) node).getDTMNodeNumber();
1210 org.w3c.dom.Node node = nodeList.item(i);
1211 if (node instanceof DTMNodeProxy) {
1212 DTMNodeProxy proxy = (DTMNodeProxy)node;
1221 // invalid node handle, so definitely not our doc
1231 int nodeType = node.getNodeType();
1246 // Use one dummy element as container for each node of the
1259 mid.appendChild(doc.importNode(node, true));
1266 // attributes or node order.
1268 mid.setAttributeNodeNS((Attr)doc.importNode(node, true));
1276 "Don't know how to convert node type "
1306 // Second pass: find DTM handles for every node in the list.
1314 org.w3c.dom.Node node = nodeList.item(i);
1316 int nodeType = node.getNodeType();
1366 * of nodes to just one single node (the one at position n).
1369 int node = iterator.next();
1370 return(new SingletonIterator(node));
1380 int node,
1389 dom.copy(((Node) obj).node, handler);
1466 SerializationHandler handler, DOM dom, int node)
1480 namespace = dom.lookupNamespace(node, prefix);