From: Taj M. <taj...@us...> - 2004-09-12 20:14:46
|
Update of /cvsroot/davinci/docs/xls/eclipse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25978/xls/eclipse Added Files: ChangeLog eclipse.xsl Log Message: Added XSL support files --- NEW FILE: eclipse.xsl --- <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:import href="../html/chunk.xsl"/> <!-- ******************************************************************** $Id: eclipse.xsl,v 1.1 2004/09/12 20:14:31 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. ******************************************************************** --> <xsl:template match="/"> <xsl:choose> <xsl:when test="$rootid != ''"> <xsl:choose> <xsl:when test="count(key('id',$rootid)) = 0"> <xsl:message terminate="yes"> <xsl:text>ID '</xsl:text> <xsl:value-of select="$rootid"/> <xsl:text>' not found in document.</xsl:text> </xsl:message> </xsl:when> <xsl:otherwise> <xsl:message>Formatting from <xsl:value-of select="$rootid"/></xsl:message> <xsl:apply-templates select="key('id',$rootid)" mode="process.root"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="/" mode="process.root"/> </xsl:otherwise> </xsl:choose> <xsl:call-template name="etoc"/> <xsl:call-template name="plugin.xml"/> </xsl:template> <xsl:template name="etoc"> <xsl:call-template name="write.chunk"> <xsl:with-param name="filename"> <xsl:if test="$manifest.in.base.dir != 0"> <xsl:value-of select="$base.dir"/> </xsl:if> <xsl:value-of select="'toc.xml'"/> </xsl:with-param> <xsl:with-param name="method" select="'xml'"/> <xsl:with-param name="encoding" select="'utf-8'"/> <xsl:with-param name="indent" select="'yes'"/> <xsl:with-param name="content"> <xsl:choose> <xsl:when test="$rootid != ''"> <xsl:variable name="title"> <xsl:if test="$eclipse.autolabel=1"> <xsl:variable name="label.markup"> <xsl:apply-templates select="key('id',$rootid)" mode="label.markup"/> </xsl:variable> <xsl:if test="normalize-space($label.markup)"> <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/> </xsl:if> </xsl:if> <xsl:apply-templates select="key('id',$rootid)" mode="title.markup"/> </xsl:variable> <xsl:variable name="href"> <xsl:call-template name="href.target.with.base.dir"> <xsl:with-param name="object" select="key('id',$rootid)"/> </xsl:call-template> </xsl:variable> <toc label="{$title}" topic="{$href}"> <xsl:apply-templates select="key('id',$rootid)/*" mode="etoc"/> </toc> </xsl:when> <xsl:otherwise> <xsl:variable name="title"> <xsl:if test="$eclipse.autolabel=1"> <xsl:variable name="label.markup"> <xsl:apply-templates select="/*" mode="label.markup"/> </xsl:variable> <xsl:if test="normalize-space($label.markup)"> <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/> </xsl:if> </xsl:if> <xsl:apply-templates select="/*" mode="title.markup"/> </xsl:variable> <xsl:variable name="href"> <xsl:call-template name="href.target.with.base.dir"> <xsl:with-param name="object" select="/"/> </xsl:call-template> </xsl:variable> <toc label="{$title}" topic="{$href}"> <xsl:apply-templates select="/*/*" mode="etoc"/> </toc> </xsl:otherwise> </xsl:choose> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="book|part|reference|preface|chapter|bibliography|appendix|article|glossary|section|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv|index" mode="etoc"> <xsl:variable name="title"> <xsl:if test="$eclipse.autolabel=1"> <xsl:variable name="label.markup"> <xsl:apply-templates select="." mode="label.markup"/> </xsl:variable> <xsl:if test="normalize-space($label.markup)"> <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/> </xsl:if> </xsl:if> <xsl:apply-templates select="." mode="title.markup"/> </xsl:variable> <xsl:variable name="href"> <xsl:call-template name="href.target.with.base.dir"/> </xsl:variable> <topic label="{$title}" href="{$href}"> <xsl:apply-templates select="part|reference|preface|chapter|bibliography|appendix|article|glossary|section|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv|index" mode="etoc"/> </topic> </xsl:template> <xsl:template match="text()" mode="etoc"/> <xsl:template name="plugin.xml"> <xsl:call-template name="write.chunk"> <xsl:with-param name="filename"> <xsl:if test="$manifest.in.base.dir != 0"> <xsl:value-of select="$base.dir"/> </xsl:if> <xsl:value-of select="'plugin.xml'"/> </xsl:with-param> <xsl:with-param name="method" select="'xml'"/> <xsl:with-param name="encoding" select="'utf-8'"/> <xsl:with-param name="indent" select="'yes'"/> <xsl:with-param name="content"> <plugin name="{$eclipse.plugin.name}" id="{$eclipse.plugin.id}" version="1.0" provider-name="{$eclipse.plugin.provider}"> <extension point="org.eclipse.help.toc"> <toc file="toc.xml" primary="true"/> </extension> </plugin> </xsl:with-param> </xsl:call-template> </xsl:template> </xsl:stylesheet> --- NEW FILE: ChangeLog --- 2003-09-23 Jirka Kosek <ko...@us...> * eclipse.xsl: Added new parameter manifest.in.base.dir which can be used to place manifest file and also project files for HTML Help and Eclipse Help into base.dir. This improvement also fixes bug (feature) #662955. 2003-07-22 Jirka Kosek <ko...@us...> * eclipse.xsl: New file. |