286N/A * reserved comment block 286N/A * DO NOT REMOVE OR ALTER! 286N/A * Copyright 2001-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 * @author Morten Jorgensen 286N/A * Interprets the arguments passed from the document() function (see 286N/A * iterator containing the requested nodes. Builds a union-iterator if 286N/A * several documents are requested. 286N/A * 2 arguments arg1 and arg2. document(Obj, node-set) call 286N/A // the second argument node-set is empty 286N/A //System.err.println("arg2FirstNode name: " 286N/A // + dom.getNodeName(arg2FirstNode )+"[" 286N/A // +Integer.toHexString(arg2FirstNode )+"]"); 286N/A * Interprets the arguments passed from the document() function (see 286N/A * iterator containing the requested nodes. Builds a union-iterator if 286N/A * several documents are requested. 286N/A * 1 arguments arg. document(Obj) call 286N/A // %OPT% Optimization to cache the stylesheet DOM. 286N/A // The stylesheet DOM is built once and cached 286N/A // in the Templates object. 286N/A // If the cached dom exists, we need to migrate it 286N/A // to the new DTMManager and create a DTMAxisIterator 286N/A // Prepend URI base to URI (from context) 286N/A // Return an empty iterator if the URI is clearly invalid 286N/A // (to prevent some unncessary MalformedURL exceptions). 286N/A // Check if this DOM has already been added to the multiplexer 286N/A // Check if we can get the DOM from a DOMCache 286N/A // Parse the input document and construct DOM object 286N/A // Trust the DTMManager to pick the right parser and 286N/A // set up the DOM correctly. 286N/A // Cache the stylesheet DOM in the Templates object 286N/A // Wrap the DOM object in a DOM adapter and add to multiplexer 286N/A // Create index for any key elements 286N/A // Return a singleton iterator containing the root node 286N/A //document(node-set) if true; document(node-set,node-set) if false 286N/A * Create a DTMAxisIterator for the newdom. This is currently only 286N/A * used to create an iterator for the cached stylesheet DOM. 286N/A * @param newdom the cached stylesheet DOM 286N/A * @param translet the translet 286N/A * @param the main dom (should be a MultiDOM) 286N/A * @return a DTMAxisIterator from the document root 286N/A // Need to migrate the cached DTM to the new DTMManager 286N/A // Wrap the DOM object in a DOM adapter and add to multiplexer 286N/A // Create index for any key elements 286N/A // Return a singleton iterator containing the root node