Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » [wikitext] Embedding links, etc..
[wikitext] Embedding links, etc.. [message #601058] Tue, 13 April 2010 19:24 Go to next message
Miles Parker is currently offline Miles Parker
Messages: 1338
Registered: July 2009
Senior Member
As others have said, this is a great contribution.

As background, I'm auto-creating docs using a setup stolen from the xtext docs builder -- my setup is basically the same except that I'm suing mediawiki instead. (You can see the generated docs here.. http://eclipse.org/amp/documentation/) So that means that I actually have docbooks XSL in the mix and so this is a little OT, but I'm hoping that there are other wikitext / docbooks users here who might have ideas.

First, I would like to be able to generate all of my docs automatically, but there is one issue there. I don't think there is a way to get TOC links generated, is there? I've got some links such as API docs that aren't coming from wikitext. (I thought of having a Master toc and then linking the Wiki generated docs in to that, but can't get that working the way I'd like.) And ideas about how I might get these links auto-genrated so that I don't have to re-edit my toc each time I do an update?

Second, I wonder if anyone has built a docbook2html or wiki2html target that separates the html into separate pages for say each h1 / =blah= level heading? My docs are getting large and I don't want users to have to download dozens of images and 30 pages of text everytime they go to the docs page.

thanks for any help or hints,

Miles
Re: [wikitext] Embedding links, etc.. [message #601070 is a reply to message #601058] Tue, 13 April 2010 20:30 Go to previous messageGo to next message
Miles Parker is currently offline Miles Parker
Messages: 1338
Registered: July 2009
Senior Member
An update on the second. This seems like it should be pretty easy to do with docbook chunking and in fact I've been able to get it working -- the only issue is that I can't figure out how to get the toc to generate. The index.html that is generated doesn't include one.

Here's what I did for those who are interested..

1. Copied the chunk.xsl, chunk-common.xsl and chunk-code.xsl into my styles dir.
2. Modified the html.xsl like so:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
version="1.0"
exclude-result-prefixes="exsl">

<xsl:import href="chunk.xsl" />
<xsl:output method="html" indent="yes" encoding="ISO-8859-1" omit-xml-declaration="yes" />

<xsl:param name="html.stylesheet">book.css</xsl:param>


<xsl:param name="chunk.first.sections" select="1" />
<xsl:param name="chunk.section.depth" select="1" />
<xsl:param name="use.id.as.filename" select="1" />
<xsl:param name="suppress.navigation" select="0" />
<xsl:param name="chapter.autolabel" select="1" />
<xsl:param name="table.borders.with.css" select="1"></xsl:param>
<xsl:param name="table.cell.border.color" select="'#000000'"></xsl:param>
<xsl:param name="table.cell.border.thickness" select="'2'"></xsl:param>
<xsl:param name="html.cellspacing" select="'0'"></xsl:param>
<xsl:param name="html.cellpadding" select="'10'"></xsl:param>

<xsl:param name="html.cleanup" select="1"></xsl:param>

<xsl:param name="generate.toc">
appendix nop
article/appendix nop
article nop
book toc,title,figure,table,example,equation
chapter nop
part nop
preface nop
qandadiv nop
qandaset nop
reference nop
sect1 nop
sect2 nop
sect3 nop
sect4 nop
sect5 nop
section nop
set nop
</xsl:param>

</xsl:stylesheet>
Re: [wikitext] Embedding links, etc.. [message #601197 is a reply to message #601058] Fri, 23 April 2010 10:12 Go to previous message
David Green is currently offline David Green
Messages: 96
Registered: July 2009
Member
Miles,

Some answers below:

On 10-04-13 4:24 PM, Miles Parker wrote:
> As others have said, this is a great contribution.
>
> As background, I'm auto-creating docs using a setup stolen from the
> xtext docs builder -- my setup is basically the same except that I'm
> suing mediawiki instead. (You can see the generated docs here..
> http://eclipse.org/amp/documentation/) So that means that I actually
> have docbooks XSL in the mix and so this is a little OT, but I'm hoping
> that there are other wikitext / docbooks users here who might have ideas.

We have quite a few users integrating with DocBook XSL. WikiText enables integration with existing toolchains so that
it's easy to use existing publishing infrastructure. Some people also like integrating with DocBook XSL for the extra
control it gives them over the output.

There have been significant advancements on MediaWiki integration, I recommend that you take a look at
http://wiki.eclipse.org/DocumentationGuidelines/CrowdSourcin gExample
You may find that following this example greatly simplifies your process.

> First, I would like to be able to generate all of my docs automatically,
> but there is one issue there. I don't think there is a way to get TOC
> links generated, is there? I've got some links such as API docs that
> aren't coming from wikitext. (I thought of having a Master toc and then
> linking the Wiki generated docs in to that, but can't get that working
> the way I'd like.) And ideas about how I might get these links
> auto-genrated so that I don't have to re-edit my toc each time I do an
> update?

I recommend that you take a look at the Mylyn help bundle
http://wiki.eclipse.org/DocumentationGuidelines/CrowdSourcin gExample#Mylyn
It shows how to maintain a master TOC with anchors and links, integrating generated TOC.

>
> Second, I wonder if anyone has built a docbook2html or wiki2html target
> that separates the html into separate pages for say each h1 / =blah=
> level heading? My docs are getting large and I don't want users to have
> to download dozens of images and 30 pages of text everytime they go to
> the docs page.

This is easy to do either with WikiText directly or by using DocBook XSL chunking.

Regards,

David

> thanks for any help or hints,
>
> Miles
Previous Topic:Running all test cases included in Mylyn fails
Next Topic:Help: Bugzilla 3.4.4 http works - Mylyn Connect: Connection Refused
Goto Forum:
  


Current Time: Tue Jul 22 11:51:09 EDT 2014

Powered by FUDForum. Page generated in 0.02214 seconds