You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Tsz-Wo Nicholas Sze <s2...@yahoo.com> on 2011/12/08 06:43:38 UTC

APT: How to add relative links with special symbols?

Hi,

I tried to add relative links with special symbols (e.g. '%', ' ', '(') to apt docs.  However, the special symbols are removed/replaced in the generated doc and so the link does not work.  For examples,

  * {{{../api/Test.html#foo(int, String)}Unespaced relative url}}
~~  BAD: It becomes <a href="../api/Test.html#fooint_String">Unespaced relative url</a>

  * {{{../api/Test.html#foo%28int,%20String%29}Espaced relative url}}
~~  BAD: It becomes <a href="../api/Test.html#foo28int20String29">Espaced relative url</a>


I notice that it works for absolute links.

  * {{{http://host/api/Test.html#foo(int, String)}Unespaced absolute url}}
~~  GOOD: It becomes <a class="externalLink" 
href="http://host/api/Test.html#foo(int, String)">Unespaced absolute 
url</a>

  * {{{http://host/api/Test.html#foo%28int,%20String%29}Espaced absolute url}}
~~  GOOD: It becomes <a class="externalLink" 
href="http://host/api/Test.html#foo%28int,%20String%29">Espaced 
absolute url</a>



I apologize if this is not the correct emailing list for the question.

Regards,

Nicholas


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


Re: APT: How to add relative links with special symbols?

Posted by Lukas Theussl <lt...@apache.org>.
Use xdoc for anything serious, that's my trick! :)

-Lukas


Tsz-Wo Nicholas Sze wrote:
> Hi Lukas,
>
> I have read the apt doc but I wonder if you may have some trick to do it.  :)
>
> Thanks again.
>
> Nicholas
>
>
>
>
> ________________________________
>   From: Lukas Theussl<lt...@apache.org>
> To: Maven Users List<us...@maven.apache.org>
> Sent: Thursday, December 8, 2011 12:44 AM
> Subject: Re: APT: How to add relative links with special symbols?
>
>
>
> Tsz-Wo Nicholas Sze wrote:
>> Hi Lukas,
>>
>> Thanks a lot for the reply.  So there is no way to do it due to DOXIA-397.
>
> As noted there, a workaround is to use absolute links.
>
>>
>> I got a second question: Is it possible to add links in verbatim text?  The following does not work.
>
> No, as documented at
> http://maven.apache.org/doxia/references/apt-format.html:
>
> 'Like in HTML, verbatim text is preformatted. Unlike HTML, verbatim text
> is escaped: inside a verbatim display, markup is not interpreted by the
> APT processor.'
>
> Cheers,
> -Lukas
>
>
>>
>> +-------------------------------------------------------------------
>> A link: {{{http://host/foo}foo}}
>> +-------------------------------------------------------------------
>> ~~ BAD: The output is "<pre>A link: {{{http://host/foo}foo}}</pre>".
>>
>> Regards,
>> Nicholas
>>
>> ________________________________
>>
>> From: Lukas Theussl<lt...@apache.org>
>> To: Maven Users List<us...@maven.apache.org>
>> Sent: Wednesday, December 7, 2011 11:17 PM
>> Subject: Re: APT: How to add relative links with special symbols?
>>
>>
>> That's a known issue and discussed here:
>>
>> http://jira.codehaus.org/browse/DOXIA-397
>>
>> HTH,
>> -Lukas
>>
>>
>> Tsz-Wo Nicholas Sze wrote:
>>> Hi,
>>>
>>> I tried to add relative links with special symbols (e.g. '%', ' ', '(') to apt docs.  However, the special symbols are removed/replaced in the generated doc and so the link does not work.  For examples,
>>>
>>>        * {{{../api/Test.html#foo(int, String)}Unespaced relative url}}
>>> ~~  BAD: It becomes<a href="../api/Test.html#fooint_String">Unespaced relative url</a>
>>>
>>>        * {{{../api/Test.html#foo%28int,%20String%29}Espaced relative url}}
>>> ~~  BAD: It becomes<a href="../api/Test.html#foo28int20String29">Espaced relative url</a>
>>>
>>>
>>> I notice that it works for absolute links.
>>>
>>>        * {{{http://host/api/Test.html#foo(int, String)}Unespaced absolute url}}
>>> ~~  GOOD: It becomes<a class="externalLink"
>>> href="http://host/api/Test.html#foo(int, String)">Unespaced absolute
>>> url</a>
>>>
>>>        * {{{http://host/api/Test.html#foo%28int,%20String%29}Espaced absolute url}}
>>> ~~  GOOD: It becomes<a class="externalLink"
>>> href="http://host/api/Test.html#foo%28int,%20String%29">Espaced
>>> absolute url</a>
>>>
>>>
>>>
>>> I apologize if this is not the correct emailing list for the question.
>>>
>>> Regards,
>>>
>>> Nicholas
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
> ---------------------------------------------------------------------
> 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: APT: How to add relative links with special symbols?

Posted by Tsz-Wo Nicholas Sze <s2...@yahoo.com>.
Hi Lukas,

I have read the apt doc but I wonder if you may have some trick to do it.  :)

Thanks again.

Nicholas




________________________________
 From: Lukas Theussl <lt...@apache.org>
To: Maven Users List <us...@maven.apache.org> 
Sent: Thursday, December 8, 2011 12:44 AM
Subject: Re: APT: How to add relative links with special symbols?
 


Tsz-Wo Nicholas Sze wrote:
> Hi Lukas,
>
> Thanks a lot for the reply.  So there is no way to do it due to DOXIA-397.

As noted there, a workaround is to use absolute links.

>
> I got a second question: Is it possible to add links in verbatim text?  The following does not work.

No, as documented at 
http://maven.apache.org/doxia/references/apt-format.html:

'Like in HTML, verbatim text is preformatted. Unlike HTML, verbatim text 
is escaped: inside a verbatim display, markup is not interpreted by the 
APT processor.'

Cheers,
-Lukas


>
> +-------------------------------------------------------------------
> A link: {{{http://host/foo}foo}}
> +-------------------------------------------------------------------
> ~~ BAD: The output is "<pre>A link: {{{http://host/foo}foo}}</pre>".
>
> Regards,
> Nicholas
>
> ________________________________
>
> From: Lukas Theussl<lt...@apache.org>
> To: Maven Users List<us...@maven.apache.org>
> Sent: Wednesday, December 7, 2011 11:17 PM
> Subject: Re: APT: How to add relative links with special symbols?
>
>
> That's a known issue and discussed here:
>
> http://jira.codehaus.org/browse/DOXIA-397
>
> HTH,
> -Lukas
>
>
> Tsz-Wo Nicholas Sze wrote:
>> Hi,
>>
>> I tried to add relative links with special symbols (e.g. '%', ' ', '(') to apt docs.  However, the special symbols are removed/replaced in the generated doc and so the link does not work.  For examples,
>>
>>      * {{{../api/Test.html#foo(int, String)}Unespaced relative url}}
>> ~~  BAD: It becomes<a href="../api/Test.html#fooint_String">Unespaced relative url</a>
>>
>>      * {{{../api/Test.html#foo%28int,%20String%29}Espaced relative url}}
>> ~~  BAD: It becomes<a href="../api/Test.html#foo28int20String29">Espaced relative url</a>
>>
>>
>> I notice that it works for absolute links.
>>
>>      * {{{http://host/api/Test.html#foo(int, String)}Unespaced absolute url}}
>> ~~  GOOD: It becomes<a class="externalLink"
>> href="http://host/api/Test.html#foo(int, String)">Unespaced absolute
>> url</a>
>>
>>      * {{{http://host/api/Test.html#foo%28int,%20String%29}Espaced absolute url}}
>> ~~  GOOD: It becomes<a class="externalLink"
>> href="http://host/api/Test.html#foo%28int,%20String%29">Espaced
>> absolute url</a>
>>
>>
>>
>> I apologize if this is not the correct emailing list for the question.
>>
>> Regards,
>>
>> Nicholas
>>
>>
>> ---------------------------------------------------------------------
>> 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

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

Re: APT: How to add relative links with special symbols?

Posted by Tsz Wo Sze <sz...@yahoo.com>.
Hi Lukas,

I have read the apt doc but I wonder if you may have some trick to do it.  :)

Thanks again.

Nicholas



________________________________
 From: Lukas Theussl <lt...@apache.org>
To: Maven Users List <us...@maven.apache.org> 
Sent: Thursday, December 8, 2011 12:44 AM
Subject: Re: APT: How to add relative links with special symbols?
 


Tsz-Wo Nicholas Sze wrote:
> Hi Lukas,
>
> Thanks a lot for the reply.  So there is no way to do it due to DOXIA-397.

As noted there, a workaround is to use absolute links.

>
> I got a second question: Is it possible to add links in verbatim text?  The following does not work.

No, as documented at 
http://maven.apache.org/doxia/references/apt-format.html:

'Like in HTML, verbatim text is preformatted. Unlike HTML, verbatim text 
is escaped: inside a verbatim display, markup is not interpreted by the 
APT processor.'

Cheers,
-Lukas


>
> +-------------------------------------------------------------------
> A link: {{{http://host/foo}foo}}
> +-------------------------------------------------------------------
> ~~ BAD: The output is "<pre>A link: {{{http://host/foo}foo}}</pre>".
>
> Regards,
> Nicholas
>
> ________________________________
>
> From: Lukas Theussl<lt...@apache.org>
> To: Maven Users List<us...@maven.apache.org>
> Sent: Wednesday, December 7, 2011 11:17 PM
> Subject: Re: APT: How to add relative links with special symbols?
>
>
> That's a known issue and discussed here:
>
> http://jira.codehaus.org/browse/DOXIA-397
>
> HTH,
> -Lukas
>
>
> Tsz-Wo Nicholas Sze wrote:
>> Hi,
>>
>> I tried to add relative links with special symbols (e.g. '%', ' ', '(') to apt docs.  However, the special symbols are removed/replaced in the generated doc and so the link does not work.  For examples,
>>
>>      * {{{../api/Test.html#foo(int, String)}Unespaced relative url}}
>> ~~  BAD: It becomes<a href="../api/Test.html#fooint_String">Unespaced relative url</a>
>>
>>      * {{{../api/Test.html#foo%28int,%20String%29}Espaced relative url}}
>> ~~  BAD: It becomes<a href="../api/Test.html#foo28int20String29">Espaced relative url</a>
>>
>>
>> I notice that it works for absolute links.
>>
>>      * {{{http://host/api/Test.html#foo(int, String)}Unespaced absolute url}}
>> ~~  GOOD: It becomes<a class="externalLink"
>> href="http://host/api/Test.html#foo(int, String)">Unespaced absolute
>> url</a>
>>
>>      * {{{http://host/api/Test.html#foo%28int,%20String%29}Espaced absolute url}}
>> ~~  GOOD: It becomes<a class="externalLink"
>> href="http://host/api/Test.html#foo%28int,%20String%29">Espaced
>> absolute url</a>
>>
>>
>>
>> I apologize if this is not the correct emailing list for the question.
>>
>> Regards,
>>
>> Nicholas
>>
>>
>> ---------------------------------------------------------------------
>> 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

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

Re: APT: How to add relative links with special symbols?

Posted by Lukas Theussl <lt...@apache.org>.

Tsz-Wo Nicholas Sze wrote:
> Hi Lukas,
>
> Thanks a lot for the reply.  So there is no way to do it due to DOXIA-397.

As noted there, a workaround is to use absolute links.

>
> I got a second question: Is it possible to add links in verbatim text?  The following does not work.

No, as documented at 
http://maven.apache.org/doxia/references/apt-format.html:

'Like in HTML, verbatim text is preformatted. Unlike HTML, verbatim text 
is escaped: inside a verbatim display, markup is not interpreted by the 
APT processor.'

Cheers,
-Lukas


>
> +-------------------------------------------------------------------
> A link: {{{http://host/foo}foo}}
> +-------------------------------------------------------------------
> ~~ BAD: The output is "<pre>A link: {{{http://host/foo}foo}}</pre>".
>
> Regards,
> Nicholas
>
> ________________________________
>
> From: Lukas Theussl<lt...@apache.org>
> To: Maven Users List<us...@maven.apache.org>
> Sent: Wednesday, December 7, 2011 11:17 PM
> Subject: Re: APT: How to add relative links with special symbols?
>
>
> That's a known issue and discussed here:
>
> http://jira.codehaus.org/browse/DOXIA-397
>
> HTH,
> -Lukas
>
>
> Tsz-Wo Nicholas Sze wrote:
>> Hi,
>>
>> I tried to add relative links with special symbols (e.g. '%', ' ', '(') to apt docs.  However, the special symbols are removed/replaced in the generated doc and so the link does not work.  For examples,
>>
>>      * {{{../api/Test.html#foo(int, String)}Unespaced relative url}}
>> ~~  BAD: It becomes<a href="../api/Test.html#fooint_String">Unespaced relative url</a>
>>
>>      * {{{../api/Test.html#foo%28int,%20String%29}Espaced relative url}}
>> ~~  BAD: It becomes<a href="../api/Test.html#foo28int20String29">Espaced relative url</a>
>>
>>
>> I notice that it works for absolute links.
>>
>>      * {{{http://host/api/Test.html#foo(int, String)}Unespaced absolute url}}
>> ~~  GOOD: It becomes<a class="externalLink"
>> href="http://host/api/Test.html#foo(int, String)">Unespaced absolute
>> url</a>
>>
>>      * {{{http://host/api/Test.html#foo%28int,%20String%29}Espaced absolute url}}
>> ~~  GOOD: It becomes<a class="externalLink"
>> href="http://host/api/Test.html#foo%28int,%20String%29">Espaced
>> absolute url</a>
>>
>>
>>
>> I apologize if this is not the correct emailing list for the question.
>>
>> Regards,
>>
>> Nicholas
>>
>>
>> ---------------------------------------------------------------------
>> 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

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


Re: APT: How to add relative links with special symbols?

Posted by Tsz-Wo Nicholas Sze <s2...@yahoo.com>.
Hi Lukas,

Thanks a lot for the reply.  So there is no way to do it due to DOXIA-397.

I got a second question: Is it possible to add links in verbatim text?  The following does not work.

+-------------------------------------------------------------------
A link: {{{http://host/foo}foo}}
+-------------------------------------------------------------------
~~ BAD: The output is "<pre>A link: {{{http://host/foo}foo}}</pre>".

Regards,
Nicholas

________________________________

From: Lukas Theussl <lt...@apache.org>
To: Maven Users List <us...@maven.apache.org> 
Sent: Wednesday, December 7, 2011 11:17 PM
Subject: Re: APT: How to add relative links with special symbols?


That's a known issue and discussed here:

http://jira.codehaus.org/browse/DOXIA-397

HTH,
-Lukas


Tsz-Wo Nicholas Sze wrote:
> Hi,
>
> I tried to add relative links with special symbols (e.g. '%', ' ', '(') to apt docs.  However, the special symbols are removed/replaced in the generated doc and so the link does not work.  For examples,
>
>    * {{{../api/Test.html#foo(int, String)}Unespaced relative url}}
> ~~  BAD: It becomes<a href="../api/Test.html#fooint_String">Unespaced relative url</a>
>
>    * {{{../api/Test.html#foo%28int,%20String%29}Espaced relative url}}
> ~~  BAD: It becomes<a href="../api/Test.html#foo28int20String29">Espaced relative url</a>
>
>
> I notice that it works for absolute links.
>
>    * {{{http://host/api/Test.html#foo(int, String)}Unespaced absolute url}}
> ~~  GOOD: It becomes<a class="externalLink"
> href="http://host/api/Test.html#foo(int, String)">Unespaced absolute
> url</a>
>
>    * {{{http://host/api/Test.html#foo%28int,%20String%29}Espaced absolute url}}
> ~~  GOOD: It becomes<a class="externalLink"
> href="http://host/api/Test.html#foo%28int,%20String%29">Espaced
> absolute url</a>
>
>
>
> I apologize if this is not the correct emailing list for the question.
>
> Regards,
>
> Nicholas
>
>
> ---------------------------------------------------------------------
> 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: APT: How to add relative links with special symbols?

Posted by Lukas Theussl <lt...@apache.org>.
That's a known issue and discussed here:

http://jira.codehaus.org/browse/DOXIA-397

HTH,
-Lukas


Tsz-Wo Nicholas Sze wrote:
> Hi,
>
> I tried to add relative links with special symbols (e.g. '%', ' ', '(') to apt docs.  However, the special symbols are removed/replaced in the generated doc and so the link does not work.  For examples,
>
>    * {{{../api/Test.html#foo(int, String)}Unespaced relative url}}
> ~~  BAD: It becomes<a href="../api/Test.html#fooint_String">Unespaced relative url</a>
>
>    * {{{../api/Test.html#foo%28int,%20String%29}Espaced relative url}}
> ~~  BAD: It becomes<a href="../api/Test.html#foo28int20String29">Espaced relative url</a>
>
>
> I notice that it works for absolute links.
>
>    * {{{http://host/api/Test.html#foo(int, String)}Unespaced absolute url}}
> ~~  GOOD: It becomes<a class="externalLink"
> href="http://host/api/Test.html#foo(int, String)">Unespaced absolute
> url</a>
>
>    * {{{http://host/api/Test.html#foo%28int,%20String%29}Espaced absolute url}}
> ~~  GOOD: It becomes<a class="externalLink"
> href="http://host/api/Test.html#foo%28int,%20String%29">Espaced
> absolute url</a>
>
>
>
> I apologize if this is not the correct emailing list for the question.
>
> Regards,
>
> Nicholas
>
>
> ---------------------------------------------------------------------
> 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