toc.xml generator [message #437667] |
Fri, 30 September 2005 15:08  |
Eclipse User |
|
|
|
Originally posted by: shashireo.hotmail.com
Is there a tool (plugin/API) which can generate toc.xml files from an
html source tree?
We'd like to be able to pull our html from a version control system, use
some tool and automatically package the help into a plugin. If such a
tool doesn't exist I think a good solution would be to insert custom xml
tags into html documents that a parser can interpret and generate
toc.xml out of.
A related question therefore is: how does eclipse generate the
plugin.xml files? Is it possible to use this API (which I can't seem to
find!) for generating the toc.xml?
Thanks for your help.
Shashi
|
|
|
Re: toc.xml generator [message #437679 is a reply to message #437667] |
Sat, 01 October 2005 10:17   |
Eclipse User |
|
|
|
There isn't a tool that you can use to generate the toc.xml files directly. You won't be able to use the editor for plugin.xml files because ... well, it's a completely different type of file. Yes, they're both XML, but they are as similar as Atom files are to Microsoft Office XML format.
One way would be to write a simple command-line tool using utilities such as 'grep' to find out what the HTML title was. If you're writing well-formed XHTML, you could even use something like xsltproc to query the documents (if you knew enough about XSLT).
However, one thing that any automated tool won't be able to tell you is which order they should appear in the toc. That's why the toc files are usually created by hand, unless you've got some kind of naming convention in the files (e.g. 01_Welcome.html, 02_Overview.html) that you can use.
Although of little use (if you've already got large amounts of documentation) it's also possible to generate Eclipse help documentation from DocBook source material, which can then also be used to generate HTML, PDF, XSL-FO etc.:
http://www.xml.com/lpt/a/2003/08/13/docbook-eclipse.html
http://cvs.sf.net/viewcvs.py/docbook/xsl/eclipse/
http://docbook.sourceforge.net/projects/xsl/index.html
FYI the Plugin.xml file is not 'generated' as such; rather, the plugin.xml file is parsed and presented as an Editor. Changes in the UI (e.g. clicking on an 'add dependency' results in a new entry being inserted into the document.
|
|
|
Re: toc.xml generator [message #437680 is a reply to message #437679] |
Sat, 01 October 2005 11:23   |
Eclipse User |
|
|
|
Originally posted by: shashireo.hotmail.com
Very useful information. Thank you.
As regards this:
>> FYI the Plugin.xml file is not 'generated' as such; rather, the
>> plugin.xml file is parsed and presented as an Editor. Changes in the
>> UI (e.g. clicking on an 'add dependency' results in a new entry being
>> inserted into the document.
I was wondering how this 'insertion' is performed. Are they somewhat
hard-wired into the code? Or is it possible to create a class that gets
instantiated with an XML schema and then can be used to insert sections
of XML? Guess I can read the source to find out...
Shashi
Alex Blewitt wrote:
> There isn't a tool that you can use to generate the toc.xml files
> directly. You won't be able to use the editor for plugin.xml files
> because ... well, it's a completely different type of file. Yes,
> they're both XML, but they are as similar as Atom files are to
> Microsoft Office XML format.
>
> One way would be to write a simple command-line tool using utilities
> such as 'grep' to find out what the HTML title was. If you're writing
> well-formed XHTML, you could even use something like xsltproc to
> query the documents (if you knew enough about XSLT).
>
> However, one thing that any automated tool won't be able to tell you
> is which order they should appear in the toc. That's why the toc
> files are usually created by hand, unless you've got some kind of
> naming convention in the files (e.g. 01_Welcome.html,
> 02_Overview.html) that you can use.
>
> Although of little use (if you've already got large amounts of
> documentation) it's also possible to generate Eclipse help
> documentation from DocBook source material, which can then also be
> used to generate HTML, PDF, XSL-FO etc.:
>
> http://www.xml.com/lpt/a/2003/08/13/docbook-eclipse.html
> http://cvs.sf.net/viewcvs.py/docbook/xsl/eclipse/
> http://docbook.sourceforge.net/projects/xsl/index.html
>
> FYI the Plugin.xml file is not 'generated' as such; rather, the
> plugin.xml file is parsed and presented as an Editor. Changes in the
> UI (e.g. clicking on an 'add dependency' results in a new entry being
> inserted into the document.
|
|
|
|
|
Re: toc.xml generator [message #437693 is a reply to message #437667] |
Sun, 02 October 2005 13:17  |
Eclipse User |
|
|
|
Just to let you know, an eclipse.org article will be coming out soon
that addresses authoring in Eclipse.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=108397
Give it about 2-3 weeks max ;)
It will discuss how to author things in Eclipse like books, articles,
technical documentation etc... it will include an example (docbook) and
generate html out of it, pdf and an Eclipse infocenter. The article
itself was written in docbook and generated into an eclipse.org via a
custom docbook stylesheet.
If you have any comments on what else should be in the article, let me
know :)
Cheers,
~ Chris
|
|
|
Powered by
FUDForum. Page generated in 0.05960 seconds