Replace maven.faq.toplinks property by toplink attribute in the fml file (m1 - m2 compatibility)

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@329522 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ltheussl 2005-10-30 05:33:27 +00:00
parent 2d178c1aa3
commit c802fc460b
9 changed files with 18 additions and 14 deletions

View File

@ -22,6 +22,9 @@
<fileset dir="${maven.docs.src}">
<include name="**/*.fml"/>
</fileset>
<fileset dir="${basedir}/src/plugin-resources/xsd">
<include name="faq.xsd"/>
</fileset>
</copy>
</postGoal>
</project>

View File

@ -88,6 +88,9 @@
<j:set var="outFile" value="${mapper.mapFileName(outFileForward).0}"/>
<echo>Generating ${outFile} from ${faqFile}</echo>
<j:if test="${maven.faq.toplinks == 'true'}">
<echo>WARNING: the property maven.faq.toplinks is depreated! Use the 'toplink' attribute in your fml file instead.</echo>
</j:if>
<!-- produce a output xdoc xml file from parsed .fml source -->
<doc:jslFile

View File

@ -23,6 +23,3 @@ maven.faq.src=${maven.docs.src}
# Destination directory where output xdocs file are produced
maven.faq.dest=${maven.gen.docs}
# Whether to generate links to the top of the page
maven.faq.toplinks=true

View File

@ -29,6 +29,7 @@
trim="true">
<jsl:template match="faqs" trim="false">
<j:set var="title"><x:expr select="@title" /></j:set>
<j:set var="toplinks"><x:expr select="@toplink" /></j:set>
<document>
<properties>
<title>${title}</title>
@ -81,11 +82,11 @@
<jsl:template match="answer">
<dd>
<jsl:applyTemplates trim="true" />
<j:if test="${context.getVariable('maven.faq.toplinks') == 'true'}">
<j:set var="top"><x:expr select="../../../@title"/></j:set>
<j:set var="_top">#<doc:escapeNameToken value="${top}"/></j:set>
<div class="xright"><a href="${_top}">[top]</a></div>
<br/>
<j:if test="${toplinks != 'false'}">
<j:set var="top"><x:expr select="../../../@title"/></j:set>
<j:set var="_top">#<doc:escapeNameToken value="${top}"/></j:set>
<div class="xright"><a href="${_top}">[top]</a></div>
<br/>
</j:if>
</dd>
</jsl:template>

View File

@ -58,6 +58,7 @@
<xsd:element ref="part" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="title" type="xsd:string" use="optional"/>
<xsd:attribute name="toplink" type="xsd:string" use="optional"/>
</xsd:complexType>
</xsd:element>

View File

@ -23,6 +23,7 @@
</properties>
<body>
<release version="1.6-SNAPSHOT" date="In SVN">
<action dev="ltheussl" type="update">Deprecated <code>maven.faq.toplinks</code> property. Use the <code>toplink</code> attribute in the fml file instead.</action>
<action dev="aheritier" type="update" issue="MAVEN-1712">Update dependencies to match ones in maven 1.1 core and to unify them between plugins. The following dependencies are updated :
<ul>
<li>commons-jelly-tags-xml v1.0 -> v1.1</li>

View File

@ -17,7 +17,7 @@
*/
-->
<faqs title="Frequently Asked Questions">
<faqs title="Frequently Asked Questions" toplink="false">
<part id="general">
<title>General</title>

View File

@ -38,7 +38,7 @@
<a href="faq.xsd">here</a>.
</p>
<p>
Please note that the the FAQ description has to be in a file with a
<strong>Note</strong>: the FAQ description has to be in a file with a
<code>.fml</code> extension.
</p>
<p>

View File

@ -48,9 +48,7 @@
<td>maven.faq.toplinks</td>
<td>Yes</td>
<td>
Specifies whether links to the top of the page should be
generated after each answer.
Defaults to <code>true</code>.
<strong>DEPRECATED</strong>: use the <code>toplink</code> attribute in the fml file instead.
</td>
</tr>
</table>