Skip to main content


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 09:39 Go to next message
Sureshkumar Ramachandran is currently offline Sureshkumar RamachandranFriend
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 07: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 18:58 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 124
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 08:02 Go to previous messageGo to next message
Sureshkumar Ramachandran is currently offline Sureshkumar RamachandranFriend
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 11:40 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 124
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 17:22 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 124
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:Error on New Bugzilla Repository in Juno
Next Topic:Review for Eclipse (R4E) 0.11.0 is now available
Goto Forum:
  


Current Time: Tue Mar 19 10:45:43 GMT 2024

Powered by FUDForum. Page generated in 0.04766 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top