Package com.tridion.tcdl

Examples of com.tridion.tcdl.DocumentBuilder


  }

  public String evaluateBody(String originalBody, TransformContext context) throws TCDLTransformerException {
    StringWriter writer = new StringWriter();
    TagHandlerRegistry registry = getHandlerRegistry();
    DocumentBuilder documentBuilder = getDocumentBuilder();
    OutputDocument output = new OutputDocument();
    TagDispatcher dispatcher = new TagDispatcher(context, output, registry);
    TCDLParser parser = new TCDLParser(registry.getNamespaceList(), null);
    parser.parse(dispatcher, originalBody);
    documentBuilder.buildDocument(context, output, writer);
    return writer.toString();
  }
View Full Code Here


  private DocumentBuilder loadDocumentBuilder() throws TCDLTransformerException {
    log.debug("Loading documentBuilder.");
    TCDLProcessor processor = TCDLProcessor.getInstance();
    Object renderProcessor = forceGetField(processor, "renderProcessor");
    DocumentBuilder documentBuilder;
    if (renderProcessor != null && (renderProcessor instanceof TCDLEngine)) {
      TCDLEngine renderer = (TCDLEngine) renderProcessor;
      Object documentBuilderObject = forceGetField(renderer, "documentBuilder");
      if (documentBuilderObject != null && (documentBuilderObject instanceof DocumentBuilder)) {
        documentBuilder = (DocumentBuilder) documentBuilderObject;
View Full Code Here

TOP

Related Classes of com.tridion.tcdl.DocumentBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.