net.sf.saxon.style.XSLLeafNodeConstructor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of saxon-he Show documentation
Show all versions of saxon-he Show documentation
An OSGi bundle for Saxon-HE
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2013 Saxonica Limited.
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
// This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
package net.sf.saxon.style;
import net.sf.saxon.Configuration;
import net.sf.saxon.expr.*;
import net.sf.saxon.expr.instruct.Executable;
import net.sf.saxon.expr.instruct.SimpleNodeConstructor;
import net.sf.saxon.functions.SystemFunctionCall;
import net.sf.saxon.om.AttributeCollection;
import net.sf.saxon.om.AxisInfo;
import net.sf.saxon.om.NodeInfo;
import net.sf.saxon.om.StandardNames;
import net.sf.saxon.trans.XPathException;
import net.sf.saxon.tree.iter.AxisIterator;
import net.sf.saxon.type.BuiltInAtomicType;
import net.sf.saxon.type.Type;
import net.sf.saxon.value.StringValue;
import net.sf.saxon.value.Whitespace;
/**
* Common superclass for XSLT elements whose content template produces a text
* value: xsl:text, xsl:value-of, xsl:attribute, xsl:comment, xsl:namespace, and xsl:processing-instruction
*/
public abstract class XSLLeafNodeConstructor extends StyleElement {
//protected String stringValue = null;
/*@Nullable*/ protected Expression select = null;
/**
* Method for use by subclasses (processing-instruction and namespace) that take
* a name and a select attribute
* @return the expression defining the name attribute
* @throws XPathException if an error is detected
*/
protected Expression prepareAttributesNameAndSelect() throws XPathException {
Expression name = null;
String nameAtt = null;
String selectAtt = null;
AttributeCollection atts = getAttributeList();
for (int a=0; a