Chapter 3. Docbook authoring for a java developer

3.1. Resources

I added the most used docbook commands, check out these sites to learn some more:

3.2. command

You can specify commands like this : <command>javac –version</command>

The output: javac –version

3.3. screen

You can specify output like this : <screen>screen output</screen>

The output:

c:\tutorial\springfuse-example>mvn initialize
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building springfuse-example
[INFO]    task-segment: [initialize]
[INFO] ------------------------------------------------------------------------
[INFO] [sql:execute {execution: Create and initialize the database}]
[INFO] Executing file: c:\tutorial\springfuse-example\src\main\sql\h2\drop.sql
[INFO] Executing file: c:\tutorial\springfuse-example\src\main\sql\h2\create.sql
[INFO] Executing file: c:\tutorial\springfuse-example\src\main\sql\h2\comment.sql
[INFO] Executing file: c:\tutorial\springfuse-example\src\main\sql\h2\init.sql
[INFO] 45 of 45 SQL statements executed successfully
[INFO] [springfuse:extract {execution: Extract database Meta Data}]
[INFO] Ready to extract the database schema
[INFO] Connecting to database jdbcUrl=jdbc:h2:~/.h2/quickstartdb
[INFO] Connected OK
[INFO] database Product Name: H2
[INFO] database schema extracted
[INFO] File data-model.springfuse passed reverse conversion OK
[INFO] File data-model.springfuse created successfully
[INFO] You are now ready to upload data-model.springfuse to http://www.springfuse.com/ 
       and generate your project!
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Tue Jan 27 16:10:07 CET 2009
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------

3.4. filename

You can specify filenames like this : <filename>src/main/generated-java/com/springfuse/example/model/Account.java</filename>

The output: src/main/generated-java/com/springfuse/example/model/Account.java

3.5. classname

You can specify classname like this : <classname>GenericDaoService</classname>

The output: GenericDaoService

3.6. literals

You can specify literals like this : <literal>jdbc.driver</literal>

The output: jdbc.driver

3.7. itemizedlist

You can set lists like this

<itemizedlist>
	<listitem><para>Spring Core</para></listitem>
	<listitem><para>Spring MVC</para></listitem>
	<listitem><para>Spring Security</para></listitem>
	<listitem><para>Spring Integration</para></listitem>
	<listitem><para>Spring Web Flow</para></listitem>
</itemizedlist>

The output

  • Spring Core

  • Spring MVC

  • Spring Security

  • Spring Integration

  • Spring Web Flow

3.8. imageobject

You can add images like this

<mediaobject>
	<imageobject>
		<imagedata fileref="images/how-springfuse-works.png" align="center" />
	</imageobject>
	<caption>How springfuse works</caption>
</mediaobject>

The output:

How springfuse works

3.9. Maven

You can use the properties from your pom

Table 3.1. Maven properties in docbook

PropertyXMLValue
pom.groupId<?eval ${project.groupId}?>com.springfuse.blog.docbook
pom.artifactId<?eval ${project.artifactId}?>docbook
pom.name<?eval ${project.name}?>docbook
pom.version<?eval ${project.version}?>1.0.0