You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ws...@apache.org on 2006/11/26 05:11:26 UTC
svn commit: r479270 -
/maven/site/trunk/src/site/apt/guides/mini/guide-snippet-macro.apt
Author: wsmoak
Date: Sat Nov 25 20:11:25 2006
New Revision: 479270
URL: http://svn.apache.org/viewvc?view=rev&rev=479270
Log:
Document the 'file' parameter which will be in the next doxia-core release.
Add a JSP snippet example.
Modified:
maven/site/trunk/src/site/apt/guides/mini/guide-snippet-macro.apt
Modified: maven/site/trunk/src/site/apt/guides/mini/guide-snippet-macro.apt
URL: http://svn.apache.org/viewvc/maven/site/trunk/src/site/apt/guides/mini/guide-snippet-macro.apt?view=diff&rev=479270&r1=479269&r2=479270
==============================================================================
--- maven/site/trunk/src/site/apt/guides/mini/guide-snippet-macro.apt (original)
+++ maven/site/trunk/src/site/apt/guides/mini/guide-snippet-macro.apt Sat Nov 25 20:11:25 2006
@@ -39,8 +39,8 @@
Each snippet must be assigned an id, and the id must be unique within the
source document.
- Following are examples of snippets in Java and XML source documents, as well
- as the corresponding macros in the APT documentation formats.
+ Following are examples of snippets in various source documents, as well
+ as the corresponding macros in the APT documentation format.
* Snippets in Sources
@@ -69,17 +69,39 @@
<!-- END SNIPPET: snip-id -->
-----
+** JSP
+
+------
+ <%-- START-SNIPPET: snip-id --%>
+ <ul>
+ <li><a href="newPerson!input.action">Create</a> a new person</li>
+ <li><a href="listPeople.action">List</a> all people</li>
+ </ul>
+ <%-- START-SNIPPET: snip-id --%>
+------
+
* Snippets in Documentation
** APT
- Macros in apt <<must not>> be indented.
+------
+ %{snippet|id=snip-id|url=http://svn.example.com/path/to/Sample.java}
+ %{snippet|id=snip-id|url=file:///path/to/Sample.java}
------
-%{snippet|id=snip-id|url=http://svn.example.com/path/to/Sample.java}
-%{snippet|id=snip-id|url=file:///path/to/Sample.java}
+ As of doxia-core version 1.0-alpha-9, a 'file' parameter is also available.
+ If a full path is not specified, the location is assumed to be relative to
+ $\{basedir\}.
+
------
+ ~~ Since doxia-core 1.0-alpha-9
+ %{snippet|id=abc|file=src/main/webapp/index.jsp}
+------
+
+ * Macros in apt <<must not>> be indented.
+
+ * Exactly one of <<<url>>> or <<<file>>> <<must>> be specified.
** XDOC