Skip to Content
author's profile photo Former Member
Former Member

File Attach Problem in XML Forms


I have created a project in the XML Forms Builder on EP6 SP2. In my Edit form, I must allow the user to browse and attach two files, one a PDF document and another a PowerPoint file. I am assuming that these files are stored in the KM repository with a path like "/docuemnts/Images/NewsCentral_T2.pdf". In my Project Options dialog box, I have specified the location of the 'Image Path' field as "/documents/Images". Every time I want some input help with the images in this same Form, I get to choose an image from this folder. By the same technique, I have also managed to attach the files.

In my Show Form, I have put two labels for these two files and I display them as links.

But When I try to view the <i>Show</i> Form in the browser and then try to click this link to open the respective document, I get an error message saying that "...this file cannot be displayed...". This does not happen with the images, and these are properly rendered (I have used an XFImage control for that...).

It seems that there is a problem with the URL that is generated when I click the link. For the images, the link after concatenation of the Image Path and the Image Name is something like "/documents/Images/logo.gif". However, on rendering in the Browser window, this URL gets coverted to "http://ep6:50000/irj/servlet/prt/portal/prtroot/"...

In case of the file, when I click the link and try to open the document in a new browser window, the URL gets converted to

"http://ep6:50000/documents/Images/NewsCentral_T2.pdf"...this should actually be


I want to achieve this URL regeneration for viewing my files. If anyone has any ideas or suggestions on this, please let me know.

Thanks and Regards,


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 20, 2004 at 02:18 PM

    don't worry it very easy, first dowload from etc/xmlforms/<proyectname> the form you use to view the files (<proyectname>RenderListItem.xsl or <proyectname>Show.xsl)

    then edit the one you are using to show the files,

    you will something like this


    read only field with reference to element Campo15<i><b>(the name of the label you have asigned to your field, for the file browser)</b></i>


    <p align="left">

    <xsl:if test="Link15=''">

    <xsl:value-of select="Campo15" disable-output-escaping="yes"/>


    <xsl:if test="Link15!=''">

    <a class="a2">

    <xsl:attribute name="href">


    <xsl:when test="starts-with(Link15, 'imagepath/')">

    <xsl:value-of select="$imagepath"/>/<xsl:value-of select="substring-after(Link15, 'imagepath/')"/>


    <xsl:when test="starts-with(Link15, '$imagepath/')">

    <xsl:value-of select="$imagepath"/>/<xsl:value-of select="substring-after(Link15, '$imagepath/')"/>


    <xsl:when test="starts-with(Link15, '%imagepath%/')">/irj/servlet/prt/portal/prtroot/<xsl:value-of select="substring-after(Link15, '%imagepath%/')"/>


    <xsl:when test="starts-with(Link15, '%projectimagepath%/')">/documents/Heineken/documentos/<xsl:value-of select="substring-after(Link15, '%projectimagepath%/')"/>


    <xsl:when test="starts-with(Link15, 'http')">javascript:open_url_in_window('<xsl:value-of select="Link15"/>')


    <xsl:otherwise>javascript:open_url_in_window('<b>/irj/servlet/prt/portal/prtroot/</b><i>(thats the line you have to add to diplay the document)</i><xsl:value-of select="Link15"/>')</xsl:otherwise>



    <xsl:value-of select="Campo15" disable-output-escaping="yes"/>








    then when you click on the link it would open the correct url http://ep6:50000/irj/servlet/prt/portal/prtroot/".

    adrian vindel

    realtech spain

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.