com.saxonica.bytecode
Class NamespaceConstructorCompiler

java.lang.Object
  extended by com.saxonica.bytecode.ExpressionCompiler
      extended by com.saxonica.bytecode.ToIteratorCompiler
          extended by com.saxonica.bytecode.ToPushCompiler
              extended by com.saxonica.bytecode.SimpleNodeConstructorCompiler
                  extended by com.saxonica.bytecode.NamespaceConstructorCompiler

public class NamespaceConstructorCompiler
extends SimpleNodeConstructorCompiler

Generate bytecode for the xsl:namespace Instruction


Constructor Summary
NamespaceConstructorCompiler()
           
 
Method Summary
protected  void compileNodeName(CompilerService compiler, Expression expression)
          Compile code to generate the node name (if any) and leave it on the top of the stack.
protected  boolean isNamedNodeKind()
          Ask whether this instruction generates a kind of node that is named
protected  void pushNode(CompilerService compiler, Expression expression)
          Generate code to write the node to the current receiver.
 
Methods inherited from class com.saxonica.bytecode.SimpleNodeConstructorCompiler
checkContent, compileToItem, compileToPush, isNoNodeIfEmpty
 
Methods inherited from class com.saxonica.bytecode.ToPushCompiler
compileToIterator
 
Methods inherited from class com.saxonica.bytecode.ToIteratorCompiler
compileToBoolean
 
Methods inherited from class com.saxonica.bytecode.ExpressionCompiler
allocateStatic, compileItemFromInt, compileItemFromString, compileToLoop, compileToPrimitive, generateMethod, getConfiguration, handleEmptyStringResult, setConfiguration, throwXPathException, throwXPathException, unboxItem, verify, visitAnnotation, visitLineNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespaceConstructorCompiler

public NamespaceConstructorCompiler()
Method Detail

isNamedNodeKind

protected boolean isNamedNodeKind()
Ask whether this instruction generates a kind of node that is named

Overrides:
isNamedNodeKind in class SimpleNodeConstructorCompiler

compileNodeName

protected void compileNodeName(CompilerService compiler,
                               Expression expression)
                        throws CannotCompileException
Compile code to generate the node name (if any) and leave it on the top of the stack. For node kinds that are always unnamed (such as comments), the stack is not changed. For node kinds that may be named or unnamed (namespace nodes), an entry is always added to the stack, which will be "" if the particular node has no name.

Overrides:
compileNodeName in class SimpleNodeConstructorCompiler
Throws:
CannotCompileException

pushNode

protected void pushNode(CompilerService compiler,
                        Expression expression)
Generate code to write the node to the current receiver. On entry the stack holds the current receiver, the node name (for named node kinds only) and the content (for all nodes)

Specified by:
pushNode in class SimpleNodeConstructorCompiler
Parameters:
compiler -
expression -


Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.