Skip to main content



      Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Infocenter: link to an anchor in another plugin goes to top of file(How to link to an xml:id in another plugin?)
Infocenter: link to an anchor in another plugin goes to top of file [message #658570] Tue, 08 March 2011 22:13 Go to next message
Eclipse UserFriend
Docbook 5, Eclipse 3.4.2, Infocenter

Can link from one help plugin to a file in another help plugin, but NOT to an IDREF in the file.

Tried 2 approaches to get this working so far.

from Docbook:

xlink:href="PLUGINS_ROOT/plugin.id.here/file.html#foo"
xlink:href="PLUGINS_ROOT/plugin.id.here/file.html%23foo"

to HTML like this downloaded from infocenter:

<a class="link" href="../plugin.id.here/file.html#foo" target="_top">
<a class="link" href="../plugin.id.here/file.html%23foo" target="_top">

to URLs like these when you right-click the hotspot and open a new window:

http://server:8080/help/index.jsp?topic=/plugin.id.here/file .html

http//server:8080/help/topic/plugin.is.here/file.html%23foo

"foo" has been stripped off the first URL.
The second URL opens the topic in a window without frames. If I copy the second URL and replace "topic" with index.jsp?topic=, I get a window with frames and the info at the "foo" anchor is on top. How can I get the help system to do this???
thanks


Re: Infocenter: link to an anchor in another plugin goes to top of file [message #658823 is a reply to message #658570] Wed, 09 March 2011 17:38 Go to previous messageGo to next message
Eclipse UserFriend
I can confirm everything that you have observed. The first variant cannot work because the anchor is not passed to the server. The second variant because the %23 is interpreted as part of the file name by the FramesetFilter.

The syntax below seems to work

http://localhost:8081/help/index.jsp?topic=/org.eclipse.ua.t ests/data/help/manual/anchors.html&anchor=two
Re: Infocenter: link to an anchor in another plugin goes to top of file [message #659300 is a reply to message #658823] Fri, 11 March 2011 17:28 Go to previous messageGo to next message
Eclipse UserFriend
Thanks, Chris. However, I don't understand how/where to apply this solution. The XML editor and XML parser do not understand "&anchor=".

I know nearly nil about XSL, but, do I need to make a change in the XSL to get it to output something like this:

<a class="link" href="../plugin.id.here/file.html&anchor="foo" target="_top">?

(Parenthetical to solving my immediate problem: If anyone could comment and/or point me to some good reading material on the following, I'd appreciate it. Infocenter help comprehends fragment IDs in a fully qualified external link. (http://www.x.y.html#id) Why doesn't it seem to comprehend fragment IDs in a plugin? Is there a feature request for it? Is there a bug report for it? Is the solution to my problem to provide a fully qualified external link back into my infocenter? (I guess I can try that. It seems messy.)

Thanks for your help and kind regards.
Re: Infocenter: link to an anchor in another plugin goes to top of file [message #659301 is a reply to message #659300] Fri, 11 March 2011 17:47 Go to previous messageGo to next message
Eclipse UserFriend
Maybe I'm not understanding your original question. The help system itself can handle references to anchors but I'm not familiar with how DocBook works so I don't know what syntax it takes.

The output you are trying to get is

<a class="link" href="../plugin.id.here/file.html#anchorname" >?
Re: Infocenter: link to an anchor in another plugin goes to top of file [message #660335 is a reply to message #659301] Thu, 17 March 2011 20:39 Go to previous messageGo to next message
Eclipse UserFriend
Hi Chris,

"The help system itself can handle references to anchors "
Can you point me to an example? Of XML and/or of the HTML?

The previous example: "The syntax below seems to work

http://localhost:8081/help/index.jsp?topic=/org.eclipse.ua.t ests/data/help/manual/anchors.html&anchor=two"

might not help me because it might be something either typed into the browser address bar manually or produced by Infocenter/Eclipse. What HTML input could I feed into Infocenter/Eclipse to get it to spit out an address like the ones that work. (I'm stuck.)
Re: Infocenter: link to an anchor in another plugin goes to top of file [message #660341 is a reply to message #659301] Thu, 17 March 2011 22:20 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I have been trying the various options. I have seen recommendations to use URLS like this:

<a href="PLUGINS_ROOT/{plugin-id}/page.html">here</a>

so that correct relative URL is created. Now the above will will work but any of the alternatives I have seen strip off the anchors. For example:

<a href="PLUGINS_ROOT/{plugin-id}/page.html#myAnchor">here</a >

<a href="PLUGINS_ROOT/{plugin-id}/page.html?anchor=myAnchor">here </a>

etc... They are all stripped off....

Are there any options using PLUGINS_ROOT that won't strip the anchor.

Note that we don't want to use an absolute URL (which we can get to work) because the deployment URL will vary.

Steve
Re: Infocenter: link to an anchor in another plugin goes to top of file [message #660532 is a reply to message #660335] Fri, 18 March 2011 17:59 Go to previous message
Eclipse UserFriend
I just tried this html document which has a link to an anchor withing the platform tips and trics page and it worked fine.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Main Topic</title>
</head>

<body>
<h1>Main Topic</h1>
<a href=" PLUGINS_ROOT/org.eclipse.platform.doc.user/tips/platform_tip s.html#Editing ">Editing</a>
</body>
</html>
Previous Topic:Suppressing Contents topics for main books
Next Topic:Cheat sheets and Properties dialog
Goto Forum:
  


Current Time: Tue Mar 11 07:20:44 EDT 2025

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

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

Back to the top