Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » Media wiki Internal Links connecting Problem
Media wiki Internal Links connecting Problem [message #894451] Mon, 09 July 2012 05:39 Go to next message
Sureshkumar Ramachandran is currently offline Sureshkumar Ramachandran
Messages: 2
Registered: July 2012
Junior Member
Hi,

pleased to meet you,am a Newcomer here

My ant task would be creating Eclipse Help Document in Media wiki format

wikitext-to-xslfo

wikitext-to-eclipse-help

I'm trying to set up different internal Links between single media-wiki file, which unfortunately I couldn't make.

for example

= Chapter 1 =

blabla

== section 1.1 ==

blabla
[[Chapter_3#sec1]]

= Chapter 2 =


= Chapter 3 =

== section 3.1 ==





Any Suggestions to make the internal links work ?

Best Regards,

Suresh

[Updated on: Tue, 10 July 2012 03:39]

Report message to a moderator

Re: Media wiki Internal Links connecting Problem [message #894598 is a reply to message #894451] Mon, 09 July 2012 14:58 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 117
Registered: November 2010
Senior Member
I am not sure to understand what you try to do. I assume you know the example on this page: CrowSourcingExample (have a look on the referenced GitHub project: wikitext examples source code)

Personally I am doing the conversion in a standard JavaSE project (having org.eclipse.mylyn.wikitext.core and
org.eclipse.mylyn.wikitext.mediawiki.core jars on the classpath) because I wanted to have more customization options as what is provided by the default ANT task.

If you have a MediaWikiLangage instance you can influence where the link is pointing (an other internal page or the original external page) with setPageMapping(..). You implement the page PageMapping Interface with an Implementation that suit your needs.

I am not sure that this is what you are looking for. Do not hesitate to ask other questions and to provide some example of what you are doing.
Re: Media wiki Internal Links connecting Problem [message #894699 is a reply to message #894598] Tue, 10 July 2012 04:02 Go to previous messageGo to next message
Sureshkumar Ramachandran is currently offline Sureshkumar Ramachandran
Messages: 2
Registered: July 2012
Junior Member
Actually I'm trying to set up different internal Links between sections in a single media-wiki file and to generate the Eclipse help as well as the PDF.

for example

= Chapter 1 =

blabla

== section 1.1 ==

blabla
[[Chapter_3#sec1]]

= Chapter 2 =


= Chapter 3 =

== section 3.1 ==


These internal links doesn't work in both Eclipse Help and PDF.Am bit stuck up with the syntax(create internal links) to do so.
Re: Media wiki Internal Links connecting Problem [message #894753 is a reply to message #894699] Tue, 10 July 2012 07:40 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 117
Registered: November 2010
Senior Member
Hi,

Thanks for the example... This links are valid in MediaWiki:
* [[#section_1.1]]
* [[#Chapter_2|second chapter]]
* [[SectionTestPage#Chapter_3]]
* [[SectionTestPage#section_3.1|this section]]


See: Help:Links

Here is what I got from the MediaWiki instance:
...
<h2><span class="editsection">[<a href="/<path to wiki>/mediawiki/index.php?title=SectionTest&amp;action=edit&amp;section=2" title="Edit section: section 1.1">edit</a>]</span> <span class="mw-headline" id="section_1.1"> section 1.1 </span></h2>
...


From what I remember, your Problem is that WikiText does not exactly the same conversion:
* the span tag is not added.
* h2 got an additional id
(this should be confirmed with a small test).

Therefore, the MediaWikiLangage should also convert the anchor part of the link.

.
Re: Media wiki Internal Links connecting Problem [message #894837 is a reply to message #894753] Tue, 10 July 2012 13:22 Go to previous message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 117
Registered: November 2010
Senior Member
Hi,

Just to be sure, I had a look at the output of Mylyn WikiTest for the same input:
<p>blabla</p><h2 id="section_1.1">section 1.1</h2><p>blabla</p>


Therefore the internal links can not work (in both MediaWiki and WikiText).


To my mind, the MediaWikiIdGenerationStrategy could be improved to match what MediaWiki is doing (consider the numeration of the section).

Do you want to have a bug opened for this ?
Previous Topic:[Model Focusing Tool]"Not a valid landmark"
Next Topic:Question on Mylyn usage
Goto Forum:
  


Current Time: Sat Apr 19 18:38:07 EDT 2014

Powered by FUDForum. Page generated in 0.01619 seconds