From: Taj M. <taj...@us...> - 2004-09-12 20:14:50
|
Update of /cvsroot/davinci/docs/xls/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25978/xls/template Added Files: ChangeLog README biblioentry.xsl testtemplate.xml titlepage.xsl Log Message: Added XSL support files --- NEW FILE: README --- This directory contains rudimentary support for the notion of stylesheet templates. The idea is that if you want to change the behavior of the stylesheets, for example, processing different bibliography elements, you will construct a tempate document that describes what you want and then process that template with the "template" stylesheet. The result of this processing will be a customization layer for the DocBook XSL Stylesheets that does what you want. This removes the stylesheet customizer from the burdon of figuring out how the stylesheets work and modifying them. In theory, anyway... --- NEW FILE: titlepage.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0" xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="doc t param" version='1.0'> <!-- ******************************************************************** $Id: titlepage.xsl,v 1.1 2004/09/12 20:14:41 tajmorton Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> [...1174 lines suppressed...] <xsl:value-of select="$orlist"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="element-or-list"> <xsl:with-param name="elements" select="$elements"/> <xsl:with-param name="element.count" select="$element.count"/> <xsl:with-param name="count" select="$count+1"/> <xsl:with-param name="orlist"> <xsl:value-of select="$orlist"/> <xsl:if test="not($orlist='')">|</xsl:if> <xsl:value-of select="name($elements[position()=$count])"/> </xsl:with-param> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- ==================================================================== --> </xsl:stylesheet> --- NEW FILE: biblioentry.xsl --- <!-- THIS IS BROKEN --> <!-- ==================================================================== --> <xsl:template match="t:biblioentry"> <xsl:text>

</xsl:text> <xsl:element name="xsl:template"> <xsl:attribute name="match">biblioentry</xsl:attribute> <xsl:text>
</xsl:text> <xsl:element name="xsl:variable"> <xsl:attribute name="name">id</xsl:attribute> <xsl:element name="xsl:call-template"> <xsl:attribute name="name">object.id</xsl:attribute> </xsl:element> </xsl:element> <xsl:text>
</xsl:text> <xsl:element name="{@wrapper}"> <xsl:attribute name="id">{$id}</xsl:attribute> <xsl:attribute name="class">{name(.)}</xsl:attribute> <xsl:text>
 </xsl:text> <xsl:element name="a"> <xsl:attribute name="name">{$id}</xsl:attribute> </xsl:element> <xsl:apply-templates mode="biblioentry"/> <xsl:text>
</xsl:text> </xsl:element> <xsl:text>
</xsl:text> </xsl:element> <!-- <xsl:text>

</xsl:text> <xsl:element name="xsl:template"> <xsl:attribute name="match">biblioentry/biblioset</xsl:attribute> <xsl:apply-templates mode="biblioentry"/> </xsl:element> --> </xsl:template> <xsl:template match="t:if" mode="biblioentry"> <xsl:element name="xsl:if"> <xsl:attribute name="test"> <xsl:value-of select="@test"/> </xsl:attribute> <xsl:apply-templates mode="biblioentry"/> </xsl:element> </xsl:template> <xsl:template match="t:text" mode="biblioentry"> <xsl:element name="xsl:text"> <xsl:apply-templates/> </xsl:element> </xsl:template> <xsl:template match="*" mode="biblioentry"> <xsl:text>
 </xsl:text> <xsl:element name="xsl:apply-templates"> <xsl:attribute name="select"> <xsl:value-of select="name(.)"/> </xsl:attribute> <xsl:attribute name="mode">bibliography.mode</xsl:attribute> </xsl:element> </xsl:template> <xsl:template match="t:or" mode="biblioentry"> <xsl:text>
 </xsl:text> <xsl:element name="xsl:apply-templates"> <xsl:attribute name="select"> <xsl:call-template name="element-or-list"/> </xsl:attribute> <xsl:attribute name="mode">bibliography.mode</xsl:attribute> </xsl:element> </xsl:template> --- NEW FILE: testtemplate.xml --- <!-- OBSOLETE, don't try to use this file. Instead, copy the titlepage.templates.xml file from either fo or html and edit that --> <t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0" base-stylesheet="../html/docbook.xsl"> <t:titlepage element="article" wrapper="div" class="titlepage"> <t:titlepage-content side="recto"> <title/> <subtitle/> <corpauthor/> <authorgroup/> <author/> <othercredit/> <releaseinfo/> <copyright/> <legalnotice/> <pubdate/> <revision/> <revhistory/> <abstract/> </t:titlepage-content> <t:titlepage-content side="verso"> </t:titlepage-content> <t:titlepage-separator> <hr/> </t:titlepage-separator> <t:titlepage-before side="recto"> </t:titlepage-before> <t:titlepage-before side="verso"> </t:titlepage-before> </t:titlepage> </t:templates> --- NEW FILE: ChangeLog --- 2004-07-16 Robert Stayton <bob...@us...> * testtemplate.xml: Marked as obsolete. 2004-04-25 Jirka Kosek <ko...@us...> * titlepage.xsl: Containers for recto and verso part of titlepage (div or fo:block) are emitted only when there is content for recto/verso titlepage. This prevents emitting empty div elements between chapter/section titles and first para which leads to big space. Fixed bug #930954. * titlepage.xsl: Fixed cut'n'paste mistake. Attributes must be attached to wrapper element, not to variable. 2004-01-29 Norman Walsh <nw...@us...> * titlepage.xsl: Support 'info' everywhere 2003-01-20 Norman Walsh <nw...@us...> * titlepage.xsl: SIGNIFICANT changes to the titlepage template setup. See RELEASE-NOTES. 2002-01-28 Norman Walsh <nw...@us...> * testtemplate.xml: Bug #502952: testtemple.xml was incorrect 2001-08-01 Norman Walsh <nw...@us...> * titlepage.xsl: Add t and param to the excluded result prefixes 2001-05-21 Norman Walsh <nw...@us...> * titlepage.xsl: Reworked titlepage template processing to support use of more interesting predicates. Note: in previous versions, at most one title, subtitle, or titleabbrev element would be processed for each title page. In the new design, if you have multiple title, subtitle, or titleabbrev elements inside an info wrapper (you shouldn't!), they will all be processed. 2001-04-02 Norman Walsh <nw...@us...> * README, biblioentry.xsl, testtemplate.xml, titlepage.xsl: New file. |