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 * @author Santiago Pericas-Geertsen 286N/A * The name of this key as defined in xsl:key. 286N/A * The pattern to match starting at the root node. 286N/A * The expression that generates the values for this key. 286N/A * The type of the _use expression. 286N/A * Parse the <xsl:key> element and attributes 286N/A * @param parser A reference to the stylesheet parser 286N/A // Get the required attributes and parser XPath expressions 286N/A // Parse key name and add to symbol table 286N/A // Make sure required attribute(s) have been set 286N/A * Returns a String-representation of this key's name 286N/A * @return The key's name (from the <xsl:key> elements 'name' attribute). 286N/A // Type check match pattern 286N/A // Cast node values to string values (except for nodesets) 286N/A * This method is called if the "use" attribute of the key contains a 286N/A * node set. In this case we must traverse all nodes in the set and 286N/A * create one entry in this key's index for each node in the set. 286N/A // DOM.getStringValueX(nodeIndex) => String 286N/A // AbstractTranslet.SetKeyIndexDom(name, Dom) => void 286N/A // This variable holds the id of the node we found with the "match" 286N/A // attribute of xsl:key. This is the id we store, with the value we 286N/A // get from the nodes we find here, in the index for this key. 286N/A // Get the 'parameter' from the stack and store it in a local var. 286N/A // Save current node and current iterator on the stack 286N/A // Overwrite current iterator with one that gives us only what we want 286N/A // Prepare to call buildKeyIndex(String name, int node, String value); 286N/A // Now get the node value and push it on the parameter stack 286N/A // Finally do the call to add an entry in the index for this key. 286N/A // Restore current node and current iterator from the stack 286N/A * Gather all nodes that match the expression in the attribute "match" 286N/A * and add one (or more) entries in this key's index. 286N/A // AbstractTranslet.buildKeyIndex(name,node_id,value) => void 286N/A // AbstractTranslet.SetKeyIndexDom(name, Dom) => void 286N/A // DOM.getAxisIterator(root) => NodeIterator 286N/A // Get an iterator for all nodes in the DOM 286N/A // Reset the iterator to start with the root node 286N/A // Loop for traversing all nodes in the DOM 286N/A // Check if the current node matches the pattern in "match" 286N/A // If this is a node-set we must go through each node in the set 286N/A // Pass current node as parameter (we're indexing on that node) 286N/A // Get the next node from the iterator and do loop again... 286N/A // Restore current node and current iterator from the stack