Update the doc. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@291567 13f79535-47bb-0310-9956-ffa450edef68
940 lines
38 KiB
XML
940 lines
38 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<!--
|
|
* ========================================================================
|
|
*
|
|
* Copyright 2001-2005 The Apache Software Foundation.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*
|
|
* ========================================================================
|
|
-->
|
|
<!-- stylesheet to be used -->
|
|
<jsl:stylesheet select="$doc"
|
|
xmlns:define="jelly:define"
|
|
xmlns:j="jelly:core"
|
|
xmlns:jsl="jelly:jsl"
|
|
xmlns:log="jelly:log"
|
|
xmlns:util="jelly:util"
|
|
xmlns:x="jelly:xml"
|
|
xmlns:fmt="jelly:fmt"
|
|
xmlns:doc="doc"
|
|
xmlns:maven="jelly:maven"
|
|
xmlns="dummy">
|
|
|
|
<jsl:template match="document" trim="true">
|
|
<x:doctype name="html" publicId="-//W3C//DTD XHTML 1.0 Transitional//EN" systemId="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
|
|
|
<j:useBean var="navbean" class="org.apache.maven.NavBean"/>
|
|
<j:set var="location" value="${outFile.substring(destdir.length())}"/>
|
|
<util:replace var="location" oldChar="\" newChar="/" value="${location}"/>
|
|
<!-- Stores location for publish date / version -->
|
|
<j:set var="date">${maven.xdoc.date}</j:set>
|
|
<j:setProperties object="${navbean}" document="${doc}" location="${location}"/>
|
|
<x:set var="templateContext" select="." />
|
|
|
|
<!-- Sets the current locale -->
|
|
<fmt:setLocale trim="true" value="${currentLocale}"/>
|
|
|
|
<j:if test="${now == null}">
|
|
<j:useBean var="now" class="java.util.Date"/>
|
|
</j:if>
|
|
|
|
<!-- Format the build date depending the current locale and pattern depending if there is a pattern -->
|
|
<j:set var="myDateFormat" value="${maven.xdoc.date.format}"/>
|
|
<j:choose>
|
|
<j:when test="${!empty(myDateFormat)}">
|
|
<fmt:formatDate value="${now}" type="both" var="build.date" pattern="${maven.xdoc.date.format}"/>
|
|
</j:when>
|
|
<j:otherwise>
|
|
<fmt:formatDate value="${now}" type="both" dateStyle="long" timeStyle="long" var="build.date"/>
|
|
</j:otherwise>
|
|
</j:choose>
|
|
|
|
<html>
|
|
<head>
|
|
|
|
<!-- Key is more important than message... -->
|
|
<!-- From doc -->
|
|
<j:set var="_docKey">
|
|
<x:expr select="./properties/title/@key" />
|
|
</j:set>
|
|
<j:set var="_docBundle">
|
|
<x:expr select="./properties/title/@bundle" />
|
|
</j:set>
|
|
<j:if test="${empty(_docKey)}">
|
|
<x:set var="_docTitle" select="string(./properties/title)"/>
|
|
</j:if>
|
|
<j:if test="${!empty(_docKey)}">
|
|
<!-- Shortcut for the user bundle -->
|
|
<j:if test="${empty(_docBundle)}">
|
|
<fmt:message key="${_docKey}" bundle="${myMsg}" var="_docTitle"/>
|
|
</j:if>
|
|
<j:if test="${!empty(_docBundle)}">
|
|
<fmt:bundle basename="${_docBundle}">
|
|
<fmt:message key="${_docKey}" var="_docTitle"/>
|
|
</fmt:bundle>
|
|
</j:if>
|
|
</j:if>
|
|
|
|
<!-- From nav -->
|
|
<j:set var="_navKey">
|
|
<x:expr select="$nav/title/@key" />
|
|
</j:set>
|
|
<j:set var="_navBundle">
|
|
<x:expr select="$nav/title/@bundle" />
|
|
</j:set>
|
|
<j:if test="${empty(_navKey)}">
|
|
<x:set var="_navTitle" select="string($nav/title)"/>
|
|
</j:if>
|
|
<j:if test="${!empty(_navKey)}">
|
|
<!-- Shortcut for the user bundle -->
|
|
<j:if test="${empty(_navBundle)}">
|
|
<fmt:message key="${_navKey}" bundle="${myMsg}" var="_navTitle"/>
|
|
</j:if>
|
|
<j:if test="${!empty(_navBundle)}">
|
|
<fmt:bundle basename="${_navBundle}">
|
|
<fmt:message key="${_navKey}" var="_navTitle"/>
|
|
</fmt:bundle>
|
|
</j:if>
|
|
</j:if>
|
|
|
|
<j:set var="titleSeparator" value=" - "/>
|
|
|
|
<x:if select="$nav/title">
|
|
<title>
|
|
${_docTitle}${titleSeparator}${_navTitle}
|
|
</title>
|
|
</x:if>
|
|
<x:if select="not($nav/title)">
|
|
<title>
|
|
${pom.name}${titleSeparator}${_navTitle}
|
|
</title>
|
|
</x:if>
|
|
|
|
<j:set var="themeUrl" value="${maven.xdoc.theme.url}"/>
|
|
<util:file var="projectCssFile" name="${maven.docs.src}/style/project.css"/>
|
|
|
|
<j:set var="themefile" value="${maven.xdoc.theme.file}"/>
|
|
<util:replace var="themeFile" oldChar="\" newChar="/" value="${themefile}"/>
|
|
<j:if test="${!empty(themefile)}">
|
|
<j:new className="java.lang.String" var="cssFile">
|
|
<j:arg value="${themefile}" type="java.lang.String"/>
|
|
</j:new>
|
|
<j:invoke var="index" on="${cssFile}" method="lastIndexOf">
|
|
<j:arg value="/" type="java.lang.String"/>
|
|
</j:invoke>
|
|
<j:invoke var="cssFileName" on="${cssFile}" method="substring">
|
|
<j:arg value="${index}"/>
|
|
</j:invoke>
|
|
<util:file var="customCssFile" name="${maven.docs.dest}/style${cssFileName}"/>
|
|
</j:if>
|
|
|
|
<style type="text/css" media="all"><![CDATA[
|
|
@import url("${relativePathForLocale}style/maven-base.css");
|
|
]]>
|
|
<j:if test="${!empty(themeUrl)}"><![CDATA[
|
|
@import url("${maven.xdoc.theme.url}");
|
|
]]></j:if>
|
|
<j:if test="${empty(themeUrl)}"><![CDATA[
|
|
@import url("${relativePathForLocale}style/maven-${maven.xdoc.theme}.css");
|
|
]]></j:if>
|
|
<j:if test="${projectCssFile.exists()}"><![CDATA[
|
|
@import url("${relativePathForLocale}style/project.css");
|
|
]]></j:if>
|
|
<j:if test="${customCssFile.exists()}"><![CDATA[
|
|
@import url("${relativePathForLocale}style${cssFileName}");
|
|
]]></j:if>
|
|
</style>
|
|
|
|
<link rel="stylesheet" type="text/css" href="${relativePathForLocale}style/print.css" media="print"/>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=${outputencoding}"/>
|
|
<x:forEach var="author" select="./properties/author">
|
|
<meta name="author" content="${author.text}"/>
|
|
<meta name="email" content="${author.attribute('email').value}"/>
|
|
</x:forEach>
|
|
|
|
<jsl:applyTemplates select="$templateContext/head/*" />
|
|
</head>
|
|
<jsl:applyTemplates select="$templateContext/*" />
|
|
</html>
|
|
</jsl:template>
|
|
|
|
<!-- Skip properties -->
|
|
<jsl:template match="properties" />
|
|
|
|
<!-- Skip head repeat -->
|
|
<jsl:template match="head" />
|
|
|
|
<jsl:template match="body" trim="true">
|
|
<x:set var="templateContext" select="." />
|
|
<x:element name="body"><j:whitespace trim="true">
|
|
<x:attribute name="class">composite</x:attribute>
|
|
<x:forEach var="attr" select="@*">
|
|
<x:attribute name="${attr.name}">${attr.value}</x:attribute>
|
|
</x:forEach>
|
|
</j:whitespace>
|
|
|
|
<div id="banner">
|
|
<!-- set url to org or project url -->
|
|
<j:set var="url" value="${pom.organization.url}"/>
|
|
<j:if test="${!empty(url)}">
|
|
<j:set var="home" value="${pom.organization.url}"/>
|
|
</j:if>
|
|
<j:if test="${empty(url)}">
|
|
<j:set var="home" value="${pom.url}"/>
|
|
</j:if>
|
|
<!-- set home to relative or complete -->
|
|
<j:if test="${!home.startsWith('http://') and !home.startsWith('https://')}">
|
|
<j:set var="home" value="${relativePathForLocale}${home}"/>
|
|
</j:if>
|
|
|
|
<!-- organization logo -->
|
|
<j:set var="logo" value="${pom.organization.logo}"/>
|
|
<j:if test="${!empty(logo)}">
|
|
<!-- set image to relative or complete -->
|
|
<j:set var="image" value="${pom.organization.logo}"/>
|
|
<j:if test="${!image.startsWith('http://') and !image.startsWith('https://')}">
|
|
<j:if test="${!image.startsWith('/')}" trim="yes">
|
|
<j:set var="image" value="${relativePathForLocale}${image}"/>
|
|
</j:if>
|
|
<j:if test="${image.startsWith('/')}" trim="yes">
|
|
<j:set var="image" value="${relativePathForLocale}${image.substring(1)}"/>
|
|
</j:if>
|
|
</j:if>
|
|
<a href="${home}" id="organizationLogo">
|
|
<img src="${image}" alt="${pom.organization.name}" />
|
|
</a>
|
|
</j:if>
|
|
<j:if test="${empty(logo)}">
|
|
<a href="${home}" id="organizationLogo">
|
|
<span class="xleft">${pom.organization.name}</span>
|
|
</a>
|
|
</j:if>
|
|
|
|
<!-- set project to relative or complete -->
|
|
<j:set var="home" value="${pom.url}"/>
|
|
<j:if test="${!home.startsWith('http://') and !home.startsWith('https://')}">
|
|
<j:set var="home" value="${relativePathForLocale}${home}"/>
|
|
</j:if>
|
|
|
|
<!-- project logo and link -->
|
|
<j:set var="logo" value="${pom.logo}"/>
|
|
<j:if test="${logo != null and logo != ''}">
|
|
<!-- set image to relative or complete -->
|
|
<j:set var="image" value="${pom.logo}"/>
|
|
<j:if test="${!image.startsWith('http://') and !image.startsWith('https://')}">
|
|
<j:if test="${!image.startsWith('/')}" trim="yes">
|
|
<j:set var="image" value="${relativePathForLocale}${image}"/>
|
|
</j:if>
|
|
<j:if test="${image.startsWith('/')}" trim="yes">
|
|
<j:set var="image" value="${relativePathForLocale}${image.substring(1)}"/>
|
|
</j:if>
|
|
</j:if>
|
|
|
|
<a href="${home}" id="projectLogo">
|
|
<img src="${image}" alt="${pom.name}"/>
|
|
</a>
|
|
</j:if>
|
|
<j:if test="${logo == null or logo == ''}">
|
|
<a href="${home}" id="projectLogo">
|
|
<span class="xright">${pom.name}</span>
|
|
</a>
|
|
</j:if>
|
|
<div class="clear"><hr /></div>
|
|
</div>
|
|
|
|
<div id="breadcrumbs">
|
|
<maven:property var="version" name="maven.xdoc.version" defaultValue=""/>
|
|
<j:if test="${empty(version)}">
|
|
<j:set var="version" value="${pom.currentVersion}"/>
|
|
</j:if>
|
|
<j:set var="breadcrumbsUsed" value=""/>
|
|
<x:if select="$nav/body/breadcrumbs">
|
|
<j:set var="breadcrumbsUsed" value="'true'"/>
|
|
</x:if>
|
|
|
|
<div class="xleft">
|
|
<j:if test="${empty(breadcrumbsUsed)}">
|
|
<j:if test="${date == 'left'}">
|
|
<fmt:message key="site.last_published" bundle="${msg}"/>: ${build.date}
|
|
<j:if test="${!empty(version)}">
|
|
<j:if test="${!(maven.xdoc.crumb.separator == '')}">
|
|
<span class="separator">${maven.xdoc.crumb.separator}</span>
|
|
</j:if>
|
|
 <fmt:message key="site.doc_for" bundle="${msg}"/> ${version}
