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

XML form: concatinating data fields in "output views"

Hi,

We are looking for a way to concatinate datafields/strings in the "show" XML forms. In our case we have 2 datafields in the datastructure: "picture" and "size". These 2 datafields will be combined with the servername of a media server to provide the URL for pictures in XML form articles.

As an example:

<picture>image1.jpg</picture>

<size>200</size>

will result in the URL:

http://<mediaserver>/<picture>?format=<size>

I see 2 ways this can be done:

- concatinating the strings in the input form for the picture that is to be shown

- saving the concatinated urlstring in an own datafield whitch is used as the picture url

Can anyone help out with how we can concatinate datafields and strings like this?

Can this alternatively be done in the xslt files?

best regards,

Bjorn

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Oct 20, 2005 at 08:26 AM

    Hi Bjorn,

    your described sceanrio (combining data fileds) cannot be reached by XFBuilder standard methods. But naturally its easy to modify your Show.xsl afterwards.

    Therefore you have to find the Label in the XSL for displaying your link, and insert some piece of XSL code, for example, something like that:

    <a class="urLnkReport urTxtStd">

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

    <xsl:attribute name="href">

    javascript:open_url('http://mydomain/<xsl:value-of select="picture"/>?format=<xsl:value-of select="size"/>')

    </xsl:attribute>

    </xsl:if>

    </a>

    You can easily test your hand made XSL styles without restarting your portal, if you are clearing the the caches

    (a) ca_pipeline

    (b) ca_xmlforms*

    from the CacheMonitor

    hope that helps

    --Matthias

    Message was edited by: Matthias Rinck

    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.