arron 02/02/16 08:12:56 Modified: doc/stylesheets struts.xsl userGuide.xsl Log: Added the ability for a tag to specify whether the table of attribute documenation is to be generated or not. Defaults to creating the documentation if attribute is not present for backward compatibility. This is so the nested tags can refer to the original tags without the burden of duplicated documentation. Revision Changes Path 1.6 +39 -29 jakarta-struts/doc/stylesheets/struts.xsl Index: struts.xsl =================================================================== RCS file: /home/cvs/jakarta-struts/doc/stylesheets/struts.xsl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- struts.xsl 12 Jan 2002 21:30:37 -0000 1.5 +++ struts.xsl 16 Feb 2002 16:12:56 -0000 1.6 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <!-- Content Stylesheet for Struts Documentation --> -<!-- $Id: struts.xsl,v 1.5 2002/01/12 21:30:37 martinc Exp $ --> +<!-- $Id: struts.xsl,v 1.6 2002/02/16 16:12:56 arron Exp $ --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> @@ -228,36 +228,46 @@ <xsl:apply-templates select="info"/> </blockquote> </td></tr> - <tr><td> - <blockquote> - <table border="1" cellspacing="2" cellpadding="2"> + <xsl:if test="not(@document-attributes)"> + <xsl:call-template name="document-tag-attributes" /> + </xsl:if> + <xsl:if test="@document-attributes='true'"> + <xsl:call-template name="document-tag-attributes" /> + </xsl:if> + </table> + </xsl:template> + + <!-- Create the table of documentation for a tag --> + <xsl:template name="document-tag-attributes"> + <tr><td> + <blockquote> + <table border="1" cellspacing="2" cellpadding="2"> + <tr> + <th width="15%">Attribute Name</th> + <th>Description</th> + </tr> + <xsl:for-each select="attribute"> <tr> - <th width="15%">Attribute Name</th> - <th>Description</th> + <td align="center"> + <xsl:value-of select="name"/> + </td> + <td> + <xsl:apply-templates select="info"/> + <xsl:variable name="required"> + <xsl:value-of select="required"/> + </xsl:variable> + <xsl:if test="required='true'"> + [Required] + </xsl:if> + <xsl:if test="rtexprvalue='true'"> + [RT Expr] + </xsl:if> + </td> </tr> - <xsl:for-each select="attribute"> - <tr> - <td align="center"> - <xsl:value-of select="name"/> - </td> - <td> - <xsl:apply-templates select="info"/> - <xsl:variable name="required"> - <xsl:value-of select="required"/> - </xsl:variable> - <xsl:if test="required='true'"> - [Required] - </xsl:if> - <xsl:if test="rtexprvalue='true'"> - [RT Expr] - </xsl:if> - </td> - </tr> - </xsl:for-each> - </table> - </blockquote> - </td></tr> - </table> + </xsl:for-each> + </table> + </blockquote> + </td></tr> </xsl:template> 1.5 +40 -29 jakarta-struts/doc/stylesheets/userGuide.xsl Index: userGuide.xsl =================================================================== RCS file: /home/cvs/jakarta-struts/doc/stylesheets/userGuide.xsl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- userGuide.xsl 12 Jan 2002 21:30:37 -0000 1.4 +++ userGuide.xsl 16 Feb 2002 16:12:56 -0000 1.5 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <!-- Content Stylesheet for Struts User's Guide --> -<!-- $Id: userGuide.xsl,v 1.4 2002/01/12 21:30:37 martinc Exp $ --> +<!-- $Id: userGuide.xsl,v 1.5 2002/02/16 16:12:56 arron Exp $ --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> @@ -221,36 +221,47 @@ <xsl:apply-templates select="info"/> </blockquote> </td></tr> - <tr><td> - <blockquote> - <table border="1" cellspacing="2" cellpadding="2"> + <xsl:if test="not(@document-attributes)"> + <xsl:call-template name="document-tag-attributes" /> + </xsl:if> + <xsl:if test="@document-attributes='true'"> + <xsl:call-template name="document-tag-attributes" /> + </xsl:if> + </table> + </xsl:template> + + + <!-- Create the table of documentation for a tag --> + <xsl:template name="document-tag-attributes"> + <tr><td> + <blockquote> + <table border="1" cellspacing="2" cellpadding="2"> + <tr> + <th width="15%">Attribute Name</th> + <th>Description</th> + </tr> + <xsl:for-each select="attribute"> <tr> - <th width="15%">Attribute Name</th> - <th>Description</th> + <td align="center"> + <xsl:value-of select="name"/> + </td> + <td> + <xsl:apply-templates select="info"/> + <xsl:variable name="required"> + <xsl:value-of select="required"/> + </xsl:variable> + <xsl:if test="required='true'"> + [Required] + </xsl:if> + <xsl:if test="rtexprvalue='true'"> + [RT Expr] + </xsl:if> + </td> </tr> - <xsl:for-each select="attribute"> - <tr> - <td align="center"> - <xsl:value-of select="name"/> - </td> - <td> - <xsl:apply-templates select="info"/> - <xsl:variable name="required"> - <xsl:value-of select="required"/> - </xsl:variable> - <xsl:if test="required='true'"> - [Required] - </xsl:if> - <xsl:if test="rtexprvalue='true'"> - [RT Expr] - </xsl:if> - </td> - </tr> - </xsl:for-each> - </table> - </blockquote> - </td></tr> - </table> + </xsl:for-each> + </table> + </blockquote> + </td></tr> </xsl:template>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>