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: AVTPartSimple.java,v 1.2 2009/12/10 03:18:29 matthewoliver Exp $
21
package org.apache.xalan.templates;
23
import org.apache.xml.utils.FastStringBuffer;
24
import org.apache.xpath.XPathContext;
27
* Simple string part of a complex AVT.
30
public class AVTPartSimple extends AVTPart
32
static final long serialVersionUID = -3744957690598727913L;
35
* Simple string value;
41
* Construct a simple AVT part.
42
* @param val A pure string section of an AVT.
44
public AVTPartSimple(String val)
50
* Get the AVT part as the original string.
52
* @return the AVT part as the original string.
54
public String getSimpleString()
60
* This function is used to fixup variables from QNames to stack frame
61
* indexes at stylesheet build time.
62
* @param vars List of QNames that correspond to variables. This list
63
* should be searched backwards for the first qualified name that
64
* corresponds to the variable reference qname. The position of the
65
* QName in the vector from the start of the vector will be its position
66
* in the stack frame (but variables above the globalsTop value will need
67
* to be offset to the current stack frame).
69
public void fixupVariables(java.util.Vector vars, int globalsSize)
76
* Write the value into the buffer.
78
* @param xctxt An XPathContext object, providing infomation specific
79
* to this invocation and this thread. Maintains SAX state, variables,
80
* error handler and so on, so the transformation/XPath object itself
81
* can be simultaneously invoked from multiple threads.
82
* @param buf Buffer to write into.
83
* @param context The current source tree context.
84
* @param nsNode The current namespace context (stylesheet tree context).
86
public void evaluate(XPathContext xctxt, FastStringBuffer buf,
88
org.apache.xml.utils.PrefixResolver nsNode)
93
* @see XSLTVisitable#callVisitors(XSLTVisitor)
95
public void callVisitors(XSLTVisitor visitor)
97
// Don't do anything for the subpart for right now.