use of org.apache.wiki.render.XHTMLRenderer in project jspwiki by apache.
the class JSPWikiMarkupParserTest method translate_nofollow.
private String translate_nofollow(String src) throws IOException, NoRequiredPropertyException, ServletException, WikiException {
props = TestEngine.getTestProperties();
props.setProperty("jspwiki.translatorReader.useRelNofollow", "true");
TestEngine testEngine2 = new TestEngine(props);
WikiContext context = new WikiContext(testEngine2, new WikiPage(testEngine2, PAGE_NAME));
JSPWikiMarkupParser r = new JSPWikiMarkupParser(context, new BufferedReader(new StringReader(src)));
XHTMLRenderer conv = new XHTMLRenderer(context, r.parse());
return conv.getString();
}
use of org.apache.wiki.render.XHTMLRenderer in project jspwiki by apache.
the class JSPWikiMarkupParserTest method translate.
private String translate(WikiEngine e, WikiPage p, String src) throws IOException, NoRequiredPropertyException, ServletException {
WikiContext context = new WikiContext(e, testEngine.newHttpRequest(), p);
JSPWikiMarkupParser tr = new JSPWikiMarkupParser(context, new BufferedReader(new StringReader(src)));
XHTMLRenderer conv = new XHTMLRenderer(context, tr.parse());
return conv.getString();
}
use of org.apache.wiki.render.XHTMLRenderer in project jspwiki by apache.
the class CounterPluginTest method translate.
private String translate(String src) throws IOException, NoRequiredPropertyException, ServletException {
WikiContext context = new WikiContext(testEngine, new WikiPage(testEngine, "TestPage"));
MarkupParser p = new JSPWikiMarkupParser(context, new StringReader(src));
WikiDocument dom = p.parse();
WikiRenderer r = new XHTMLRenderer(context, dom);
return r.getString();
}
Aggregations