286N/A * reserved comment block 286N/A * DO NOT REMOVE OR ALTER! 286N/A * Copyright 1999-2004 The Apache Software Foundation. 286N/A * Licensed under the Apache License, Version 2.0 (the "License"); 286N/A * you may not use this file except in compliance with the License. 286N/A * You may obtain a copy of the License at 286N/A * Unless required by applicable law or agreed to in writing, software 286N/A * distributed under the License is distributed on an "AS IS" BASIS, 286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 286N/A * See the License for the specific language governing permissions and 286N/A * limitations under the License. 286N/A * This class contains EXSLT set extension functions. 286N/A * It is accessed by specifying a namespace URI as follows: 286N/A * The documentation for each function has been copied from the relevant 286N/A * EXSLT Implementer page. 286N/A * The set:leading function returns the nodes in the node set passed as the first argument that 286N/A * precede, in document order, the first node in the node set passed as the second argument. If 286N/A * the first node in the second node set is not contained in the first node set, then an empty 286N/A * node set is returned. If the second node set is empty, then the first node set is returned. 286N/A * @param nl1 NodeList for first node-set. 286N/A * @param nl2 NodeList for second node-set. 286N/A * @return a NodeList containing the nodes in nl1 that precede in document order the first 286N/A * node in nl2; an empty node-set if the first node in nl2 is not in nl1; all of nl1 if nl2 286N/A * The set:trailing function returns the nodes in the node set passed as the first argument that 286N/A * follow, in document order, the first node in the node set passed as the second argument. If 286N/A * the first node in the second node set is not contained in the first node set, then an empty 286N/A * node set is returned. If the second node set is empty, then the first node set is returned. 286N/A * @param nl1 NodeList for first node-set. 286N/A * @param nl2 NodeList for second node-set. 286N/A * @return a NodeList containing the nodes in nl1 that follow in document order the first 286N/A * node in nl2; an empty node-set if the first node in nl2 is not in nl1; all of nl1 if nl2 286N/A * The set:intersection function returns a node set comprising the nodes that are within 286N/A * both the node sets passed as arguments to it. 286N/A * @param nl1 NodeList for first node-set. 286N/A * @param nl2 NodeList for second node-set. 286N/A * @return a NodeList containing the nodes in nl1 that are also 286N/A * The set:difference function returns the difference between two node sets - those nodes that 286N/A * are in the node set passed as the first argument that are not in the node set passed as the 286N/A * @param nl1 NodeList for first node-set. 286N/A * @param nl2 NodeList for second node-set. 286N/A * @return a NodeList containing the nodes in nl1 that are not in nl2. 286N/A * The set:distinct function returns a subset of the nodes contained in the node-set NS passed 286N/A * as the first argument. Specifically, it selects a node N if there is no node in NS that has 286N/A * the same string value as N, and that precedes N in document order. 286N/A * @param nl NodeList for the node-set. 286N/A * @return a NodeList with nodes from nl containing distinct string values. 286N/A * In other words, if more than one node in nl contains the same string value, 286N/A * only include the first such node found. 286N/A * The set:has-same-node function returns true if the node set passed as the first argument shares 286N/A * any nodes with the node set passed as the second argument. If there are no nodes that are in both 286N/A * node sets, then it returns false. 286N/A * The Xalan extensions MethodResolver converts 'has-same-node' to 'hasSameNode'. 286N/A * Note: Not to be confused with hasSameNodes in the Xalan namespace, which returns true if 286N/A * the two node sets contain the exactly the same nodes (perhaps in a different order),