Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 27190 - modularize guide.xsl and guide-print.xsl
Summary: modularize guide.xsl and guide-print.xsl
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs-developer
Classification: Unclassified
Component: Guide XML (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Kurt Lieber (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-23 14:31 UTC by Felix Breuer
Modified: 2003-12-06 13:18 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to guide.xsl (guide_modularization.patch,3.42 KB, patch)
2003-08-23 14:32 UTC, Felix Breuer
Details | Diff
the patch to guide-print.xsl (guide_print_modularization.patch,1.28 KB, patch)
2003-08-23 14:32 UTC, Felix Breuer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Breuer 2003-08-23 14:31:42 UTC
These patches modularize guide.xsl and guide-print.xsl, making them IMHO easier
to understand and to maintain. They also make writing handbook.xsl a lot more
efficient (see recent postings to gentoo-dev). *They do not change the
stylesheets' functionality, i.e. the HTML they generate.*

Changes to guide.xsl:

*  Originally <xsl:template match="/guide"> generated the HTML head, the
logobar, the sidebar, etc. as well as the actual content of the page. This moves
the part where the actual content of the page is generated to <xsl:template
name="makecontent"> and makes the "/guide" template call "makecontent". Thus,
stylesheets that want to change only the page's "frame" (like guide-print.xsl)
need only override the "/guide" template and do not need to reproduce the
content-generating part. Stylesheets that want to change only the page's content
(like handbook.xsl) need only override "makecontent" and leaving the HTML table
magic necessary for the "frame" to guide.xsl.
*  Instead of keeping the part which generates the author listing in the
content-part commented, I wrapped it in <xsl:if> allowing the calling "/guide"
template to choose whether it wants the authors listed there or not.

Changes to guide-print.xsl:

* The content-generating part that was almost identical to the one in guide.xsl,
is replaced by a call to "makecontent".

I put these changes in two patch files, because the changes to guide-print.xsl
are not required by those two guide.xsl. The second patch _does_ depend on the
first, though.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Felix Breuer 2003-08-23 14:32:16 UTC
Created attachment 16510 [details, diff]
patch to guide.xsl
Comment 2 Felix Breuer 2003-08-23 14:32:55 UTC
Created attachment 16511 [details, diff]
the patch to guide-print.xsl
Comment 3 Felix Breuer 2003-08-23 15:02:07 UTC
To be precise, the content generated by guide-print.xsl is now headed and trailed by an additional <br/>. If that bothers you, I can shift the <br/>s in question out of "makecontent" and back into "/guide".
Comment 4 Kurt Lieber (RETIRED) gentoo-dev 2003-12-06 13:18:03 UTC
I believe sven has made these changes.  closing bug.