|
|
</j:if>
|
|
</j:if>
|
|
</j:if>
|
|
<j:if test="${!empty( breadcrumbsUsed )}">
|
|
<jsl:applyTemplates select="$nav/body/breadcrumbs" />
|
|
<a href="${home}">${pom.name}</a> <span class="separator">></span> ${_docTitle}
|
|
</j:if>
|
|
</div>
|
|
|
|
<div class="xright">
|
|
<j:if test="${empty(breadcrumbsUsed)}">
|
|
<j:if test="${date == 'right'}">
|
|
<fmt:message key="site.last_published" bundle="${msg}"/>: ${build.date}
|
|
<j:if test="${!empty(version)}">
|
|
<j:if test="${!(maven.xdoc.crumb.separator == '')}">
|
|
<span class="separator">${maven.xdoc.crumb.separator}</span>
|
|
</j:if>
|
|
 <fmt:message key="site.doc_for" bundle="${msg}"/> ${version}
|
|
</j:if>
|
|
</j:if>
|
|
</j:if>
|
|
<!-- render links -->
|
|
<x:if select="$nav/body/links">
|
|
<jsl:applyTemplates select="$nav/body/links"/>
|
|
</x:if>
|
|
</div>
|
|
<div class="clear"><hr /></div>
|
|
</div>
|
|
|
|
<!-- left column start -->
|
|
<div id="leftColumn">
|
|
<div id="navcolumn">
|
|
<x:if select="$nav">
|
|
<jsl:applyTemplates
|
|
select="$nav/body/menu[@type='header'] |
|
|
$nav/body/search | $nav/body/menu[not(@type)]"/>
|
|
</x:if>
|
|
<jsl:applyTemplates select="$projectNav/body/menu"/>
|
|
<!-- allows user to put menu items after standard reports -->
|
|
<x:if select="$nav">
|
|
<jsl:applyTemplates select="$nav/body/menu[@type='footer']"/>
|
|
</x:if>
|
|
<j:if test="${context.getVariable('maven.xdoc.legend') == 'true'}">
|
|
<div id="legend">
|
|
<h5><fmt:message key="site.legend" bundle="${msg}"/></h5>
|
|
<ul>
|
|
<li class="externalLink"><fmt:message key="site.external_link" bundle="${msg}"/></li>
|
|
<li class="newWindow"><fmt:message key="site.opens_new_window" bundle="${msg}"/></li>
|
|
</ul>
|
|
</div>
|
|
</j:if>
|
|
|
|
<!-- Display all availables locales depending :
|
|
* the user preferences
|
|
* the size of the maven.xdoc.locale.supported property -->
|
|
<j:if test="${locales != null}">
|
|
<j:if test="${size(locales) gt 0}">
|
|
<j:set var="displaySelect" value="${maven.xdoc.ui.localeList.asSelect}" />
|
|
<j:set var="displayMaxElt" value="${maven.xdoc.ui.localeList.max}"/>
|
|
<j:useBean var="mavenTool" class="org.apache.maven.util.MavenTool"/>
|
|
<j:set var="displayMaxEltAsInteger" value="${mavenTool.toInteger(displayMaxElt)}"/>
|
|
|
|
<div id="language">
|
|
<h5><fmt:message key="site.language" bundle="${msg}"/></h5>
|
|
<ul>
|
|
<!-- Display language in a form with select tag -->
|
|
<j:if test="${displaySelect == 'true' or size(locales) gt displayMaxEltAsInteger}">
|
|
<form name="languageForm" method="GET">
|
|
<select size="1" name="languageSelect"
|
|
onChange="javascript:window.location=this.options[this.selectedIndex].value;">
|
|
<!-- Default language -->
|
|
<j:invokeStatic className="org.apache.maven.xdoc.util.LocaleUtil" method="displayName" var="displayLocale">
|
|
<j:arg value="${defaultLocale}" type="java.util.Locale"/>
|
|
<j:arg value="${defaultLocale}" type="java.util.Locale"/>
|
|
</j:invokeStatic>
|
|
<j:if test="${maven.xdoc.ui.displayByDefault == 'true'}">
|
|
<j:set var="displayLocale">${displayLocale} <fmt:message key="defaultLocale.byDefault" bundle="${msg}"/></j:set>
|
|
</j:if>
|
|
<option value="${relativePathForLocale}${location}">${displayLocale}</option>
|
|
|
|
<!-- Supported language -->
|
|
<j:forEach var="locale" items="${locales}">
|
|
<j:invokeStatic className="org.apache.maven.xdoc.util.LocaleUtil" method="displayName" var="displayLocale">
|
|
<j:arg value="${locale}" type="java.util.Locale"/>
|
|
<j:arg value="${locale}" type="java.util.Locale"/>
|
|
</j:invokeStatic>
|
|
<j:if test="${currentLocale.equals(defaultLocale)}">
|
|
<option value="${relativePathForLocale}${locale}${location}">${displayLocale}</option>
|
|
</j:if>
|
|
<j:if test="${!currentLocale.equals(defaultLocale)}">
|
|
<j:if test="${locale.equals(currentLocale)}">
|
|
<option value="${relativePathForLocale}${locale}${location}" selected="true">${displayLocale}</option>
|
|
</j:if>
|
|
<j:if test="${!locale.equals(currentLocale)}">
|
|
<option value="${relativePathForLocale}${locale}${location}">${displayLocale}</option>
|
|
</j:if>
|
|
</j:if>
|
|
</j:forEach>
|
|
</select>
|
|
</form>
|
|
</j:if>
|
|
|
|
<!-- Display language as listing -->
|
|
<j:if test="${!(displaySelect == 'true' or size(locales) gt displayMaxEltAsInteger)}">
|
|
<!-- Default language -->
|
|
<j:invokeStatic className="org.apache.maven.xdoc.util.LocaleUtil" method="displayName" var="displayLocale">
|
|
<j:arg value="${defaultLocale}" type="java.util.Locale"/>
|
|
<j:arg value="${defaultLocale}" type="java.util.Locale"/>
|
|
</j:invokeStatic>
|
|
<j:if test="${maven.xdoc.ui.displayByDefault == 'true'}">
|
|
<j:set var="displayLocale">${displayLocale} <fmt:message key="defaultLocale.byDefault" bundle="${msg}"/></j:set>
|
|
</j:if>
|
|
<li><doc:itemLink name="${displayLocale}" link="/${location}" relativePath="${relativePathForLocale}"/></li>
|
|
|
|
<!-- Supported language -->
|
|
<j:forEach var="locale" items="${locales}">
|
|
<j:invokeStatic className="org.apache.maven.xdoc.util.LocaleUtil" method="displayName" var="displayLocale">
|
|
<j:arg value="${locale}" type="java.util.Locale"/>
|
|
<j:arg value="${locale}" type="java.util.Locale"/>
|
|
</j:invokeStatic>
|
|
<li><doc:itemLink name="${displayLocale}" link="${locale}${location}" relativePath="${relativePathForLocale}"/></li>
|
|
</j:forEach>
|
|
</j:if>
|
|
</ul>
|
|
</div>
|
|
</j:if>
|
|
</j:if>
|
|
|
|
<x:if select="$nav/body/powered-by">
|
|
<jsl:applyTemplates select="$nav/body/powered-by"/>
|
|
</x:if>
|
|
|
|
<!-- Standard Maven Navigation -->
|
|
<j:set var="fileName">${file}</j:set>
|
|
<j:set var="poweredbyimage">${maven.xdoc.poweredby.image}</j:set>
|
|
<j:set var="poweredbytitle">${maven.xdoc.poweredby.title}</j:set>
|
|
<j:set var="poweredbyurl" value="${maven.xdoc.poweredby.url}" />
|
|
<j:if test="${!empty(poweredbyimage)}">
|
|
<a id="poweredBy" href="${poweredbyurl}" title="${poweredbytitle}">
|
|
<img alt="${maven.xdoc.poweredby.title}" src="${relativePathForLocale}images/logos/${poweredbyimage}" />
|
|
</a>
|
|
</j:if>
|
|
<j:if test="${empty( breadcrumbsUsed )}">
|
|
<j:if test="${date == 'navigation-bottom'}">
|
|
<div id="lastPublished"><fmt:message key="site.last_published" bundle="${msg}"/>: ${build.date}</div>
|
|
</j:if>
|
|
</j:if>
|
|
</div>
|
|
</div>
|
|
<!-- left column end -->
|
|
|
|
<!-- body start -->
|
|
<div id="bodyColumn">
|
|
<div class="contentBox">
|
|
<jsl:applyTemplates select="$templateContext/*" />
|
|
</div>
|
|
</div>
|
|
<div class="clear"><hr /></div>
|
|
<!-- body end -->
|
|
|
|
<!-- footer start -->
|
|
<div id="footer">
|
|
<jsl:applyTemplates select="$nav/body/footer"/>
|
|
|
|
<j:if test="${!empty(breadcrumbsUsed)}">
|
|
<div class="xleft">
|
|
<fmt:message key="site.last_published" bundle="${msg}"/>: ${build.date}
|
|
<j:if test="${!empty(version)}">
|
|
<j:if test="${!(maven.xdoc.crumb.separator == '')}">
|
|
<span class="separator">${maven.xdoc.crumb.separator}</span>
|
|
</j:if>
|
|
 <fmt:message key="site.doc_for" bundle="${msg}"/> ${version}
