SAIL-244: Added an XSLT Template Processor (hooked into the template service) along with an XSLT rendering engine that makes use of it.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19153 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Brian Remmington
2010-03-09 14:02:55 +00:00
parent 7073ab6f88
commit 91ba631a3b
16 changed files with 2838 additions and 171 deletions

View File

@@ -235,6 +235,35 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
});
}
public void testRenderFreeMarkerTemplateOneTransaction() throws Exception
{
this.setComplete();
this.endTransaction();
final QName renditionName = QName.createQName(NamespaceService.RENDITION_MODEL_1_0_URI,
TemplatingRenderingEngine.NAME);
this.renditionNode = transactionHelper
.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<NodeRef>()
{
public NodeRef execute() throws Throwable
{
// create test model
RenditionDefinition definition = renditionService.createRenditionDefinition(renditionName,
TemplatingRenderingEngine.NAME);
definition.setParameterValue(TemplatingRenderingEngine.PARAM_TEMPLATE_NODE,
nodeWithFreeMarkerContent);
ChildAssociationRef renditionAssoc = renditionService
.render(nodeWithDocContent, definition);
assertNotNull("The rendition association was null", renditionAssoc);
String output = readTextContent(renditionAssoc.getChildRef());
assertNotNull("The rendition content was null.", output);
// check the output contains root node Id as expected.
assertTrue(output.contains(nodeWithDocContent.getId()));
return null;
}
});
}
public void testRenderFreemarkerTemplatePath() throws Exception
{
//TODO displayName paths.