As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
PARAM_TEMPLATE_PATH: (String) the path to the node whose cm:content property contains the XSLT. The display path is used for this parameter. That is to say "/Company Home/…" as opposed to "/app:company_home/…".
Please correct the errors below then click OK. Failed to create content due to error: 04060050 Failed to execute script 'workspace://SpacesStore/953dc9e9-a847-4ce9-9667-83a9e393f8c4': 04060049 This action requires that either the template_string parameter or the template_node parameter be specified.
var renditionDefName = "cm:adHocRenditionDef"; // can this really be anything? var renderingEngineName = "xsltRenderingEngine"; var xsltString = "<?xml version='1.0' encoding='UTF-8'?>\ <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>\ … </xsl:stylesheet>"; var renditionDef = renditionService.createRenditionDefinition(renditionDefName, renderingEngineName); renditionDef.parameters["template_string"] = xsltString; var result = renditionDef.execute(document);
NodeRef sourceNode = // obtained in the usual way e.g. from nodeService
var renditionDef = renditionService.createRenditionDefinition(renditionDefName, renderingEngineName); renditionDef.parameters["destination-path-template"] = "/Company Home/test_folder/" + document.name + ".rendered.xml"; renditionDef.parameters["template_string"] = xsltString; renditionDef.execute(document);
PARAM_DESTINATION_PATH_TEMPLATE: (String) this optional parameter indicates where the rendition will be created. The parameter may specify either the actual file path to the rendition or it may specify a Freemarker template which can be resolved to a file path. In either case the path is relative to the root node of the store in which the source node exists. If the parameter PARAM_DESTINATION_NODE has been set then this parameter will be ignored.
renditionDef.parameters["template_node"] = search.findNode("workspace://SpacesStore/d903d0af-f12e-4be8-b017-084ee14a31d4");
var renditionDefName = "cm:adHocRenditionDef"; var renderingEngineName = "xsltRenderingEngine"; var xsltNode = "workspace://SpacesStore/6d01184c-50ce-4d2b-bc66-bb83e72735b0"; var destination = document.displayPath + "/" + document.name + "rendered.xml"; var renditionDef = renditionService.createRenditionDefinition(renditionDefName, renderingEngineName); renditionDef.parameters["template_node"] = search.findNode(xsltNode); renditionDef.parameters["destination-path-template"] = destination; renditionDef.execute(document);
Alfresco/HEAD/root/projects/repository/source/java/org/alfresco/repo/rendition/executer/XSLTRenderingEngine.java
[archive@itspc-cs2 fits-0.3.1]$ find /opt/alfresco/tomcat/webapps/alfresco/ -name "*.jar" | xargs grep XSLTRenderingEngine Binary file /opt/alfresco/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-3.3G.jar matches Binary file /opt/alfresco/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-web-client-3.3G.jar matches