<?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: Update a repository xml file using XSLT in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/update-a-repository-xml-file-using-xslt/m-p/163687#M117470</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I believe this is possible by walking the AVM to find the second file, however this approach won't work in the presence of concurrent updates - the following sequence of steps illustrate the problem:&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL style="list-style-type:decimal;"&gt;&lt;LI&gt;User A edits news item X, which (via XSLT) also modifies the "new news items" item.&amp;nbsp; Both item X and the "new news items" item are automatically locked by user A.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;User B edits news item Y, which (via the same XSLT) attempts to modify the "new news items" item but fails since it's locked by user A.&lt;/LI&gt;&lt;/OL&gt;&lt;SPAN&gt;At this point user B has two choices:&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL style="list-style-type:decimal;"&gt;&lt;LI&gt;wait until user A's changes are promoted to staging (which releases the locks)&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;submit their changes anyway, in which case news item Y will be missing from the "new news item" item&lt;/LI&gt;&lt;/OL&gt;&lt;SPAN&gt;I had raised a JIRA ticket last year requesting that it be possible to be able to configure renditioning templates to re-execute at the time content is promoted to staging, but I can't seem to find it now (it may have been lost in the recent JIRA reorganisation).&amp;nbsp; That avoids this problem by ensuring the content of the second "shared" item is regenerated every time anything changes in staging.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 10 May 2008 14:44:23 GMT</pubDate>
    <dc:creator>pmonks</dc:creator>
    <dc:date>2008-05-10T14:44:23Z</dc:date>
    <item>
      <title>Update a repository xml file using XSLT</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/update-a-repository-xml-file-using-xslt/m-p/163686#M117469</link>
      <description>Hi,When a user creates a news article I am trying to update an existing xml document which holds a list of news items with the new news item.Therefore, I need to update another node (xml file) from an xslt template executed from the news webform.&amp;nbsp; I know where the target node is in the repository (/</description>
      <pubDate>Sat, 10 May 2008 06:50:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/update-a-repository-xml-file-using-xslt/m-p/163686#M117469</guid>
      <dc:creator>boneill</dc:creator>
      <dc:date>2008-05-10T06:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Update a repository xml file using XSLT</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/update-a-repository-xml-file-using-xslt/m-p/163687#M117470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I believe this is possible by walking the AVM to find the second file, however this approach won't work in the presence of concurrent updates - the following sequence of steps illustrate the problem:&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL style="list-style-type:decimal;"&gt;&lt;LI&gt;User A edits news item X, which (via XSLT) also modifies the "new news items" item.&amp;nbsp; Both item X and the "new news items" item are automatically locked by user A.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;User B edits news item Y, which (via the same XSLT) attempts to modify the "new news items" item but fails since it's locked by user A.&lt;/LI&gt;&lt;/OL&gt;&lt;SPAN&gt;At this point user B has two choices:&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL style="list-style-type:decimal;"&gt;&lt;LI&gt;wait until user A's changes are promoted to staging (which releases the locks)&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;submit their changes anyway, in which case news item Y will be missing from the "new news item" item&lt;/LI&gt;&lt;/OL&gt;&lt;SPAN&gt;I had raised a JIRA ticket last year requesting that it be possible to be able to configure renditioning templates to re-execute at the time content is promoted to staging, but I can't seem to find it now (it may have been lost in the recent JIRA reorganisation).&amp;nbsp; That avoids this problem by ensuring the content of the second "shared" item is regenerated every time anything changes in staging.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 May 2008 14:44:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/update-a-repository-xml-file-using-xslt/m-p/163687#M117470</guid>
      <dc:creator>pmonks</dc:creator>
      <dc:date>2008-05-10T14:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Update a repository xml file using XSLT</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/update-a-repository-xml-file-using-xslt/m-p/163688#M117471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Peter for your response,&amp;nbsp; I should have thought of that.&amp;nbsp; I have had my head so stuck into how the technology works that I did not think the versioning part of the solution through.&amp;nbsp; The conclusion I have come to is that if I want to show an index of the news items I should create the index page as a jsp and let the jsp query the repository for all news items at request time.&amp;nbsp; From what I have been reading (I am relatively new to alfresco) this would be implemented as a restful webscript that returned the data as xml via ftl &amp;amp; json etc.&amp;nbsp; One of the things I am still unsure of is the architecture for this solution.&amp;nbsp; From what i can make out it means I have to have an ASR available for the webscript to connect to (I assume an ASR is an Alfresco WCM Repository server that the generated website/project is copied to at deployment ).&amp;nbsp; Is this architecture correct.&amp;nbsp;&amp;nbsp; The reason I was trying to update an xml file with the index information during the creation of a new news item was so that I could have a totally static site (a lot of flash driven via xml).&amp;nbsp; If I use a webscript it means that I have a dependency on an ASR.&amp;nbsp; Is this correct or am I missing something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Brian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 May 2008 11:22:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/update-a-repository-xml-file-using-xslt/m-p/163688#M117471</guid>
      <dc:creator>boneill</dc:creator>
      <dc:date>2008-05-11T11:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Update a repository xml file using XSLT</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/update-a-repository-xml-file-using-xslt/m-p/163689#M117472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yep you're spot on.&amp;nbsp; Another option would be to deploy out to a filesystem (via an FSR) then use a custom FSDeploymentRunnable to either regenerate the "new news item" page at deployment time, or push the content into some other kind of queryable repository (such as a relational or XML database).&amp;nbsp; Both of these approaches complicate preview however - only the ASR + Web Scripts approach readily supports preview (although it currently requires a little bit of customisation - see &lt;/SPAN&gt;&lt;A href="http://forums.alfresco.com/viewtopic.php?t=11845" rel="nofollow noopener noreferrer"&gt;http://forums.alfresco.com/viewtopic.php?t=11845&lt;/A&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;A href="http://issues.alfresco.com/browse/ALFCOM-334" rel="nofollow noopener noreferrer"&gt;http://issues.alfresco.com/browse/ALFCOM-334&lt;/A&gt;&lt;SPAN&gt; for details).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The basic challenge with purely static sites is that once you start pre-generating pages that are sourced from multiple content items, the dependency graph quickly become&amp;nbsp; extremely complicated (ie. it becomes difficult to know what to regenerate when items are created / updated / deleted).&amp;nbsp; Pushing that problem out to the delivery environment and solving it at request time (via dynamic queries to an ASR or database or whatever) is trivial in comparison (albeit with decreased performance, although in this day and age the techniques for implementing high performance dynamic websites are becoming reasonably well defined).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 May 2008 15:33:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/update-a-repository-xml-file-using-xslt/m-p/163689#M117472</guid>
      <dc:creator>pmonks</dc:creator>
      <dc:date>2008-05-11T15:33:56Z</dc:date>
    </item>
  </channel>
</rss>

