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 Jacek Ambroziak 286N/A * @author Santiago Pericas-Geertsen 286N/A * @author Morten Jorgensen 286N/A // True if all attributes of this LRE are unique, i.e. they all have 286N/A // different names. This flag is set to false if some attribute 286N/A // names are not known at compile time. 286N/A * Returns the QName for this literal element 286N/A * Displays the contents of this literal element 286N/A * Returns the namespace URI for which a prefix is pointing to 286N/A * Method used to keep track of what namespaces that are references by 286N/A * this literal element and its attributes. The output must contain a 286N/A * definition for each namespace, so we stuff them in a hashtable. 286N/A // Check if the parent has a declaration for this namespace 286N/A // Check if we have any declared namesaces 286N/A // Check if this node has a declaration for this namespace 286N/A * Translates the prefix of a QName according to the rules set in 286N/A * the attributes of xsl:stylesheet. Also registers a QName to assure 286N/A * that the output element contains the necessary namespace declarations. 286N/A // Break up the QName and get prefix:localname strings 286N/A // Treat default namespace as "" and not null 286N/A // Check if we must translate the prefix 286N/A // Get the namespace this prefix refers to 286N/A // Register the namespace as accessed 286N/A // Construct the new name for the element (may be unchanged) 286N/A * Add an attribute to this element 286N/A * Set the first attribute of this element 286N/A * Type-check the contents of this element. The element itself does not 286N/A * need any type checking as it leaves nothign on the JVM's stack. 286N/A // Type-check all attributes 286N/A * This method starts at a given node, traverses all namespace mappings, 286N/A * and assembles a list of all prefixes that (for the given node) maps 286N/A * to _ANY_ namespace URI. Used by literal result elements to determine 286N/A * Determines the final QName for the element and its attributes. 286N/A // Check if in a literal element context 286N/A // Process all attributes and register all namespaces they use 286N/A // Handle xsl:use-attribute-sets. Attribute sets are placed first 286N/A // in the vector or attributes to make sure that later local 286N/A // attributes can override an attributes in the set. 286N/A // Handle xsl:extension-element-prefixes 286N/A // Handle xsl:exclude-result-prefixes 286N/A // Ignore special attributes (e.g. xmlns:prefix and xmlns) 286N/A // Handle all other literal attributes 286N/A // Register all namespaces that are in scope, except for those that 286N/A // are listed in the xsl:stylesheet element's *-prefixes attributes 286N/A // Process all attributes and register all namespaces they use 286N/A // Handle xsl:extension-element-prefixes 286N/A // Handle xsl:exclude-result-prefixes 286N/A * Compiles code that emits the literal element to the output handler, 286N/A * first the start tag, then namespace declaration, then attributes, 286N/A * then the element contents, and then the element end tag. Since the 286N/A * value of an attribute may depend on a variable, variables must be 286N/A // Check whether all attributes are unique. 286N/A // Compile code to emit element start tag 286N/A // The value of an attribute may depend on a (sibling) variable 286N/A // Compile code to emit namespace attributes 286N/A * If our XslElement parent redeclares the default NS, and this 286N/A * element doesn't, it must be redeclared one more time. 286N/A // Output all attributes 286N/A // Compile code to emit attributes and child elements 286N/A // Compile code to emit element end tag 286N/A * Return true if the output method is html. 286N/A * Return the ElemDesc object for an HTML element. 286N/A * Return null if the output method is not HTML or this is not a 286N/A * Return true if all attributes of this LRE have unique names. 286N/A * Check whether all attributes are unique. 286N/A for (
int k =
0; k < i; k++) {
286N/A * Return true if the instructions under the given SyntaxTreeNode can produce attribute nodes 286N/A * to an element. Only return false when we are sure that no attribute node is produced. 286N/A * Return true if we are not sure. If the flag ignoreXslAttribute is true, the direct 286N/A * <xsl:attribute> children of the current node are not included in the check. 286N/A // Cannot add an attribute to an element after children have been added to it. 286N/A // We can safely return false when the instruction can produce an output node. 286N/A // In general, there is no way to check whether <xsl:call-template> or 286N/A // <xsl:apply-templates> can produce attribute nodes. <xsl:copy> and 286N/A // <xsl:copy-of> can also copy attribute nodes to an element. Return 286N/A // true in those cases to be safe.