[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] webhelp.xsl customizations
Hi David,Excuse me for being dense, but are you saying you've put that empty template in the SVN version of the XSL style sheets? If so, will that change be in the next release of the DocBook style sheets?
Also, I wonder how user.webhelp.head.content is supposed to work. You're saying it's called at the end of user.head.content, so I would assume it becomes part of that template. But if that's correct, it would just *add* stuff to the user.head.content template, rather than replacing what's there. This wouldn't make much sense. Apparently, I'm missing something.
You asked for things that we should be able to configure/customize. Here's a list:
(1) <style type="text/css">: I'd suggest to put that in a CSS file. The template already links 3 CSS files, so adding another one shouldn't be an issue.
(2) <link rel="stylesheet" type="text/css" href="../common/jquery/theme-redmond/jquery-ui-1.8.2.custom.css"/>: As said before, this is probably high on anyone's list of things to be customized.
(3) <script type="text/javascript" src="../common/jquery/jquery-1.4.2.min.js"> and <script type="text/javascript" src="../common/jquery/jquery-ui-1.8.2.custom.min.js">: This should be configurable because it contains version numbers. Hard-coding makes it harder to upgrade jQuery JavaScript.
(4) <script type="text/javascript" src="{concat('search/stemmers/',$webhelp.indexer.language,'_stemmer.js')}">: While the integrated jQuery search works great for simple searches, I hear that the stemmer-based search isn't really useful ATM, so that would be a candidate for stuff to turn off.
That's about it for the moment. :-) Thanks, and have a great weekend! Cheers, Stefan On 27.01.2012 15:37, David Cramer wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 So the xsls in svn has an empty template called user.webhelp.head.content that is called at the end of user.head.content which will help when you only want to add stuff to <head>. There's also a user.webhelp.content.footer and a user.webhelp.navheader.content (thanks to Jirka for adding those): <!-- This is for the USERS. Users who want to customize webhelp may over-ride this template to add content to<head>. --> <xsl:template name="user.webhelp.head.content"/> <!-- This is for the USERS. Users who want to customize webhelp may over-ride this template to add content to the footer of the content DIV. i.e. within<div id="content"> ...</div> --> <xsl:template name="user.webhelp.content.footer"/> <xsl:template name="user.webhelp.navheader.content"/> I'll add a note to the documentation about that feature. It sounds like there's also a need for a $webhelp.jquery.theme.path param so you can easily switch between themes. Let me know if there are other things that need to be made easier to customize. Webhelp is itself a customization layer, so it uses the normal customization features of the DocBook xsls. It's also different in that it includes a build script, and css, js, and image files. All of which are candidates for customization as well. Thanks, David On 01/27/2012 08:10 AM, Tim Arnold wrote:Hi Stefan, I'll be interested to see the other replies to your question. Your suggestion is exactly what I've done. Even for some largish templates (and user.head.content as well) I just copy them to my customization layer and make them do what I need them to do. I know only enough xslt to get myself in trouble, so hopefully we'll hear from more knowledgeable folks about the *best* way to go. good luck! --Tim Arnold On Fri, Jan 27, 2012 at 5:48 AM, Stefan Hinz <stefan.hinz@oracle.com> wrote:Thanks again to everyone who pointed out WebHelp to me earlier this week, and provided great hints for adjusting it to our needs! I've had a look at webhelp.xsl from the DocBook 1.76.1 XSL style sheets. In parts, this is a "regular" style sheet, in the sense that you can override default values easily. For example, if I wanted to change the file name of the start page, I'd look at this line ... <xsl:param name="webhelp.start.filename">index.html</xsl:param> ... and override this with e.g. in a Makefile with: --stringparam webhelp.start.filename "toc.htm" There's one template, though, that consists of more than 120 lines, and is thus not easily configurable: <xsl:template name="user.head.content"> Granted, it's a template, rather than a parameter, so there's nothing like a one-line change, done in a Makefile. :-) Anyway, here's what I thought I should do -- add a customization layer with this: <xsl:template name="user.head.content"> <!-- Copy 120+ lines from webhelp.xsl, and adjust to our needs --> </xsl:template> First question: Is this the right approach? Overriding 120+ lines of a DocBook style sheet almost feels like modifying the style sheet itself, which I'd never do because I guess that's considered heresy. Last question: The user.head.content template has lots of things hard-coded that I believe should be parametrized. Here's an extreme example where both a specific jQuery theme and even the version number are hard-coded: <link rel="stylesheet" type="text/css" href="../common/jquery/theme-redmond/jquery-ui-1.8.2.custom.css"/>Is there any way to parametrize *that* (i.e. within a template)?If so, that should probably be done in webhelp.xsl, rather than in the customization layer, so that not only our group would benefit. Assuming parametrization could be done, what would be the proper way to contribute such a patch? (OK, that's one more question, but it's related to the previous one. :-)) Thanks in advance for any pointers! -- Cheers, Stefan Hinz<stefan.hinz@oracle.com>, MySQL Documentation Manager Phone: +49-30-82702940, Fax: +49-30-82702941, http://dev.mysql.com/doc ORACLE Deutschland B.V.& Co. KG Registered Office: Riesstr. 25, 80992 Muenchen, Germany Commercial Register: Local Court Of Munich, HRA 95603 Managing Director: Jürgen Kunz General Partner: ORACLE Deutschland Verwaltung B.V. Hertogswetering 163/167, 3543 AS Utrecht, Niederlande Register Of Chamber Of Commerce: Midden-Niederlande, No. 30143697 Managing Directors: Alexander van der Ven, Astrid Kepper, Val Maher ---------------------------------------------------------------------To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.orgFor additional commands, e-mail: docbook-apps-help@lists.oasis-open.org---------------------------------------------------------------------To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.orgFor additional commands, e-mail: docbook-apps-help@lists.oasis-open.org-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJPIraaAAoJEMHeSXG7afUhpYUH/iUnDwIOu/SlQ0DojcJ2lYb0 EbFW0zzDnToqVahlS+HAZwpz1UkjpWuNcylG/5bCAf74mkp+463v/yeaiap+pQ1G RBI1LBRpnY9zbdvsrZrc2OHDY4v27+4z8ICIPXClZ6x/3SHVH3wLIsNdMBb4O1WL cdjJxYx334uark6gwcMH3wRFkaFxQtEbTVhGMaGbz6/8xlbxi1E3dvKMw1UYucQw 3vPTk1uH9d6Z0N7hjgZGTHJijE/74tbQV1q/RnpnsN4POPi4x6zBBa47IMXhC7Bi frBBdOpeFb8FgmR82AzTR5RurTi2l4noyr/+qYbAcMqqouLXH1x24RTHdOiSdXM= =7sVs -----END PGP SIGNATURE-----
-- Cheers, Stefan Hinz <stefan.hinz@oracle.com>, MySQL Documentation Manager Phone: +49-30-82702940, Fax: +49-30-82702941, http://dev.mysql.com/doc ORACLE Deutschland B.V.& Co. KG Registered Office: Riesstr. 25, 80992 Muenchen, Germany Commercial Register: Local Court Of Munich, HRA 95603 Managing Director: Jürgen Kunz General Partner: ORACLE Deutschland Verwaltung B.V. Hertogswetering 163/167, 3543 AS Utrecht, Niederlande Register Of Chamber Of Commerce: Midden-Niederlande, No. 30143697 Managing Directors: Alexander van der Ven, Astrid Kepper, Val Maher
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]