You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Bruno Antunes <ba...@whateversoft.com> on 2003/04/12 20:02:07 UTC

How to reference href's from the root of the web site

When we define "relative href's", maven (or the engine it uses) assumes 
that / is relative to the root of the "project site"

Example

         <menu name="Menu">
             <item name="Use It!"   href="/use-it.html"/>
         </menu>

When HTML is generated in the link, the HTML generated is
<a href="use-it.html">Use It!</a>

What if we wanted to reference the root of the web site, how can we 
reference it without giving in the href the full URL of the site.

-- 
Bruno Antunes,
Java Software Engineer




WhatEverSoft - http://www.whateversoft.com
Pra�a de Alvalade, n.� 6 - 4.� piso
1700-036 Lisboa, PORTUGAL
Tel: +351 217994200
Fax: +351 217994242

--

A presente mensagem pode conter informa��o considerada confidencial.
Se o receptor desta mensagem n�o for o destinat�rio indicado, fica
expressamente proibido de copiar ou endere�ar a mensagem a terceiros.
Em tal situa��o, o receptor dever� destruir a presente mensagem e por
gentileza informar o emissor de tal facto.

Privileged or confidential information may be contained in this
message. If you are not the addressee indicated in this message, you
may not copy or deliver this message to anyone. In such case, you
should destroy this message and kindly notify the sender by reply
email.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to reference href's from the root of the web site

Posted by Bruno Antunes <ba...@whateversoft.com>.
Rafal Krzewski sugestion are intuitive.
I will never have guessed the /absolute/ syntax


Rafal Krzewski wrote:

>dion@multitask.com.au wrote:
>  
>
>>Rafal,
>>
>>got an alternative syntax/suggestion?
>>    
>>
>
>Well, follow the well known FS path/URL conventions:
>
><schema>:<whatever> is absolute
>/<whatever> is absolute
><whatever> is relative to current dir
>./<whatever> is relative to current dir
>../<whatever> is relative to parent dir
>etc
>
>I sent patches to make xdoc plugin work this way, but these where
>rolled back because there are some projects that depend on
>/absolute//<whatever> syntax.
>
>
>R.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>  
>

-- 
Bruno Antunes,
Java Software Engineer




WhatEverSoft - http://www.whateversoft.com
Pra�a de Alvalade, n.� 6 - 4.� piso
1700-036 Lisboa, PORTUGAL
Tel: +351 217994200
Fax: +351 217994242

--

A presente mensagem pode conter informa��o considerada confidencial.
Se o receptor desta mensagem n�o for o destinat�rio indicado, fica
expressamente proibido de copiar ou endere�ar a mensagem a terceiros.
Em tal situa��o, o receptor dever� destruir a presente mensagem e por
gentileza informar o emissor de tal facto.

Privileged or confidential information may be contained in this
message. If you are not the addressee indicated in this message, you
may not copy or deliver this message to anyone. In such case, you
should destroy this message and kindly notify the sender by reply
email.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to reference href's from the root of the web site

Posted by Rafal Krzewski <Ra...@caltha.pl>.
dion@multitask.com.au wrote:
> Rafal,
> 
> got an alternative syntax/suggestion?

Well, follow the well known FS path/URL conventions:

<schema>:<whatever> is absolute
/<whatever> is absolute
<whatever> is relative to current dir
./<whatever> is relative to current dir
../<whatever> is relative to parent dir
etc

I sent patches to make xdoc plugin work this way, but these where
rolled back because there are some projects that depend on
/absolute//<whatever> syntax.


R.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to reference href's from the root of the web site

Posted by di...@multitask.com.au.
Rafal,

got an alternative syntax/suggestion?
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au


Rafal Krzewski <Ra...@caltha.pl> wrote on 15/04/2003 07:05:15 PM:

> Ben Walding wrote:
> > /absolute/<url>
> > eg
> > /absolute//index.html
> 
> Intuivive, isn't it? ;-)
> 
> I think this is my number one Maven "pet" misfeature...
> 
> R.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to reference href's from the root of the web site

Posted by Rafal Krzewski <Ra...@caltha.pl>.
Ben Walding wrote:
> /absolute/<url>
> eg
> /absolute//index.html

Intuivive, isn't it? ;-)

I think this is my number one Maven "pet" misfeature...

R.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to reference href's from the root of the web site

Posted by Ben Walding <de...@walding.com>.
/absolute/<url>
eg
/absolute//index.html

Bruno Antunes wrote:

> When we define "relative href's", maven (or the engine it uses) 
> assumes that / is relative to the root of the "project site"
>
> Example
>
>         <menu name="Menu">
>             <item name="Use It!"   href="/use-it.html"/>
>         </menu>
>
> When HTML is generated in the link, the HTML generated is
> <a href="use-it.html">Use It!</a>
>
> What if we wanted to reference the root of the web site, how can we 
> reference it without giving in the href the full URL of the site.
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org