Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311217 - [Help] New Child macro does not pick-up child topics at the toc level - Fix for Eclipse 3.6.1
Summary: [Help] New Child macro does not pick-up child topics at the toc level - Fix f...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6.1   Edit
Assignee: Chris Goldthorpe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-30 13:19 EDT by Hadar Hawk CLA
Modified: 2010-06-25 17:06 EDT (History)
1 user (show)

See Also:


Attachments
Test case (12.65 KB, application/octet-stream)
2010-04-30 14:39 EDT, Chris Goldthorpe CLA
no flags Details
toc file with href in the toc element to a file with the child macro (516 bytes, text/xml)
2010-05-19 16:36 EDT, Hadar Hawk CLA
no flags Details
html file with the child macro code (334 bytes, text/html)
2010-05-19 16:36 EDT, Hadar Hawk CLA
no flags Details
Patch (2.66 KB, patch)
2010-06-03 16:28 EDT, Chris Goldthorpe CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hadar Hawk CLA 2010-04-30 13:19:38 EDT
Build Identifier: SDK 3.6M6

The child macro added in (190467) works great if the toc.xml file has the children listed there.  But, we have toc.xml files with anchors and other files anchor into them and the child macro does not work.

So, we have a toc file: (test_toc.xml)
<toc label="Testing" topic="test.html">
   <anchor id="test_general"/>
   <anchor id="test"/>
   <anchor id="test_extra"/>
</toc>

and another toc file:
<toc label="******" link_to="test_toc.xml#test" topic="mytopic.html">
   <topic label="Anchored child 1" href="topic1.html"/>
   <topic label="Anchored child 2" href="topic2.html"/>
</toc>

the test.html file from the first toc file contains:
<div><p>start links:<br/><!--INSERT_CHILD_LINKS--></p></div>

but no children are displayed.

Reproducible: Always

Steps to Reproduce:
use files from the details.
Comment 1 Chris Goldthorpe CLA 2010-04-30 14:39:47 EDT
Created attachment 166660 [details]
Test case

I just tried this with the attached test case and it works fine for me.
Comment 2 Chris Goldthorpe CLA 2010-05-07 20:21:11 EDT
I'm closing this as it worked when I tried it. If you have an example that fails please reopen the bug and attach a zip of the bundle(s) which show the problem.
Comment 3 Hadar Hawk CLA 2010-05-19 16:33:58 EDT
It does not work when you have the href on the toc entry in the toc.xml file and the href contains the child macro comment.

toc.xml
-----------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>

<toc label="Anchored Toc" topic="html/toc.html">
   <topic label="Getting Started">
      <anchor id="gettingstarted"/>
   </topic>
...
----------------------------------------------------------------------

toc.html file
-------------------------------------------------------------------------
<!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>Table of Contents</title>
</head>

<body>
<h1>Table of Contents</h1>
Please enter your text here.
<div><p>start links:<br/><!--INSERT_CHILD_LINKS--></p></div>
</body>
</html>
Comment 4 Hadar Hawk CLA 2010-05-19 16:36:29 EDT
Created attachment 169215 [details]
toc file with href in the toc element to a file with the child macro
Comment 5 Hadar Hawk CLA 2010-05-19 16:36:51 EDT
Created attachment 169216 [details]
html file with the child macro code
Comment 6 Chris Goldthorpe CLA 2010-05-19 19:00:52 EDT
I can see the problem now, it has nothing to do with anchors, it is failing in the page is linked to the toc. This is too late for 3.6, targeting 3.6.1.
Comment 7 Chris Goldthorpe CLA 2010-06-03 16:28:49 EDT
Created attachment 171019 [details]
Patch
Comment 8 Chris Goldthorpe CLA 2010-06-25 17:06:32 EDT
Patch applied to 3.6 maintenance stream, Fixed