|
|
</j:if>
|
|
</div>
|
|
</j:if>
|
|
<div class="xright">
|
|
<j:if test="${!empty(pom.organization.name)}">
|
|
<j:if test="${!empty(pom.inceptionYear)}">
|
|
<j:if test="${pom.inceptionYear == mavenCurrentYear}">
|
|
© ${mavenCurrentYear}, ${pom.organization.name}
|
|
</j:if>
|
|
<j:if test="${pom.inceptionYear != mavenCurrentYear}">
|
|
© ${pom.inceptionYear}-${mavenCurrentYear}, ${pom.organization.name}
|
|
</j:if>
|
|
</j:if>
|
|
<j:if test="${empty(pom.inceptionYear)}">
|
|
© ${mavenCurrentYear}, ${pom.organization.name}
|
|
</j:if>
|
|
<j:if test="${empty(breadcrumbsUsed)}">
|
|
<j:if test="${date == 'bottom'}">
|
|
© - <fmt:message key="site.last_published" bundle="${msg}"/>: ${build.date}
|
|
</j:if>
|
|
</j:if>
|
|
|
|
</j:if>
|
|
</div>
|
|
<div class="clear"><hr /></div>
|
|
</div>
|
|
<!-- footer end -->
|
|
</x:element>
|
|
</jsl:template>
|
|
|
|
<!-- process a documentation section -->
|
|
<jsl:template match="section" trim="true">
|
|
<div class="section">
|
|
<x:set var="_sectionName" select="string(@name)"/>
|
|
<j:set var="_sectionId"><x:expr select="@id"/></j:set>
|
|
|
|
<!-- Key is more important than message... -->
|
|
<j:set var="_key">
|
|
<x:expr select="@key" />
|
|
</j:set>
|
|
<j:set var="_bundle">
|
|
<x:expr select="@bundle" />
|
|
</j:set>
|
|
<j:if test="${!empty(_key)}">
|
|
<!-- Default bundle is the user one in ${maven.xdoc.bundle} -->
|
|
<j:if test="${empty(_bundle)}">
|
|
<fmt:message key="${_key}" bundle="${myMsg}" var="_sectionName"/>
|
|
</j:if>
|
|
<j:if test="${!empty(_bundle)}">
|
|
<fmt:bundle basename="${_bundle}">
|
|
<fmt:message key="${_key}" var="_sectionName"/>
|
|
</fmt:bundle>
|
|
</j:if>
|
|
</j:if>
|
|
|
|
<!-- construct anchor from 'id' tag if it exists, from 'name' tag otherwise -->
|
|
<j:if test="${!empty(_sectionId)}">
|
|
<j:set var="_anchorName"><x:expr select="@id"/></j:set>
|
|
</j:if>
|
|
<j:if test="${empty(_sectionId)}">
|
|
<!-- named anchors can't contain whitespaces -->
|
|
<j:set var="_anchorName"><doc:escapeNameToken value="${_sectionName}"/></j:set>
|
|
</j:if>
|
|
<j:if test="${!empty(_anchorName)}">
|
|
<a name="${_anchorName}"/>
|
|
</j:if>
|
|
<h2>${_sectionName}</h2>
|
|
<jsl:applyTemplates />
|
|
</div>
|
|
</jsl:template>
|
|
|
|
<jsl:template match="subsection" trim="true">
|
|
<div class="subsection">
|
|
<x:set var="_sectionName" select="string(@name)"/>
|
|
<j:set var="_sectionId"><x:expr select="@id"/></j:set>
|
|
|
|
<!-- Key is more important than message... -->
|
|
<j:set var="_key">
|
|
<x:expr select="@key" />
|
|
</j:set>
|
|
<j:set var="_bundle">
|
|
<x:expr select="@bundle" />
|
|
</j:set>
|
|
<j:if test="${!empty(_key)}">
|
|
<!-- Default bundle is the user one in ${maven.xdoc.bundle} -->
|
|
<j:if test="${empty(_bundle)}">
|
|
<fmt:message key="${_key}" bundle="${myMsg}" var="_sectionName"/>
|
|
</j:if>
|
|
<j:if test="${!empty(_bundle)}">
|
|
<fmt:bundle basename="${_bundle}">
|
|
<fmt:message key="${_key}" var="_sectionName"/>
|
|
</fmt:bundle>
|
|
</j:if>
|
|
</j:if>
|
|
|
|
<!-- construct anchor from 'id' tag if it exists, from 'name' tag otherwise -->
|
|
<j:if test="${!empty(_sectionId)}">
|
|
<j:set var="_anchorName"><x:expr select="@id"/></j:set>
|
|
</j:if>
|
|
<j:if test="${empty(_sectionId)}">
|
|
<!-- named anchors can't contain whitespaces -->
|
|
<j:set var="_anchorName"><doc:escapeNameToken value="${_sectionName}"/></j:set>
|
|
</j:if>
|
|
<j:if test="${!empty(_anchorName)}">
|
|
<a name="${_anchorName}"/>
|
|
</j:if>
|
|
<h3>${_sectionName}</h3>
|
|
<jsl:applyTemplates />
|
|
</div>
|
|
</jsl:template>
|
|
|
|
<jsl:template match="source" trim="false">
|
|
<div class="source"><pre><jsl:applyTemplates /></pre></div>
|
|
</jsl:template>
|
|
|
|
<jsl:template match="escapeXml" trim="false"><j:set var="escapedChunk"><jsl:applyTemplates/></j:set>${escapedChunk}</jsl:template>
|
|
|
|
<jsl:template match="a" trim="true">
|
|
<x:element name="a" trim="true">
|
|
<x:forEach var="attr" select="@*">
|
|
<j:choose>
|
|
<j:set var="attr_name" value="${attr.name}"/>
|
|
<j:set var="attr_value" value="${attr.value}"/>
|
|
<j:if test="${attr_name == 'hrefkey'}">
|
|
<j:set var="_bundle">
|
|
<x:expr select="@bundle" />
|
|
</j:set>
|
|
<j:if test="${!empty(attr_value)}">
|
|
<!-- If there is hrefkey, then change attr_name to href -->
|
|
<!-- and attr_value to the formatted message -->
|
|
<j:set var="attr_name" value="href"/>
|
|
<!-- Default bundle is the user one in ${maven.xdoc.bundle} -->
|
|
<j:if test="${empty(_bundle)}">
|
|
<fmt:message key="${attr_value}" bundle="${myMsg}" var="attr_value"/>
|
|
</j:if>
|
|
<j:if test="${!empty(_bundle)}">
|
|
<fmt:bundle basename="${_bundle}">
|
|
<fmt:message key="${attr_value}" var="attr_value"/>
|
|
</fmt:bundle>
|
|
</j:if>
|
|
</j:if>
|
|
</j:if>
|
|
<j:when test="${attr_name == 'href'}">
|
|
<j:set var="href" value="${attr_value}" />
|
|
<j:choose>
|
|
<j:when test="${href.startsWith('#')}">
|
|
<x:attribute name="href">
|
|
<doc:escapeNameToken value="${href}"/>
|
|
</x:attribute>
|
|
</j:when>
|
|
<j:when test="${href.startsWith('http://') or href.startsWith('https://')}">
|
|
<x:attribute name="href">${href}</x:attribute>
|
|
<x:attribute name="class">externalLink</x:attribute>
|
|
<x:attribute name="title">External Link</x:attribute>
|
|
</j:when>
|
|
<j:otherwise>
|
|
<x:attribute name="href">${href}</x:attribute>
|
|
</j:otherwise>
|
|
</j:choose>
|
|
</j:when>
|
|
<j:when test="${attr_name == 'target'}">
|
|
<j:set var="target">${attr_value}</j:set>
|
|
<j:if test="${!empty(target) and target.equals('_blank')}">
|
|
<x:attribute name="class">newWindow</x:attribute>
|
|
<x:attribute name="title">New Window</x:attribute>
|
|
</j:if>
|
|
<x:attribute name="target">${target}</x:attribute>
|
|
</j:when>
|
|
<j:when test="${attr_name == 'name'}">
|
|
<x:attribute name="name">
|
|
<doc:escapeNameToken value="${attr_value}"/>
|
|
</x:attribute>
|
|
</j:when>
|
|
<j:when test="${attr.name == 'bundle'}"/>
|
|
<j:otherwise>
|
|
<x:attribute name="${attr_name}">${attr_value}</x:attribute>
|
|
</j:otherwise>
|
|
</j:choose>
|
|
</x:forEach>
|
|
<jsl:applyTemplates/>
|
|
</x:element>
|
|
</jsl:template>
|
|
|
|
<!-- Process the links navbar -->
|
|
<jsl:template match="links" trim="true">
|
|
<j:set var="linkCount" value="1"/>
|
|
<x:forEach var="link" select="item">
|
|
<x:set var="_img" select="string(@img)"/>
|
|
<x:set var="_name" select="string(@name)"/>
|
|
<x:set var="_link" select="string(@href)"/>
|
|
<x:set var="_target" select="string(@target)"/>
|
|
<j:whitespace trim="false">
|
|
<j:if test="${linkCount != 1}">
|
|
<j:if test="${!(maven.xdoc.crumb.separator == '')}">
|
|
<span class="separator">${maven.xdoc.crumb.separator}</span>
|
|
</j:if>
|
|
</j:if>
|
|
<doc:itemLink name="${_name}" link="${_link}" img="${_img}" target="${_target}"/>
|
|
</j:whitespace>
|
|
<j:set var="linkCount" value="${1+linkCount}"/>
|
|
</x:forEach>
|
|
</jsl:template>
|
|
|
|
<!-- Process additional powered-by's -->
|
|
<jsl:template match="powered-by" trim="true">
|
|
<x:forEach var="link" select="item">
|
|
<x:set var="poweredbyimage" select="string(@img)"/>
|
|
<x:set var="poweredbytitle" select="string(@name)"/>
|
|
<x:set var="poweredbyurl" select="string(@href)"/>
|
|
<j:if test="${!empty(poweredbyimage)}">
|
|
<a id="poweredByExternal" href="${poweredbyurl}" title="${poweredbytitle}">
|
|
<img alt="${poweredbytitle}" src="${poweredbyimage}" />
|
|
</a>
|
|
</j:if>
|
|
</x:forEach>
|
|
</jsl:template>
|
|
|
|
<!-- Process the breadcrumb navbar -->
|
|
<jsl:template match="breadcrumbs" trim="true">
|
|
<x:forEach var="link" select="item">
|
|
<x:set var="_name" select="string(@name)"/>
|
|
<x:set var="_link" select="string(@href)"/>
|
|
<a href="${_link}">${_name}</a>
|
|
 <span class="separator">></span> 
