Oh, you mean the base URL of the DSpace server, not the script server? You
can get it from DRI request.serverName. Here's the simplified version:

<xsl:value-of select="concat('http://',
/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='request'
and @qualifier='serverName'])"/>


Ideally, you should concat request.scheme, request.serverName and
request.serverPort, I'm just lazy.


Regards,
~~helix84

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


On Thu, Jul 18, 2013 at 1:51 PM, Μάριος Πετρόπουλος <acid...@yahoo.gr>
wrote:
> Instead of me defying the url in <xsl:variable
> name="myappurl">http://yourapp.com</xsl:variable>  , i want the script to
> identify the actual Url
>
> Something like php's  $_SERVER['HTTP_HOST']; . although i know that there
is
> not such a command in xsl
>
> Thank you again
> ________________________________
> Απο: helix84 <heli...@centrum.sk>
> Προς: Μάριος Πετρόπουλος <acid...@yahoo.gr>
> Κοιν.: dspace-tech <dspace-tech@lists.sourceforge.net>
> Στάλθηκε: 1:14 π.μ. Πέμπτη, 18 Ιουλίου 2013
>
> Θέμα: Re: Σχετ: [Dspace-tech] url redirection on view/ open for an item
>
> Isn't that what I did in the last example with xsl:variable? Sorry, I
> don't understand if you mean something else.
>
>
>
> Regards,
> ~~helix84
>
> Compulsory reading: DSpace Mailing List Etiquette
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>
>
> On Thu, Jul 18, 2013 at 12:37 AM, Μάριος Πετρόπουλος <acid...@yahoo.gr>
> wrote:
>> Thanks again but as far my first question ,is it possible for the url to
>> be
>> stored dynamically to the xsl variable ?
>>
>> Thank you very much
>
>> ________________________________
>> Απο: helix84 <heli...@centrum.sk>
>> Προς: Μάριος Πετρόπουλος <acid...@yahoo.gr>
>> Κοιν.: dspace-tech <dspace-tech@lists.sourceforge.net>
>> Στάλθηκε: 6:15 π.μ. Τετάρτη, 17 Ιουλίου 2013
>
>>
>> Θέμα: Re: Σχετ: [Dspace-tech] url redirection on view/ open for an item
>>
>> On Wed, Jul 17, 2013 at 3:01 PM, Μάριος Πετρόπουλος <acid...@yahoo.gr>
>> 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
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to