Assert.assertEquals("Unexpected value for this_root" , "http://example.org/" , vars[1]);
Assert.assertEquals("Unexpected value for html_base" , "http://example.org/john-d/", vars[2]);
}
private String[] checkPageBaseHandling(String testFile) throws IOException, XSLTStylesheetException {
final TagSoupParser tagSoupParser = new TagSoupParser(
this.getClass().getResourceAsStream(testFile),
"http://test/document/uri"
);
final StringWriter sw = new StringWriter();
RDFaExtractor.getXSLT().applyTo(tagSoupParser.getDOM(), sw);
final String content = sw.toString();
logger.debug(content);
final Pattern pattern = Pattern.compile("<!--this_location: '(.+)' this_root: '(.+)' html_base: '(.+)'-->");
final Matcher matcher = pattern.matcher(content);
Assert.assertTrue("Cannot find comment matching within generated output.", matcher.find());