<?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 Find content using an id and idref in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/find-content-using-an-id-and-idref/m-p/70828#M45780</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to be able to find any give piece of XML content using an id/idref within an XML file. This, at the moment, is so I can render an XML file and obtain information required by the XSLT (to present the content properly) from another XML file using an id/idref. As I am familiar with XSLT let me explain it on those terms;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Letâ€™s take two xml files:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;!– Content.xml –&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;content&amp;gt;&lt;BR /&gt;&amp;lt;name&amp;gt;Content&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;contentreference idref=â€&amp;#157;referenced_contentâ€&amp;#157; /&amp;gt;&lt;BR /&gt;&amp;lt;/content&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;!– Referenced Content.xml –&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;content id=â€&amp;#157;referenced_contentâ€&amp;#157;&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;Referenced Content&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;/content&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to be able to do something like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;!– output.xslt –&amp;gt;&lt;BR /&gt;…&lt;BR /&gt;&amp;lt;xsl:template match="content"&amp;gt;&lt;BR /&gt;&amp;lt;xsl:value-of select="name" /&amp;gt;&amp;lt;br /&amp;gt;&lt;BR /&gt;&amp;lt;xsl:variable name="referencedId" select="contentreference/@idref" /&amp;gt;&lt;BR /&gt;&amp;lt;xsl:value-of select="/content[@id=$referencedId]/name" /&amp;gt;&lt;BR /&gt;&amp;lt;/xsl:template&amp;gt;&lt;BR /&gt;…&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;and end up with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;!– output.html –&amp;gt;&lt;BR /&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&lt;BR /&gt;Content&amp;lt;br /&amp;gt; &amp;lt;!– taken from Content.xml –&amp;gt;&lt;BR /&gt;Referenced Content &amp;lt;!– taken from Referenced Content.xml –&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;In Alfresco, my understanding is that we could store everything in one directory with the id as the filename, then just use Alfrescoâ€™s XML loading function: parseXMLDocument() to do something like &lt;/SPAN&gt;&lt;EM&gt;&amp;lt;xsl:value-of select=â€&amp;#157;parseXMLDocument( contentreference/@idref )/nameâ€&amp;#157; /&amp;gt;&lt;/EM&gt;&lt;SPAN&gt; and we would get the output of output.xml in the above example. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only downfall here is that from the editing user's point of view (in our case) there would be over 1,000 content items with filenames like pu_ae_act-idalt_tsk-idalt or rm_ft_phs-projini_stage-projini in one directory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't want to store everything in the one xml file because this makes editing difficult from the users point of view due to it being in one massive file that would be difficult to search and edit in Alfresco. Remember there are over 1,000 items with sometimes over 10 different input fields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a better solution? I could go with the parseXMLDocument() and id named files but that doesn't seem elegant or user friendly. Should I be using FreeMarker?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Mar 2007 00:53:23 GMT</pubDate>
    <dc:creator>kooktroop</dc:creator>
    <dc:date>2007-03-06T00:53:23Z</dc:date>
    <item>
      <title>Find content using an id and idref</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/find-content-using-an-id-and-idref/m-p/70828#M45780</link>
      <description>I need to be able to find any give piece of XML content using an id/idref within an XML file. This, at the moment, is so I can render an XML file and obtain information required by the XSLT (to present the content properly) from another XML file using an id/idref. As I am familiar with XSLT let me e</description>
      <pubDate>Tue, 06 Mar 2007 00:53:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/find-content-using-an-id-and-idref/m-p/70828#M45780</guid>
      <dc:creator>kooktroop</dc:creator>
      <dc:date>2007-03-06T00:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Find content using an id and idref</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/find-content-using-an-id-and-idref/m-p/70829#M45781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;we certainly do not have a good solution for you right now.&amp;nbsp; what you're looking for is search for structured xml content - which is an interesting and hard problem.&amp;nbsp; the best solution i have for you - which is not a great solution by any means is to use the parseXMLDocuments(form_name) function to retrieve all documents created by that form and create your own hash of idrefs in xsl.&amp;nbsp; since this processing time is all at page creation - it only has an impact on your dev environment (page generation will be slow) - but your production environment will not have any impact from this.&amp;nbsp; please file a feature request for this at &lt;/SPAN&gt;&lt;A href="http://issues.alfresco.com" rel="nofollow noopener noreferrer"&gt;http://issues.alfresco.com&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2007 08:54:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/find-content-using-an-id-and-idref/m-p/70829#M45781</guid>
      <dc:creator>arielb</dc:creator>
      <dc:date>2007-03-06T08:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Find content using an id and idref</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/find-content-using-an-id-and-idref/m-p/70830#M45782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am going to try out;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In Alfresco, my understanding is that we could store everything in one directory with the id as the filename, then just use Alfrescoâ€™s XML loading function: parseXMLDocument() to do something like &lt;EM&gt;&amp;lt;xsl:value-of select=â€&amp;#157;parseXMLDocument( contentreference/@idref )/nameâ€&amp;#157; /&amp;gt;&lt;/EM&gt; and we would get the output of output.xml in the above example. &lt;BR /&gt;&lt;BR /&gt;The only downfall here is that from the editing user's point of view (in our case) there would be over 1,000 content items with filenames like pu_ae_act-idalt_tsk-idalt or rm_ft_phs-projini_stage-projini in one directory.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Failing that, I am going to try out your suggestion. Thanks for the response - I am really looking forward to seeing what kind of solution you guys come up with.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2007 22:13:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/find-content-using-an-id-and-idref/m-p/70830#M45782</guid>
      <dc:creator>kooktroop</dc:creator>
      <dc:date>2007-03-06T22:13:20Z</dc:date>
    </item>
  </channel>
</rss>

