Tabnine Logo
TransformerImpl
Code IndexAdd Tabnine to your IDE (free)

How to use
TransformerImpl
in
org.apache.xalan.transformer

Best Java code snippets using org.apache.xalan.transformer.TransformerImpl (Showing top 20 results out of 315)

origin: xalan/xalan

/**
 * This will execute the following XSLT instructions
 * from the snapshot point, after the stylesheet execution
 * context has been reset from the snapshot point. 
 *
 * @param ts The snapshot of where to start execution
 *
 * @throws TransformerException
 * @deprecated This is an internal tooling API that nobody seems to be using
 */
public void executeFromSnapshot(TransformSnapshot ts)
    throws TransformerException
{
 ElemTemplateElement template = getMatchedTemplate();
 int child = getMatchedNode();
 pushElemTemplateElement(template);  //needed??
 m_xcontext.pushCurrentNode(child);  //needed??
 this.executeChildTemplates(template, true);  // getResultTreeHandler());
}
origin: robovm/robovm

/**
 * Execute the xsl:apply-imports transformation.
 *
 * @param transformer non-null reference to the the current transform-time state.
 *
 * @throws TransformerException
 */
public void execute(
    TransformerImpl transformer)
     throws TransformerException
{
 if (transformer.currentTemplateRuleIsNull())
 {
  transformer.getMsgMgr().error(this,
   XSLTErrorResources.ER_NO_APPLY_IMPORT_IN_FOR_EACH);  //"xsl:apply-imports not allowed in a xsl:for-each");
 }
 int sourceNode = transformer.getXPathContext().getCurrentNode();
 if (DTM.NULL != sourceNode)
 {
  // supply the current templated (matched, not named)        
  ElemTemplate matchTemplate = transformer.getMatchedTemplate();
  transformer.applyTemplateToNode(this, matchTemplate, sourceNode);
 }
 else  // if(null == sourceNode)
 {
  transformer.getMsgMgr().error(this,
   XSLTErrorResources.ER_NULL_SOURCENODE_APPLYIMPORTS);  //"sourceNode is null in xsl:apply-imports!");
 }
}
origin: robovm/robovm

/**
 * Create a result ContentHandler from a Result object, based
 * on the current OutputProperties.
 *
 * @param outputTarget Where the transform result should go,
 * should not be null.
 *
 * @return A valid ContentHandler that will create the
 * result tree when it is fed SAX events.
 *
 * @throws TransformerException
 */
public SerializationHandler createSerializationHandler(Result outputTarget)
    throws TransformerException
{
  SerializationHandler xoh =
  createSerializationHandler(outputTarget, getOutputFormat());
  return xoh;
}
origin: robovm/robovm

/**
 * Process the source node to the output result, if the
 * processor supports the "http://xml.org/trax/features/dom/input"
 * feature.
 * %REVIEW% Do we need a Node version of this?
 * @param node  The input source node, which can be any valid DTM node.
 * @param outputTarget The output source target.
 *
 * @throws TransformerException
 */
public void transformNode(int node, Result outputTarget)
    throws TransformerException
{
 
 SerializationHandler xoh = createSerializationHandler(outputTarget);
 this.setSerializationHandler(xoh);
 m_outputTarget = outputTarget;
 transformNode(node);
}
origin: robovm/robovm

/**
 * Process the source tree to the output result.
 * @param xmlSource  The input for the source tree.
 * @param outputTarget The output source target.
 * @param shouldRelease  Flag indicating whether to release DTMManager. 
 *
 * @throws TransformerException
 */
public void transform(Source xmlSource, Result outputTarget, boolean shouldRelease)
    throws TransformerException
{
 synchronized (m_reentryGuard)
 {
  SerializationHandler xoh = createSerializationHandler(outputTarget);
  this.setSerializationHandler(xoh);        
  m_outputTarget = outputTarget;
  transform(xmlSource, shouldRelease);
 }
}
origin: robovm/robovm

