AnsweredAssumed Answered

Retrieve another document with no virtualization server

Question asked by kenk on Sep 16, 2010
Hi.

Here's my situation.  We are using Alfresco as our content repository for an e-commerce site that is run on another platform.  Basically, we create our XML documents and then deploy them out to our actual application server for use there.

We have an issue.  We have created a webform that is used to create aliases/shortcuts.  On the webform itself, we have a file picker that we used to select another document within the Alfresco web project that, basically, could have been created by any other webform and could exist in any other folder within the web project.

Originally, I constructed the rendering XSL for the webform as follows below (I'm just including the applicable snippett below).

  <xsl:template match="/">
      <xsl:element name="content">
            <xsl:variable name="project_doc">
               <xsl:value-of select="/hd:shortcut_module/hd:general_area/hd:shortcut"/>
            </xsl:variable>
          <xsl:attribute name="type">shortcut</xsl:attribute>
            <xsl:attribute name="path">
               <xsl:value-of select="result:getDocumentPath(string($alf:parent_path),string($alf:rendition_file_name))"/>
            </xsl:attribute>
            <xsl:attribute name="shortcut"><xsl:value-of select="/hd:shortcut_module/hd:general_area/hd:shortcut"/></xsl:attribute>
            <xsl:attribute name="locale"><xsl:value-of select="/hd:shortcut_module/hd:general_area/hd:locale"/></xsl:attribute>
           <xsl:attribute name="alt-lang-url"><xsl:value-of select="/hd:shortcut_module/hd:general_area/hd:alt_language"/></xsl:attribute>
            <xsl:attribute name="projectNum"><xsl:value-of select="document($project_doc)/hd:generic_edit_form/hd:general_area/hd:id_no"/></xsl:attribute>
            <xsl:attribute name="numOfSteps"><xsl:value-of select="count(document($project_doc)/hd:generic_edit_form/hd:project_steps_area/hd:project_step_details)"/></xsl:attribute>
            <xsl:attribute name="skill"><xsl:value-of select="document($project_doc)/hd:generic_edit_form/hd:general_area/hd:skill_level"/></xsl:attribute>
            <xsl:element name="precis">
               <xsl:value-of select="/hd:shortcut_module/hd:general_area/hd:precis"/>
            </xsl:element>
            <xsl:element name="thumbnails">
               <xsl:attribute name="thumbnail-1"><xsl:value-of select="/hd:shortcut_module/hd:general_area/hd:thumbnail_images/hd:thumbnail_1"/></xsl:attribute>
               <xsl:attribute name="thumbnail-2"><xsl:value-of select="/hd:shortcut_module/hd:general_area/hd:thumbnail_images/hd:thumbnail_2"/></xsl:attribute>
               <xsl:attribute name="thumbnail-3"><xsl:value-of select="/hd:shortcut_module/hd:general_area/hd:thumbnail_images/hd:thumbnail_3"/></xsl:attribute>
            </xsl:element>
      </xsl:element>
  </xsl:template>

The project_doc xsl variable grabs the path of the document that was entered in the file picker.  I then used the document XSL function (in bold above) to grab specific fields from that document and pass them here.  Of course, this function only works if the virtualization server is turned on (as was the case on my local machine).

However, here is the problem…on our staging server, we are apparently not turning the virtualization server on…so this function is not going to work.

Is anyone aware of another solution that offers similar functionality to what we are trying to do above that does NOT require the virtualization server?

Outcomes