<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Correct use of processTemplate in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/correct-use-of-processtemplate/m-p/303369#M256499</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for replying, the output file gets already created anyway.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The point is that I cannot understand the nodes involved, even in the Javascript API cookbook example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;em&amp;gt;Executes a template from the repository against the current Document node:&amp;lt;/em&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;javascript&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var template = "&amp;lt;h3&amp;gt;Document name is ${document.name}&amp;lt;/h3&amp;gt;" +&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "The ID argument: ${args['id']}";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var args = new Array()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;args["id"] = "01234-56789";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var result = document.processTemplate(template, args);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// save the template result content to a new node in my home space&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var outputFile = userhome.createFile("output.txt");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outputFile.content = result;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/javascript&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here we have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. a template;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. an outputFile;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. and a document "against which the template is processed". What does this mean?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the meaning of "executing a template against a Document node"? What's the role of the Document node the template is processed against to?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Moreover, the outputFile is identical to the template: placeholders are not getting processed, they are output as is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Feb 2014 13:30:00 GMT</pubDate>
    <dc:creator>lordzoster</dc:creator>
    <dc:date>2014-02-26T13:30:00Z</dc:date>
    <item>
      <title>Correct use of processTemplate</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/correct-use-of-processtemplate/m-p/303367#M256497</link>
      <description>HalloI have an RTF freemarker template which I fill with some arbitrary data, and then save into a folder different than origin.The file saves correctly but without any modification - just the original template.Moreover, I don't understand the meaning of the node against which I am expected to call</description>
      <pubDate>Thu, 20 Feb 2014 01:08:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/correct-use-of-processtemplate/m-p/303367#M256497</guid>
      <dc:creator>lordzoster</dc:creator>
      <dc:date>2014-02-20T01:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Correct use of processTemplate</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/correct-use-of-processtemplate/m-p/303368#M256498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;save outputFile after operation&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outputFile.save();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and may be you also need to change this &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outputFile.content.content=result;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 06:00:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/correct-use-of-processtemplate/m-p/303368#M256498</guid>
      <dc:creator>mitpatoliya</dc:creator>
      <dc:date>2014-02-20T06:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Correct use of processTemplate</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/correct-use-of-processtemplate/m-p/303369#M256499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for replying, the output file gets already created anyway.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The point is that I cannot understand the nodes involved, even in the Javascript API cookbook example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;em&amp;gt;Executes a template from the repository against the current Document node:&amp;lt;/em&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;javascript&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var template = "&amp;lt;h3&amp;gt;Document name is ${document.name}&amp;lt;/h3&amp;gt;" +&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "The ID argument: ${args['id']}";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var args = new Array()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;args["id"] = "01234-56789";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var result = document.processTemplate(template, args);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// save the template result content to a new node in my home space&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var outputFile = userhome.createFile("output.txt");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outputFile.content = result;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/javascript&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here we have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. a template;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. an outputFile;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. and a document "against which the template is processed". What does this mean?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the meaning of "executing a template against a Document node"? What's the role of the Document node the template is processed against to?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Moreover, the outputFile is identical to the template: placeholders are not getting processed, they are output as is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 13:30:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/correct-use-of-processtemplate/m-p/303369#M256499</guid>
      <dc:creator>lordzoster</dc:creator>
      <dc:date>2014-02-26T13:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Correct use of processTemplate</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/correct-use-of-processtemplate/m-p/303370#M256500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Template+Model=New Output File&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the ideal scenario for any template processing language.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now in Alfresco "document" is predefined object in alfresco context which points to current node which is being processed. So, in this case it is just being used to access APIs related to template processing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 07:12:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/correct-use-of-processtemplate/m-p/303370#M256500</guid>
      <dc:creator>mitpatoliya</dc:creator>
      <dc:date>2014-03-03T07:12:39Z</dc:date>
    </item>
  </channel>
</rss>

