Package org.apache.cocoon.generation

Examples of org.apache.cocoon.generation.JXTemplateGenerator$ProcessingInstruction


     *  very useful if you want to emit HTML directly into the stream.
     *
     */
    private void disableOutputEscaping()
    {
        addElement( new ProcessingInstruction(Result.PI_DISABLE_OUTPUT_ESCAPING, "") );
    }
View Full Code Here


        outputString(ftfw,     content));
  }
 
  @Test
  public void testProcessingInstructionTargetOnly() {
    ProcessingInstruction content = new ProcessingInstruction("target");
    assertEquals(expect("<?target?>"),
        outputString(fraw,     content));
    assertEquals(expect("<?target?>"),
        outputString(fcompact, content));
    assertEquals(expect("<?target?>"),
View Full Code Here

        outputString(ftfw,     content));
  }
 
  @Test
  public void testProcessingInstructionTargetWithData() {
    ProcessingInstruction content =
        new ProcessingInstruction("target", "data");
    assertEquals("<?target data?>",
        outputString(fraw,     content));
    assertEquals("<?target data?>",
        outputString(fcompact, content));
    assertEquals("<?target data?>",
View Full Code Here

    checkOutput(new Comment(incomment), outcomment, outcomment, outcomment, outcomment, outcomment);
  }

  @Test
  public void testOutputProcessingInstructionSimple() {
    ProcessingInstruction inpi = new ProcessingInstruction("jdomtest", "");
    String outpi = "<?jdomtest?>";
    checkOutput(inpi, outpi, outpi, outpi, outpi, outpi);
  }
View Full Code Here

  }

  @Test
  public void testOutputProcessingInstructionData() {
    String pi = "  hello   there  ";
    ProcessingInstruction inpi = new ProcessingInstruction("jdomtest", pi);
    String outpi = "<?jdomtest " + pi + "?>";
    checkOutput(inpi, outpi, outpi, outpi, outpi, outpi);
  }
View Full Code Here

    root.addContent(new Text(" "));
    root.addContent(new Comment("Boo"));
    root.addContent(new Text(" "));
    root.addContent(new Element("child"));
    root.addContent(new Text(" "));
    root.addContent(new ProcessingInstruction("pitarget"));
    root.addContent(new Text(" "));
    checkOutput(root, 
        "<root> <!--Boo--> <child /> <?pitarget?> </root>",
        "<root><!--Boo--><child /><?pitarget?></root>",
        "<root>\n  <!--Boo-->\n  <child />\n  <?pitarget?>\n</root>",
View Full Code Here

  @Test
  public void testOutputDocumentFull() {
    DocType dt = new DocType("root");
    Comment comment = new Comment("comment");
    ProcessingInstruction pi = new ProcessingInstruction("jdomtest", "");
    Element root = new Element("root");
    Document doc = new Document();
    doc.addContent(dt);
    doc.addContent(comment);
    doc.addContent(pi);
View Full Code Here

      Document doc = new Document();
      DocType dt = new DocType("root");
      dt.setInternalSubset(" ");
      doc.addContent(dt);
      doc.addContent(new Comment("This is a document"));
      doc.addContent(new ProcessingInstruction("jdomtest", ""));
      Element e = new Element("root");
      e.addContent(new EntityRef("ref"));
      doc.addContent(e);
      roundTripDocument(doc);
    }
View Full Code Here

    }
   
  @Test
  public void testRTOutputList() {
    List<Content> list = new ArrayList<Content>();
    list.add(new ProcessingInstruction("jdomtest", ""));
    list.add(new Comment("comment"));
    list.add(new Element("root"));
    roundTripFragment(list);
  }
View Full Code Here

  @Test
  @Ignore
  // TODO
  public void testOutputFragmentList() {
    List<Content> list = new ArrayList<Content>();
    list.add(new ProcessingInstruction("jdomtest", ""));
    list.add(new Comment("comment"));
    list.add(new CDATA("foo"));
    list.add(new Element("root"));
    list.add(new Text("bar"));
    roundTripFragment(list);
View Full Code Here

TOP

Related Classes of org.apache.cocoon.generation.JXTemplateGenerator$ProcessingInstruction

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.