Author: josch Date: Wed Dec 21 05:15:39 2005 New Revision: 358286 URL: http://svn.apache.org/viewcvs?rev=358286&view=rev Log: new: * support for sdocbook tags <note>, <userinput> * support for table/title
changed: * <example> now defined as <note> which better to the sdocbook content model for <example>, see http://www.docbook.org/tdg/simple/en/html/example.html also the processing of sections is mangled over various XSLs * all tags that generate <code> now pass on their type as @class, e.g. literal, userinput, filename Modified: forrest/branches/forrest_07_branch/plugins/org.apache.forrest.plugin.input.simplifiedDocbook/resources/stylesheets/sdocbook2document.xsl Modified: forrest/branches/forrest_07_branch/plugins/org.apache.forrest.plugin.input.simplifiedDocbook/resources/stylesheets/sdocbook2document.xsl URL: http://svn.apache.org/viewcvs/forrest/branches/forrest_07_branch/plugins/org.apache.forrest.plugin.input.simplifiedDocbook/resources/stylesheets/sdocbook2document.xsl?rev=358286&r1=358285&r2=358286&view=diff ============================================================================== --- forrest/branches/forrest_07_branch/plugins/org.apache.forrest.plugin.input.simplifiedDocbook/resources/stylesheets/sdocbook2document.xsl (original) +++ forrest/branches/forrest_07_branch/plugins/org.apache.forrest.plugin.input.simplifiedDocbook/resources/stylesheets/sdocbook2document.xsl Wed Dec 21 05:15:39 2005 @@ -205,7 +205,7 @@ </cmdsynopsis> --> <p> - <code> + <code class="cmdsynopsis"> <xsl:value-of select="command"/> <xsl:apply-templates select="node()[ local-name() != 'command' ]"/> </code> @@ -232,9 +232,20 @@ </section> </xsl:template> <xsl:template match="example"> - <section> - <xsl:apply-templates/> - </section> + <!-- changed to note because section gives a hard time + to set the class: it's done in skins/common, pelt + and then in site2xhtml, too :-( --> + <note class="example" label="{title}"> + <xsl:apply-templates/> + </note> + </xsl:template> + <xsl:template match="note"> + <note> + <xsl:if test="title"> + <xsl:attribute name="label"><xsl:value-of select="title"/></xsl:attribute> + </xsl:if> + <xsl:apply-templates/> + </note> </xsl:template> <xsl:template match="informaltable"> <table> @@ -461,39 +472,47 @@ </ul> </xsl:template> <xsl:template match="command"> - <code> + <code class="command"> <xsl:value-of select="."/> </code> </xsl:template> <xsl:template match="computeroutput"> - <code> + <code class="computeroutput"> + <xsl:value-of select="."/> + </code> + </xsl:template> + <xsl:template match="userinput"> + <code class="userinput"> <xsl:value-of select="."/> </code> </xsl:template> <xsl:template match="varname"> - <code> + <code class="varname"> <xsl:value-of select="."/> </code> </xsl:template> - <xsl:template match="literal"> - <code><xsl:value-of select="."/></code> + <xsl:template match="literal"> + <!-- @moreinfo ignored --> + <code class="literal"> + <xsl:value-of select="."/> + </code> </xsl:template> <xsl:template match="option"> - <code><xsl:value-of select="."/></code> + <code class="option"><xsl:value-of select="."/></code> </xsl:template> <xsl:template match="constant"> - <code><xsl:value-of select="."/></code> + <code class="constant"><xsl:value-of select="."/></code> </xsl:template> <xsl:template match="trademark"> <xsl:apply-templates/>™ </xsl:template> <xsl:template match="filename"> - <code> + <code class="filename"> <xsl:value-of select="."/> </code> </xsl:template> <xsl:template match="classname|function|parameter"> - <code> + <code class="{local-name()}"> <xsl:apply-templates/> <xsl:if test="name(.)='function'"> <xsl:text>()</xsl:text> @@ -605,6 +624,7 @@ </xsl:template> <xsl:template match="table"> <table> + <caption><xsl:value-of select="title"/></caption> <xsl:apply-templates/> </table> </xsl:template> @@ -627,7 +647,7 @@ </xsl:template> <xsl:template match="row"> <tr> - <xsl:apply-templates/> + <xsl:apply-templates/> </tr> </xsl:template> <xsl:template match="tbody|tfoot">
