On Wed, Jul 17, 2013 at 3:01 PM, Μάριος Πετρόπουλος <[email protected]> wrote:
> You are right . I am using it in multiple places . What i meant was to store
> each time the servers url  to a variable  and then place it to the actual
> link command line . For example
> <xsl:value-of select="concat('myvar/path/script.php?......
> Where myvar contains the servers name  at any given time..

Define:
<xsl:variable name="myappurl">http://yourapp.com</xsl:variable>

Use:
concat($myappurl + '/path/script.php', ...


> As far the second one yes a POST is what i need but i thought that it maybe
> be needed some new code adding.
> So in order to make a POST request do  i have to add a HTML form in the
> excisting script or it has to be entirely changed ?

Instead of
    <a>
        <xsl:attribute name="href">
        </xsl:attribute>
    </a>

Use

    <form>
        <input>
            <xsl:attribute name="type">hidden</xsl:attribute>
            <xsl:attribute name="name">file</xsl:attribute>
            <xsl:attribute name="value">
                <xsl:value-of select="$baseurl,
mets:FLocat[@LOCTYPE='URL']/@xlink:href)" />
            </xsl:attribute>
        </input>
        <input>
            <xsl:attribute name="type">submit</xsl:attribute>
            <xsl:attribute name="value">Send</xsl:attribute>
        </input>
    </form>

In script.php, instead of reading from $_GET['file'], read from
$_POST['file'] or even better from $_REQUEST['file'].

Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to