if (null != transformer.getOutputPropertyNoDefault(OutputKeys.METHOD))
 return;
Properties prevProperties = transformer.getOutputFormat().getProperties();
  transformer.setContentHandler(ch);
origin: xalan/xalan

if (transformer.currentTemplateRuleIsNull())
 transformer.getMsgMgr().error(this,
if (transformer.getDebug())
 transformer.getTraceManager().fireTraceEvent(this);
int sourceNode = transformer.getXPathContext().getCurrentNode();
if (DTM.NULL != sourceNode)
 ElemTemplate matchTemplate = transformer.getMatchedTemplate();
 transformer.applyTemplateToNode(this, matchTemplate, sourceNode);
 transformer.getMsgMgr().error(this,
if (transformer.getDebug())
 transformer.getTraceManager().fireTraceEndEvent(this);
origin: robovm/robovm

setExtensionsTable(getStylesheet());
 XPathContext xctxt = getXPathContext();
 DTM dtm = xctxt.getDTM(node);
  pushGlobalVars(node);
  StylesheetRoot stylesheet = this.getStylesheet();
  int n = stylesheet.getGlobalImportCount();
  try
   this.applyTemplateToNode(null, null, node);
  this.reset();
origin: robovm/robovm

clearParameters();
   setParameter(s1, null, params.getProperty(name));
  else
   setParameter(s2, s1, params.getProperty(name));
origin: xalan/xalan

    throws TransformerException
XPathContext xctxt = transformer.getXPathContext();
transformer.getStackGuard().checkForInfinateLoop();
if (transformer.getDebug())
 transformer.getTraceManager().fireTraceEvent(this);
 transformer.executeChildTemplates(this, true);
if (transformer.getDebug())
 transformer.getTraceManager().fireTraceEndEvent(this);
origin: xalan/xalan

if (transformer.getDebug())
 transformer.getTraceManager().fireTraceEvent(this);
String data = transformer.transformToString(this);
transformer.getMsgMgr().message(this, data, m_terminate);
 transformer.getErrorListener().fatalError(new TransformerException(XSLMessages.createMessage(XSLTErrorResources.ER_STYLESHEET_DIRECTED_TERMINATION, null))); //"Stylesheet directed termination"));
if (transformer.getDebug())
 transformer.getTraceManager().fireTraceEndEvent(this); 
origin: robovm/robovm

XPathContext xctxt = transformer.getXPathContext();
int sourceNode = xctxt.getCurrentNode();
   transformer.getMsgMgr().warn(
  this, XSLTErrorResources.WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
     new Object[]{ Constants.ATTRNAME_NAME, piName });
   transformer.getMsgMgr().warn(
  this, XSLTErrorResources.WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME,
     new Object[]{ Constants.ATTRNAME_NAME, piName });
String data = transformer.transformToString(this);
 transformer.getResultTreeHandler().processingInstruction(piName, data);
origin: robovm/robovm

 pushMode(mode);
xctxt.pushCurrentNode(xctxt.getDTMHandleFromNode(context));
executeChildTemplates(elem, handler);
 popMode();
origin: robovm/robovm

public Object extFunction(String ns, String funcName, 
             Vector argVec, Object methodKey)
     throws javax.xml.transform.TransformerException
{//System.out.println("TransImpl.extFunction() " + ns + " " + funcName +" " + getExtensionsTable());
 return getExtensionsTable().extFunction(ns, funcName, 
                   argVec, methodKey,
                   getXPathContext().getExpressionContext());   
}
origin: robovm/robovm

/**
 * Conditionally execute a sub-template.
 * The expression is evaluated and the resulting object is converted
 * to a boolean as if by a call to the boolean function. If the result
 * is true, then the content template is instantiated; otherwise, nothing
 * is created.
 *
 * @param transformer non-null reference to the the current transform-time state.
 *
 * @throws TransformerException
 */
public void execute(TransformerImpl transformer) throws TransformerException
{
 XPathContext xctxt = transformer.getXPathContext();
 int sourceNode = xctxt.getCurrentNode();
  if (m_test.bool(xctxt, sourceNode, this)) {
    transformer.executeChildTemplates(this, true);
  }
}

origin: robovm/robovm

 XPathContext xctxt = transformer.getXPathContext();
 int sourceNode = xctxt.getCurrentNode();
    transformer.executeChildTemplates(when, true);
 transformer.executeChildTemplates(childElem, true);
transformer.getMsgMgr().error(
 this, XSLTErrorResources.ER_CHOOSE_REQUIRES_WHEN);
origin: robovm/robovm

 /**
  * Send a message to diagnostics.
  * The xsl:message instruction sends a message in a way that
  * is dependent on the XSLT transformer. The content of the xsl:message
  * instruction is a template. The xsl:message is instantiated by
  * instantiating the content to create an XML fragment. This XML
  * fragment is the content of the message.
  *
  * @param transformer non-null reference to the the current transform-time state.
  *
  * @throws TransformerException
  */
 public void execute(
     TransformerImpl transformer)
      throws TransformerException
 {

  String data = transformer.transformToString(this);

  transformer.getMsgMgr().message(this, data, m_terminate);
  
  if(m_terminate)
   transformer.getErrorListener().fatalError(new TransformerException(XSLMessages.createMessage(XSLTErrorResources.ER_STYLESHEET_DIRECTED_TERMINATION, null))); //"Stylesheet directed termination"));
 }
}
origin: robovm/robovm

XPathContext xctxt = transformer.getXPathContext();
String langValue = m_lang_avt.evaluate(xctxt, contextNode, this);
  transformer.getMsgMgr().warn(this, null, xctxt.getDTM(contextNode).getNode(contextNode),
                 XSLTErrorResources.WG_LOCALE_NOT_FOUND,
                 new Object[]{ langValue });  //"Warning: Could not find locale for xml:lang="+langValue);
origin: robovm/robovm

/**
 * Create a new transformation context for this Templates object.
 *
 * @return A Transformer instance, never null.
 */
public Transformer newTransformer()
{
 return new TransformerImpl(this);
}

origin: robovm/robovm

/**
 * Set the content event handler.
 *
 * @param handler The new content handler.
 * @throws java.lang.NullPointerException If the handler
 *            is null.
 * @see org.xml.sax.XMLReader#setContentHandler
 */
public void setContentHandler (ContentHandler handler)
{
 m_transformer.setContentHandler(handler);
 // super.setContentHandler(m_transformer.getResultTreeHandler());
}

org.apache.xalan.transformerTransformerImpl

Javadoc

This class implements the javax.xml.transform.Transformer interface, and is the core representation of the transformation execution.

Most used methods

  • executeChildTemplates
    Execute each of the children of a template element.
  • getMsgMgr
    Return the message manager.
  • getOutputFormat
    Get the output properties used for the transformation.
  • getOutputPropertyNoDefault
    Get the value of a property, without using the default properties. This can be used to test if a pro
  • getXPathContext
    Get the XPath context associated with this transformer.
  • setContentHandler
    Set the content event handler. NEEDSDOC @param handler
  • <init>
    Construct a TransformerImpl.
  • applyTemplateToNode
    Given an element and mode, find the corresponding template and process the contents.
  • clearParameters
    Reset the parameters to a null list.
  • createSerializationHandler
  • currentFuncResultSeen
    Determines whether an EXSLT func:result instruction has been executed for the currently active EXSLT
  • currentTemplateRuleIsNull
    Tell if the current template rule is null, i.e. if we are directly within an apply-templates. Used f
  • currentFuncResultSeen,
  • currentTemplateRuleIsNull,
  • fatalError,
  • getContentHandler,
  • getContextNodeList,
  • getCountersTable,
  • getCurrentElement,
  • getCurrentNode,
  • getCurrentTemplate,
  • getErrorListener

Popular in Java

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • startActivity (Activity)
  • getSystemService (Context)
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now