OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: RE: [docbook-apps] Pure JS WebHelp

Thank you all for your positive feedback!

It is the best motivation for me. I am quite busy with other activities, but I'll try to move this further later next month.
Some answers:

> I notice you're using <simplesect>. Have you tried your XSL with <section> structuring?

Sure, the section element is the first class citizen.

> I'm especially interested to see if this could be adapted 
> to provide features (search, side navigation, etc) to 
> other tools that can only output HTML out of box.

Not sure what is meant by other tools. To enable this functionality (using provided scripts) your HTML structure should match the original one (mine). Do those tools support generating outputs in a customized structure?

> I'm curious on how you achieved not embedding ToC on every page.

Indeed, there is no XInclude analogy in HTML :-(

On top of that, you cannot access/manipulate local files via JavaScript (i.e. read HTML snippet in one file and put it into a dedicated DIV in your file).

However, if your content is static and structured, it can be provided in the form of JavaScript object (JSON) and thus linked (e.g. in the HTML header) like other JavaScript files. Once loaded, that object is accessible like any other global variable. In my customization the nested object structure is iterated/converted into HTML's <ul><li> elements with proper CSS classes. The JSON is same for all pages. The current menu item is highlighted dynamically via script.

In one huge document (2000 PDF pages) the embedded ToC itself represented ca 2 MB! In every page. The rest of file size was between 10-600 kB, the total package size was ca 150 MB. Loading pages was so sloow.

While the browser has to load the similar size now (just split into two parts), it is much faster as that separate ToC (JSON) can be cached and reused for other pages.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]