|
|
</x:forEach>
|
|
</jsl:template>
|
|
|
|
<!-- Process a menu for the navigation bar -->
|
|
<jsl:template match="menu" trim="true">
|
|
<x:set var="_menuName" select="string(@name)"/>
|
|
<!-- Key is more important than message... -->
|
|
<j:set var="_key">
|
|
<x:expr select="@key" />
|
|
</j:set>
|
|
<j:set var="_bundle">
|
|
<x:expr select="@bundle" />
|
|
</j:set>
|
|
<j:if test="${!empty(_key)}">
|
|
<!-- Default bundle is the user one in ${maven.xdoc.bundle} -->
|
|
<j:if test="${empty(_bundle)}">
|
|
<fmt:message key="${_key}" bundle="${myMsg}" var="_menuName"/>
|
|
</j:if>
|
|
<j:if test="${!empty(_bundle)}">
|
|
<fmt:bundle basename="${_bundle}">
|
|
<fmt:message key="${_key}" var="_menuName"/>
|
|
</fmt:bundle>
|
|
</j:if>
|
|
</j:if>
|
|
<j:set var="_menuNameEscaped"><doc:escapeNameToken value="${_menuName}"/></j:set>
|
|
|
|
<j:choose>
|
|
<j:when test="${!empty(_menuName)}">
|
|
<div id="menu${_menuNameEscaped}">
|
|
<h5>${_menuName}</h5>
|
|
<ul><jsl:applyTemplates select="item"/></ul>
|
|
</div>
|
|
</j:when>
|
|
<j:otherwise>
|
|
<div>
|
|
<ul><jsl:applyTemplates select="item"/></ul>
|
|
</div>
|
|
</j:otherwise>
|
|
</j:choose>
|
|
</jsl:template>
|
|
|
|
<jsl:template match="item" trim="true">
|
|
<x:set var="item" select="."/>
|
|
<x:set var="_name" select="string(@name)"/>
|
|
<x:set var="_link" select="string(@href)"/>
|
|
<x:set var="_img" select="string(@img)"/>
|
|
<x:set var="_target" select="string(@target)"/>
|
|
<x:set var="_childCount" select="count(./item)"/>
|
|
<j:set var="_isCollapsed" value="${navbean.isCollapsed(item.get(0))}"/>
|
|
<j:set var="_state" value="none"/>
|
|
|
|
<!-- Key is more important than message... -->
|
|
<j:set var="_key">
|
|
<x:expr select="@key" />
|
|
</j:set>
|
|
<j:set var="_bundle">
|
|
<x:expr select="@bundle" />
|
|
</j:set>
|
|
<j:if test="${!empty(_key)}">
|
|
<!-- Default bundle is the user one in ${maven.xdoc.bundle} -->
|
|
<j:if test="${empty(_bundle)}">
|
|
<fmt:message key="${_key}" bundle="${myMsg}" var="_name"/>
|
|
</j:if>
|
|
<j:if test="${!empty(_bundle)}">
|
|
<fmt:bundle basename="${_bundle}">
|
|
<fmt:message key="${_key}" var="_name"/>
|
|
</fmt:bundle>
|
|
</j:if>
|
|
</j:if>
|
|
|
|
<j:if test="${_childCount.intValue() gt 0}">
|
|
<j:if test="${!_isCollapsed}"><j:set var="_state" value="expanded"/></j:if>
|
|
<j:if test="${_isCollapsed}"><j:set var="_state" value="collapsed"/></j:if>
|
|
</j:if>
|
|
<li class="${_state}">
|
|
<j:if test="${navbean.isSelected(item.get(0))}">
|
|
<strong><doc:itemLink name="${_name}" link="${_link}" img="${_img}" state="${_state}" target="${_target}"/></strong>
|
|
</j:if>
|
|
<j:if test="${!navbean.isSelected(item.get(0))}">
|
|
<doc:itemLink name="${_name}" link="${_link}" img="${_img}" state="${_state}" target="${_target}"/>
|
|
</j:if>
|
|
<j:if test="${_state == 'expanded'}">
|
|
<ul>
|
|
<jsl:applyTemplates select="item"/>
|
|
</ul>
|
|
</j:if>
|
|
</li>
|
|
</jsl:template>
|
|
|
|
<!-- Google site search -->
|
|
<jsl:template match="search" trim="true">
|
|
<!-- Search code: http://www.google.com/searchcode.html -->
|
|
<!-- Google logos: http://www.google.com/stickers.html -->
|
|
<!-- Terms: http://www.google.com./services/terms_free.html -->
|
|
<div id="search">
|
|
<h5>Search ${pom.name}</h5>
|
|
<form method="get" action="http://www.google.com/search">
|
|
<a class="navlink" href="http://www.google.com">
|
|
<img src="http://www.google.com/logos/Logo_25wht.gif" width="75" height="32" alt="Google" />
|
|
</a>
|
|
<j:set var="siteURL" value="${pom.url}"/>
|
|
<!-- google fails on urls that end with / -->
|
|
<j:if test="${siteURL.endsWith('/')}">
|
|
<j:set var="URLLength" value="${siteURL.length() - 1}"/>
|
|
<j:set var="siteURL" value="${siteURL.substring(0, URLLength.intValue())}"/>
|
|
</j:if>
|
|
<input type="text" id="q" size="15" name="q" maxlength="255" value=""/>
|
|
<input type="submit" id="btnG" value="Go" name="btnG"/>
|
|
<input type="hidden" name="domains" value="${siteURL}"/>
|
|
<input type="hidden" id="search" name="sitesearch" value="${siteURL}"/>
|
|
</form>
|
|
</div>
|
|
</jsl:template>
|
|
|
|
<!-- preserve whitespace in the following elements -->
|
|
<jsl:template match="pre | script | style" trim="true">
|
|
<x:set var="nodename" select="name()"/>
|
|
<x:element name="${nodename}">
|
|
<x:forEach var="attr" select="@*">
|
|
<x:attribute name="${attr.name}">${attr.value}</x:attribute>
|
|
</x:forEach>
|
|
<j:whitespace trim="false"><jsl:applyTemplates /></j:whitespace>
|
|
</x:element>
|
|
</jsl:template>
|
|
|
|
<!-- xhtml fixup: add missing alt attribute for images -->
|
|
<jsl:template match="img" trim="true">
|
|
<x:element name="img">
|
|
<x:forEach var="attr" select="@*">
|
|
<x:attribute name="${attr.name}">${attr.value}</x:attribute>
|
|
</x:forEach>
|
|
<x:set var="noalt" select="count(./@alt) = 0" />
|
|
<j:if test="${noalt}" >
|
|
<x:attribute name="alt"></x:attribute>
|
|
</j:if>
|
|
</x:element>
|
|
</jsl:template>
|
|
|
|
<jsl:template match="footer" trim="true">
|
|
<div class="xleft">
|
|
<jsl:applyTemplates />
|
|
</div>
|
|
</jsl:template>
|
|
|
|
<jsl:template match="table" trim="true">
|
|
<j:set var="rowcount" value="0"/>
|
|
<table class="bodyTable">
|
|
<jsl:applyTemplates />
|
|
</table>
|
|
</jsl:template>
|
|
|
|
<jsl:template match="tr" trim="true">
|
|
<j:choose>
|
|
<j:when test="${rowMode == 'a'}">
|
|
<j:set var="rowMode" value="b"/>
|
|
</j:when>
|
|
<j:otherwise>
|
|
<j:set var="rowMode" value="a"/>
|
|
</j:otherwise>
|
|
</j:choose>
|
|
<x:element name="tr"><j:whitespace trim="true">
|
|
<x:attribute name="class">${rowMode}</x:attribute>
|
|
<x:forEach var="attr" select="@*">
|
|
<x:attribute name="${attr.name}">${attr.value}</x:attribute>
|
|
</x:forEach>
|
|
<jsl:applyTemplates />
|
|
</j:whitespace></x:element>
|
|
</jsl:template>
|
|
|
|
<!-- goals documentation -->
|
|
<jsl:template match="goals" trim="true">
|
|
<!-- reset row alternation -->
|
|
<j:set var="rowMode" value="" />
|
|
<div class="h3">
|
|
<a name="Goals"/><h3><fmt:message key="site.goals" bundle="${msg}"/></h3>
|
|
<table class="bodyTable">
|
|
<thead>
|
|
<tr><th><fmt:message key="site.goal" bundle="${msg}"/></th><th><fmt:message key="site.description" bundle="${msg}"/></th></tr>
|
|
</thead>
|
|
<tbody>
|
|
<jsl:applyTemplates select="goal"/>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</jsl:template>
|
|
|
|
<!-- a goal -->
|
|
<jsl:template match="goal" trim="true">
|
|
<j:choose>
|
|
<j:when test="${rowMode == 'a'}">
|
|
<j:set var="rowMode" value="b"/>
|
|
</j:when>
|
|
<j:otherwise>
|
|
<j:set var="rowMode" value="a"/>
|
|
</j:otherwise>
|
|
</j:choose>
|
|
|
|
<x:element name="tr">
|
|
<j:whitespace trim="true">
|
|
<x:attribute name="class">${rowMode}</x:attribute>
|
|
<j:set var="_goalName"><x:expr select="./name" /></j:set>
|
|
<td style="width:20%"><a name="${_goalName}"/>${_goalName}</td>
|
|
<td ><jsl:applyTemplates select="description" /></td>
|
|
</j:whitespace>
|
|
</x:element>
|
|
</jsl:template>
|
|
|
|
<jsl:template match="description">
|
|
<jsl:applyTemplates trim="false"/>
|
|
</jsl:template>
|
|
|
|
<!-- process a guide-like navbar -->
|
|
<jsl:template match="navbar" trim="false">
|
|
<x:set var="_prevlink" select="string(@prev)"/>
|
|
<x:set var="_homelink" select="string(@home)"/>
|
|
<x:set var="_nextlink" select="string(@next)"/>
|
|
<j:set var="prev"><fmt:message key="site.navbar.previous" bundle="${msg}"/></j:set>
|
|
<j:set var="home"><fmt:message key="site.navbar.home" bundle="${msg}"/></j:set>
|
|
<j:set var="next"><fmt:message key="site.navbar.next" bundle="${msg}"/></j:set>
|
|
<hr/>
|
|
<div align="center" class="navbar">
|
|
[
|
|
<j:if test="${ ! empty(_prevlink) }"><a href="${_prevlink}">${prev}</a></j:if>
|
|
<j:if test="${ empty(_prevlink) }">${prev}</j:if>
|
|
|
|
|
<j:if test="${ ! empty(_homelink)}"><a href="${_homelink}">${home}</a></j:if>
|
|
<j:if test="${ empty(_homelink) }">home</j:if>
|
|
|
|
|
<j:if test="${ ! empty(_nextlink)}"><a href="${_nextlink}">${next}</a></j:if>
|
|
<j:if test="${ empty(_nextlink)}">${next}</j:if>
|
|
]
|
|
</div>
|
|
</jsl:template>
|
|
|
|
<!-- element values don't pass through as text -->
|
|
<jsl:template match="@*"/>
|
|
|
|
<!-- CDATA and text nodes pass-thru -->
|
|
<jsl:template match="text()"><x:expr select="."/></jsl:template>
|
|
|
|
<!-- copy any other elements through -->
|
|
<jsl:template match="*" trim="false"><jsl:copy trim="false"><jsl:applyTemplates trim="false"/></jsl:copy></jsl:template>
|
|
|
|
<!-- process a message -->
|
|
<!-- Key is more important than message... -->
|
|
<jsl:template match="message" trim="true">
|
|
<j:set var="_key">
|
|
<x:expr select="@key" />
|
|
</j:set>
|
|
<j:set var="_bundle">
|
|
<x:expr select="@bundle" />
|
|
</j:set>
|
|
<j:if test="${!empty(_key)}">
|
|
<!-- Default bundle is the user one in ${maven.xdoc.bundle} -->
|
|
<j:if test="${empty(_bundle)}">
|
|
<fmt:message key="${_key}" bundle="${myMsg}" />
|
|
</j:if>
|
|
<j:if test="${!empty(_bundle)}">
|
|
<fmt:bundle basename="${_bundle}">
|
|
<fmt:message key="${_key}" />
|
|
</fmt:bundle>
|
|
</j:if>
|
|
</j:if>
|
|
|
|
<jsl:applyTemplates />
|
|
</jsl:template>
|
|
|
|
</jsl:stylesheet>
|