<?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: Processing a freemarker template from Javascript API in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/processing-a-freemarker-template-from-javascript-api/m-p/118827#M83813</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well for a start the #assign tag should not be closed with /&amp;gt; - freemarker is not script XML or even close. Is the 'document' object what you think it should be? i.e. are you actually get a useful DOM? The 'document' object for the FreeMarker context will be set to the script node that is executing the processTemplate() call - it is not the document that is the context for the script itself. You will probably need to use the 'args' facility to pass in noderefs etc. of the objects you want to access in Freemarker and look them up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Oct 2007 12:39:30 GMT</pubDate>
    <dc:creator>kevinr</dc:creator>
    <dc:date>2007-10-17T12:39:30Z</dc:date>
    <item>
      <title>Processing a freemarker template from Javascript API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/processing-a-freemarker-template-from-javascript-api/m-p/118826#M83812</link>
      <description>Hi. As part of a content rule I'm executing a script. As part of that script i'd like to run a bit of freemarker to extract part of an xhtml document. For example:var strFreemarker = "&amp;lt;#assign dom=document.xmlNodeModel /&amp;gt;${dom.html}";&amp;nbsp;&amp;nbsp;&amp;nbsp;var strContent = document.processTemplate(strFreemarker);</description>
      <pubDate>Tue, 09 Oct 2007 12:33:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/processing-a-freemarker-template-from-javascript-api/m-p/118826#M83812</guid>
      <dc:creator>randomman</dc:creator>
      <dc:date>2007-10-09T12:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Processing a freemarker template from Javascript API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/processing-a-freemarker-template-from-javascript-api/m-p/118827#M83813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well for a start the #assign tag should not be closed with /&amp;gt; - freemarker is not script XML or even close. Is the 'document' object what you think it should be? i.e. are you actually get a useful DOM? The 'document' object for the FreeMarker context will be set to the script node that is executing the processTemplate() call - it is not the document that is the context for the script itself. You will probably need to use the 'args' facility to pass in noderefs etc. of the objects you want to access in Freemarker and look them up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2007 12:39:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/processing-a-freemarker-template-from-javascript-api/m-p/118827#M83813</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2007-10-17T12:39:30Z</dc:date>
    </item>
  </channel>
</rss>

