net.sf.saxon.style

Class LiteralResultElement

public class LiteralResultElement extends StyleElement

This class represents a literal result element in the style sheet (typically an HTML element to be output).
It is also used to represent unknown top-level elements, which are ignored.
Method Summary
Expressioncompile(Executable exec)
Process the literal result element by copying it to the result tree
intgetConstructType()
Get the type of construct.
intgetObjectNameCode()
Get a name identifying the object of the expression, for example a function name, template name, variable name, key name, element name, etc.
ObjectgetProperty(String name)
Get the value of a particular property of the instruction.
booleanisInstruction()
Specify that this is an instruction
DocumentImplmakeStylesheet(PreparedStylesheet pss, StyleNodeFactory nodeFactory)
Make a top-level literal result element into a stylesheet.
booleanmayContainSequenceConstructor()
Determine whether this type of element is allowed to contain a template-body
voidprepareAttributes()
Process the attribute list
voidvalidate()
Validate that this node is OK
protected voidvalidateChildren()
Validate the children of this node, recursively.

Method Detail

compile

public Expression compile(Executable exec)
Process the literal result element by copying it to the result tree

getConstructType

public int getConstructType()
Get the type of construct. This will be a constant in class Location. This method is part of the InstructionInfo interface

getObjectNameCode

public int getObjectNameCode()
Get a name identifying the object of the expression, for example a function name, template name, variable name, key name, element name, etc. This is used only where the name is known statically. If there is no name, the value will be -1.

getProperty

public Object getProperty(String name)
Get the value of a particular property of the instruction. This is part of the InstructionInfo interface for run-time tracing and debugging. The properties available include all the attributes of the source instruction (named by the attribute name): these are all provided as string values.

Parameters: name The name of the required property

Returns: The value of the requested property, or null if the property is not available

isInstruction

public boolean isInstruction()
Specify that this is an instruction

makeStylesheet

public DocumentImpl makeStylesheet(PreparedStylesheet pss, StyleNodeFactory nodeFactory)
Make a top-level literal result element into a stylesheet. This implements the "Literal Result Element As Stylesheet" facility.

mayContainSequenceConstructor

public boolean mayContainSequenceConstructor()
Determine whether this type of element is allowed to contain a template-body

Returns: true: yes, it may contain a template-body

prepareAttributes

public void prepareAttributes()
Process the attribute list

validate

public void validate()
Validate that this node is OK

validateChildren

protected void validateChildren()
Validate the children of this node, recursively. Overridden for top-level data elements.