rahul
Sat, 10 Jan 2009 14:15:52 -0800
Author: rahul Date: Sat Jan 10 14:15:28 2009 New Revision: 733378 URL: http://svn.apache.org/viewvc?rev=733378&view=rev Log: Update the JSP 2.0 stylesheet to generate the TLD and docs with antrun. Allow for creation of either plain HTML documentation (for packaging with binary distro) or xdoc (for usage with m2 site). The XSLT parameter 'generationtarget' can be used for this purpose (values 'xdoc' or 'html').
Also updated the Javadoc location and a path to match the new directory layout.
Modified:
jakarta/taglibs/proper/rdc/trunk/taglibs-rdc/src/util/taglibs20-doc.xsl
Modified:
jakarta/taglibs/proper/rdc/trunk/taglibs-rdc/src/util/taglibs20-doc.xsl
URL:
http://svn.apache.org/viewvc/jakarta/taglibs/proper/rdc/trunk/taglibs-rdc/src/util/taglibs20-doc.xsl?rev=733378&r1=733377&r2=733378&view=diff
==============================================================================
--- jakarta/taglibs/proper/rdc/trunk/taglibs-rdc/src/util/taglibs20-doc.xsl
(original)
+++ jakarta/taglibs/proper/rdc/trunk/taglibs-rdc/src/util/taglibs20-doc.xsl Sat
Jan 10 14:15:28 2009
@@ -21,10 +21,11 @@
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
- <xsl:output method="html"
+ <xsl:param name="generationtarget"/>
+ <xsl:output method="xml"
encoding="ISO-8859-1"
indent="yes"
- omit-xml-declaration="yes"/>
+ omit-xml-declaration="no"/>
<!--
This XSL is used to transform Tag library Documentation XML files into
HTML documents formatted for the Jakarta Taglibs Web site.
@@ -61,28 +62,46 @@
</xsl:template>
<xsl:template match="/document">
- <html>
- <xsl:apply-templates />
- </html>
+ <xsl:choose>
+ <xsl:when test="$generationtarget = 'xdoc'">
+ <document>
+ <xsl:apply-templates />
+ </document>
+ </xsl:when>
+ <xsl:otherwise>
+ <html>
+ <xsl:apply-templates />
+ </html>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:variable name="banner-bg" select="'#023264'"/>
<xsl:variable name="banner-fg" select="'#ffffff'"/>
<xsl:template match="/document/properties">
- <head>
- <meta content="{author}" name="author"/>
- <xsl:choose>
- <xsl:when test="title">
- <title><xsl:value-of select="title"/></title>
- </xsl:when>
- <xsl:otherwise>
- <title>
- Jakarta-Taglibs:
- <xsl:value-of select="/document/taglib/display-name"/>
- </title>
- </xsl:otherwise>
- </xsl:choose>
- </head>
+ <xsl:choose>
+ <xsl:when test="$generationtarget = 'xdoc'">
+ <xsl:copy>
+ <xsl:apply-templates/>
+ </xsl:copy>
+ </xsl:when>
+ <xsl:otherwise>
+ <head>
+ <meta content="{author}" name="author"/>
+ <xsl:choose>
+ <xsl:when test="title">
+ <title><xsl:value-of select="title"/></title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ Jakarta-Taglibs:
+ <xsl:value-of select="/document/taglib/display-name"/>
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ </head>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
@@ -196,7 +215,7 @@
<a name="javadocs"><h3>Java Docs</h3></a>
<p>Java programmers can view the java class documentation for this tag
- library as <a href="javadoc/index.html">javadocs</a>.</p>
+ library as <a href="apidocs/index.html">javadocs</a>.</p>
<a name="history"><h3>Revision History</h3></a>
<p>Review the complete <a href="changes.html">revision history</a> of
@@ -427,7 +446,7 @@
<xsl:template match="tag-extension">
<!-- Assume tooling files are defined in META-INF/tags -->
- <xsl:variable name="href" select="concat('..', extension-element)"/>
+ <xsl:variable name="href" select="concat('../main/resources',
extension-element)"/>
<xsl:variable name="metadata" select="document($href)" />
<xsl:choose>
<xsl:when test="$metadata/ui-config/component/input-params/param">
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-h...@jakarta.apache.org