2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 * $Id: XSLTVisitor.java 468643 2006-10-28 06:56:03Z minchau $
21 package org.apache.xalan.templates;
23 import org.apache.xpath.XPathVisitor;
26 * A derivation from this class can be passed to a class that implements
27 * the XSLTVisitable interface, to have the appropriate method called
28 * for each component of an XSLT stylesheet. Aside from possible other uses,
29 * the main intention is to provide a reasonable means to perform expression
32 public class XSLTVisitor extends XPathVisitor
35 * Visit an XSLT instruction. Any element that isn't called by one
36 * of the other visit methods, will be called by this method.
38 * @param elem The xsl instruction element object.
39 * @return true if the sub expressions should be traversed.
41 public boolean visitInstruction(ElemTemplateElement elem)
47 * Visit an XSLT stylesheet instruction.
49 * @param elem The xsl instruction element object.
50 * @return true if the sub expressions should be traversed.
52 public boolean visitStylesheet(ElemTemplateElement elem)
59 * Visit an XSLT top-level instruction.
61 * @param elem The xsl instruction element object.
62 * @return true if the sub expressions should be traversed.
64 public boolean visitTopLevelInstruction(ElemTemplateElement elem)
70 * Visit an XSLT top-level instruction.
72 * @param elem The xsl instruction element object.
73 * @return true if the sub expressions should be traversed.
75 public boolean visitTopLevelVariableOrParamDecl(ElemTemplateElement elem)
82 * Visit an XSLT variable or parameter declaration.
84 * @param elem The xsl instruction element object.
85 * @return true if the sub expressions should be traversed.
87 public boolean visitVariableOrParamDecl(ElemVariable elem)
93 * Visit a LiteralResultElement.
95 * @param elem The literal result object.
96 * @return true if the sub expressions should be traversed.
98 public boolean visitLiteralResultElement(ElemLiteralResult elem)
104 * Visit an Attribute Value Template (at the top level).
106 * @param elem The attribute value template object.
107 * @return true if the sub expressions should be traversed.
109 public boolean visitAVT(AVT elem)
116 * Visit an extension element.
117 * @param elem The extension object.
118 * @return true if the sub expressions should be traversed.
120 public boolean visitExtensionElement(ElemExtensionCall elem)