cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1425988 [4/4] - in /cayenne/main/branches/STABLE-3.1/docs/docbook: cayenne-guide/src/docbkx/ getting-started-rop/src/docbkx/ getting-started/src/docbkx/ stylesheets/
Date Wed, 26 Dec 2012 18:38:18 GMT
Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml?rev=1425988&r1=1425987&r2=1425988&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml Wed Dec 26 18:38:17 2012
@@ -1,146 +1,146 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
-	version="5.0" xml:id="starting-cayenne">
-	<title>Starting Cayenne</title>
-	<section xml:id="starting-serverruntime">
-		<title>Starting and Stopping ServerRuntime</title>
-		<para>In runtime Cayenne is accessed via
-				<code>org.apache.cayenne.configuration.server.ServerRuntime</code>. ServerRuntime is
-			created simply by calling a
-			constructor:<programlisting language="java">ServerRuntime runtime =
-	new ServerRuntime("com/example/cayenne-project.xml");</programlisting></para>
-		<para>The parameter you pass to the constructor is a location of the main project file. Location
-			is a '/'-separated path (same path separator is used on UNIX and Windows) that is
-			resolved relative to the application classpath. The project file can be placed in the
-			root package or in a subpackage (e.g. in the code above it is in "com/example"
-			subpackage).</para>
-		<para>ServerRuntime encapsulates a single Cayenne stack. Most applications will just have one
-			ServerRuntime using it to create as many ObjectContexts as needed, access the Dependency
-			Injection (DI) container and work with other Cayenne features. Internally ServerRuntime
-			is just a thin wrapper around the DI container. Detailed features of the container are
-			discussed in "Customizing Cayenne Runtime" chapter. Here we'll just show an example of
-			how an application might replace a default implementation of a built-in Cayenne service
-			(in this case - QueryCache) with a different
-			class:<programlisting language="java">public class MyExtensionsModule implements Module {
-	public void configure(Binder binder) {
-		binder.bind(QueryCache.class).to(EhCacheQueryCache.class);
-	}	
+    version="5.0" xml:id="starting-cayenne">
+    <title>Starting Cayenne</title>
+    <section xml:id="starting-serverruntime">
+        <title>Starting and Stopping ServerRuntime</title>
+        <para>In runtime Cayenne is accessed via
+                <code>org.apache.cayenne.configuration.server.ServerRuntime</code>. ServerRuntime is
+            created simply by calling a
+            constructor:<programlisting language="java">ServerRuntime runtime =
+    new ServerRuntime("com/example/cayenne-project.xml");</programlisting></para>
+        <para>The parameter you pass to the constructor is a location of the main project file. Location
+            is a '/'-separated path (same path separator is used on UNIX and Windows) that is
+            resolved relative to the application classpath. The project file can be placed in the
+            root package or in a subpackage (e.g. in the code above it is in "com/example"
+            subpackage).</para>
+        <para>ServerRuntime encapsulates a single Cayenne stack. Most applications will just have one
+            ServerRuntime using it to create as many ObjectContexts as needed, access the Dependency
+            Injection (DI) container and work with other Cayenne features. Internally ServerRuntime
+            is just a thin wrapper around the DI container. Detailed features of the container are
+            discussed in "Customizing Cayenne Runtime" chapter. Here we'll just show an example of
+            how an application might replace a default implementation of a built-in Cayenne service
+            (in this case - QueryCache) with a different
+            class:<programlisting language="java">public class MyExtensionsModule implements Module {
+    public void configure(Binder binder) {
+        binder.bind(QueryCache.class).to(EhCacheQueryCache.class);
+    }
 }</programlisting><programlisting language="java">Module extensions = new MyExtensionsModule();
 ServerRuntime runtime = 
-	new ServerRuntime("com/example/cayenne-project.xml", extensions);</programlisting></para>
-		<para>It is a good idea to shut down the runtime when it is no longer needed, usually before the
-			application itself is shutdown: <programlisting language="java">runtime.shutdown();</programlisting>When
-			a runtime object has the same scope as the application, this may not be always
-			necessary, however in some cases it is essential, and is generally considered a good
-			practice. E.g. in a web container hot redeploy of a webapp will cause resource leaks and
-			eventual OutOfMemoryError if the application fails to shutdown CayenneRuntime.</para>
-	</section>
-	<section>
-		<title>Merging Multiple Projects</title>
-		<para>ServerRuntime requires at least one mapping project to run. But it can also take multiple
-			projects and merge them together in a single configuration. This way different parts of
-			a database can be mapped independenlty from each other (even by different software
-			providers), and combined in runtime when assembling an application. Doing it is as easy
-			as passing multiple project locations to ServerRuntime constructor:</para><programlisting language="java">ServerRuntime runtime =
-	new ServerRuntime(new String[] {
-		"com/example/cayenne-project.xml",
-		"org/foo/cayenne-library1.xml",
-		"org/foo/cayenne-library2.xml"
-	}
+    new ServerRuntime("com/example/cayenne-project.xml", extensions);</programlisting></para>
+        <para>It is a good idea to shut down the runtime when it is no longer needed, usually before the
+            application itself is shutdown: <programlisting language="java">runtime.shutdown();</programlisting>When
+            a runtime object has the same scope as the application, this may not be always
+            necessary, however in some cases it is essential, and is generally considered a good
+            practice. E.g. in a web container hot redeploy of a webapp will cause resource leaks and
+            eventual OutOfMemoryError if the application fails to shutdown CayenneRuntime.</para>
+    </section>
+    <section>
+        <title>Merging Multiple Projects</title>
+        <para>ServerRuntime requires at least one mapping project to run. But it can also take multiple
+            projects and merge them together in a single configuration. This way different parts of
+            a database can be mapped independenlty from each other (even by different software
+            providers), and combined in runtime when assembling an application. Doing it is as easy
+            as passing multiple project locations to ServerRuntime constructor:</para><programlisting language="java">ServerRuntime runtime =
+    new ServerRuntime(new String[] {
+        "com/example/cayenne-project.xml",
+        "org/foo/cayenne-library1.xml",
+        "org/foo/cayenne-library2.xml"
+    }
 );</programlisting>
-		<para>When the projects are merged, the following rules are applied:<itemizedlist>
-				<listitem>
-					<para>The order of projects matters during merge. If there are two conflicting
-						metadata objects belonging to two projects, an object from the <emphasis
-							role="italic">last</emphasis> project takes precedence over the object
-						from the first one. This makes possible to override pieces of metadata. This
-						is also similar to how DI modules are merged in Cayenne.</para>
-				</listitem>
-				<listitem>
-					<para>Runtime DataDomain name is set to the name of the last project in the
-						list.</para>
-				</listitem>
-				<listitem>
-					<para>Runtime DataDomain properties are the same as the properties of the last
-						project in the list. I.e. <emphasis role="italic">properties are not
-							merged</emphasis> to avoid invalid combinations and unexpected runtime
-						behavior.</para>
-				</listitem>
-				<listitem>
-					<para>If there are two or more DataMaps with the same name, only one DataMap is
-						used in the merged project, the rest are discarded. Same precedence rules
-						apply - DataMap from the project with the highest index in the project list
-						overrides all other DataMaps with the same name.</para>
-				</listitem>
-				<listitem>
-					<para>If there are two or more DataNodes with the same name, only one DataNodes
-						is used in the merged project, the rest are discarded. DataNode coming from
-						project with the highest index in the project list is chosen per precedence
-						rule above.</para>
-				</listitem>
-				<listitem>
-					<para>There is a notion of "default" DataNode. After the merge if any DataMaps
-						are not explicitly linked to DataNodes, their queries will be executed via a
-						default DataNode. This makes it possible to build mapping "libraries" that
-						are only associated with a specific database in runtime. If there's only one
-						DataNode in the merged project, it will be automatically chosen as default.
-						A possible way to explicitly designate a specific node as default is to
-						override <code>DataDomainProvider.createAndInitDataDomain()</code>.</para>
-				</listitem>
-			</itemizedlist></para>
-	</section>
-	<section xml:id="webapps">
-		<title>Web Applications</title>
-		<para>Web applications can use a variety of mechanisms to configure and start the "services"
-			they need, Cayenne being one of such services. Configuration can be done within standard
-			Servlet specification objects like Servlets, Filters, or ServletContextListeners, or can
-			use Spring, JEE CDI, etc. This is a user's architectural choice and Cayenne is agnostic
-			to it and will happily work in any environment. As described above, all that is needed
-			is to create an instance of ServerRuntime somewhere and provide the application code
-			with means to access it. And shut it down when the application ends to avoid container
-			leaks.</para>
-		<para>Still Cayenne includes a piece of web app configuration code that can assist in
-			quickly setting up simple Cayenne-enabled web applications. We are talking about
-			CayenneFilter. It is declared in
-			web.xml:<programlisting>&lt;web-app>
-	...
-	&lt;filter>           
-		&lt;filter-name>cayenne-project&lt;/filter-name>
-		&lt;filter-class>org.apache.cayenne.configuration.web.CayenneFilter&lt;/filter-class>
+        <para>When the projects are merged, the following rules are applied:<itemizedlist>
+                <listitem>
+                    <para>The order of projects matters during merge. If there are two conflicting
+                        metadata objects belonging to two projects, an object from the <emphasis
+                            role="italic">last</emphasis> project takes precedence over the object
+                        from the first one. This makes possible to override pieces of metadata. This
+                        is also similar to how DI modules are merged in Cayenne.</para>
+                </listitem>
+                <listitem>
+                    <para>Runtime DataDomain name is set to the name of the last project in the
+                        list.</para>
+                </listitem>
+                <listitem>
+                    <para>Runtime DataDomain properties are the same as the properties of the last
+                        project in the list. I.e. <emphasis role="italic">properties are not
+                            merged</emphasis> to avoid invalid combinations and unexpected runtime
+                        behavior.</para>
+                </listitem>
+                <listitem>
+                    <para>If there are two or more DataMaps with the same name, only one DataMap is
+                        used in the merged project, the rest are discarded. Same precedence rules
+                        apply - DataMap from the project with the highest index in the project list
+                        overrides all other DataMaps with the same name.</para>
+                </listitem>
+                <listitem>
+                    <para>If there are two or more DataNodes with the same name, only one DataNodes
+                        is used in the merged project, the rest are discarded. DataNode coming from
+                        project with the highest index in the project list is chosen per precedence
+                        rule above.</para>
+                </listitem>
+                <listitem>
+                    <para>There is a notion of "default" DataNode. After the merge if any DataMaps
+                        are not explicitly linked to DataNodes, their queries will be executed via a
+                        default DataNode. This makes it possible to build mapping "libraries" that
+                        are only associated with a specific database in runtime. If there's only one
+                        DataNode in the merged project, it will be automatically chosen as default.
+                        A possible way to explicitly designate a specific node as default is to
+                        override <code>DataDomainProvider.createAndInitDataDomain()</code>.</para>
+                </listitem>
+            </itemizedlist></para>
+    </section>
+    <section xml:id="webapps">
+        <title>Web Applications</title>
+        <para>Web applications can use a variety of mechanisms to configure and start the "services"
+            they need, Cayenne being one of such services. Configuration can be done within standard
+            Servlet specification objects like Servlets, Filters, or ServletContextListeners, or can
+            use Spring, JEE CDI, etc. This is a user's architectural choice and Cayenne is agnostic
+            to it and will happily work in any environment. As described above, all that is needed
+            is to create an instance of ServerRuntime somewhere and provide the application code
+            with means to access it. And shut it down when the application ends to avoid container
+            leaks.</para>
+        <para>Still Cayenne includes a piece of web app configuration code that can assist in
+            quickly setting up simple Cayenne-enabled web applications. We are talking about
+            CayenneFilter. It is declared in
+            web.xml:<programlisting>&lt;web-app>
+    ...
+    &lt;filter>
+        &lt;filter-name>cayenne-project&lt;/filter-name>
+        &lt;filter-class>org.apache.cayenne.configuration.web.CayenneFilter&lt;/filter-class>
     &lt;/filter>
      &lt;filter-mapping>
         &lt;filter-name>cayenne-project&lt;/filter-name>
         &lt;url-pattern>/*&lt;/url-pattern>
      &lt;/filter-mapping>
-	...
+    ...
  &lt;/web-app>       </programlisting></para>
-		<para>When started by the web container, it creates a instance of ServerRuntime and stores
-			it in the ServletContext. Note that the name of Cayenne XML project file is derived from
-			the "filter-name". In the example above CayenneFilter will look for an XML file
-			"cayenne-project.xml". This can be overridden with "configuration-location" init
-			parameter.</para>
-		<para>When the application runs, all HTTP requests matching the filter url-pattern will have
-			access to a session-scoped ObjectContext like
-			this:<programlisting language="java">ObjectContext context = BaseContext.getThreadObjectContext();</programlisting>Of
-			course the ObjectContext scope, and other behavior of the Cayenne runtime can be
-			customized via dependency injection. For this another filter init parameter called
-			"extra-modules" is used. "extra-modules" is a comma or space-separated list of class
-			names, with each class implementing Module interface. These optional custom modules are
-			loaded after the the standard ones, which allows users to override all standard
-			definitions.</para>
-		<para>For those interested in the DI container contents of the runtime created by CayenneFilter,
-			it is the same ServerRuntime as would've been created by other means, but with an extra
-				<code>org.apache.cayenne.configuration.web.WebModule</code> module that provides
-				<code>org.apache.cayenne.configuration.web.RequestHandler</code> service. This is
-			the service to override in the custom modules if you need to provide a different
-			ObjectContext scope, etc.</para>
-		<para>
-			<note>
-				<para>You should not think of CayenneFilter as the only way to start and use Cayenne in a web
-					application. In fact CayenneFilter is entirely optional. Use it if you don't
-					have any special design for application service management. If you do, simply
-					integrate Cayenne into that design.</para>
-			</note>
-		</para>
-	</section>
+        <para>When started by the web container, it creates a instance of ServerRuntime and stores
+            it in the ServletContext. Note that the name of Cayenne XML project file is derived from
+            the "filter-name". In the example above CayenneFilter will look for an XML file
+            "cayenne-project.xml". This can be overridden with "configuration-location" init
+            parameter.</para>
+        <para>When the application runs, all HTTP requests matching the filter url-pattern will have
+            access to a session-scoped ObjectContext like
+            this:<programlisting language="java">ObjectContext context = BaseContext.getThreadObjectContext();</programlisting>Of
+            course the ObjectContext scope, and other behavior of the Cayenne runtime can be
+            customized via dependency injection. For this another filter init parameter called
+            "extra-modules" is used. "extra-modules" is a comma or space-separated list of class
+            names, with each class implementing Module interface. These optional custom modules are
+            loaded after the the standard ones, which allows users to override all standard
+            definitions.</para>
+        <para>For those interested in the DI container contents of the runtime created by CayenneFilter,
+            it is the same ServerRuntime as would've been created by other means, but with an extra
+                <code>org.apache.cayenne.configuration.web.WebModule</code> module that provides
+                <code>org.apache.cayenne.configuration.web.RequestHandler</code> service. This is
+            the service to override in the custom modules if you need to provide a different
+            ObjectContext scope, etc.</para>
+        <para>
+            <note>
+                <para>You should not think of CayenneFilter as the only way to start and use Cayenne in a web
+                    application. In fact CayenneFilter is entirely optional. Use it if you don't
+                    have any special design for application service management. If you do, simply
+                    integrate Cayenne into that design.</para>
+            </note>
+        </para>
+    </section>
 </chapter>

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/authentification.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/authentification.xml?rev=1425988&r1=1425987&r2=1425988&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/authentification.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/authentification.xml Wed Dec 26 18:38:17 2012
@@ -26,7 +26,7 @@
     &lt;auth-method&gt;BASIC&lt;/auth-method&gt;
     &lt;realm-name&gt;Cayenne Realm&lt;/realm-name&gt;
 &lt;/login-config&gt;
-	
+
 &lt;security-role&gt;
     &lt;role-name&gt;cayenne-service-user&lt;/role-name&gt;
 &lt;/security-role&gt;</programlisting>
@@ -54,20 +54,20 @@
         <para>Open pom.xml in the server project and configure a "userRealm" for the Jetty
             plugin:</para>
         <programlisting>&lt;plugin&gt;
-	&lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
-		&lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt;
-		&lt;version&gt;6.1.22&lt;/version&gt;
-		&lt;!-- adding configuration below: --&gt;
-		&lt;configuration&gt;
-			&lt;userRealms&gt;
-				&lt;userRealm implementation="org.mortbay.jetty.security.HashUserRealm"&gt;
-					&lt;!-- this name must match the realm-name in web.xml --&gt;
-					&lt;name&gt;Cayenne Realm&lt;/name&gt;
-					&lt;config&gt;realm.properties&lt;/config&gt;
-				&lt;/userRealm&gt;
-			&lt;/userRealms&gt;
-		&lt;/configuration&gt;
-	&lt;/plugin&gt;
+    &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
+        &lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt;
+        &lt;version&gt;6.1.22&lt;/version&gt;
+        &lt;!-- adding configuration below: --&gt;
+        &lt;configuration&gt;
+            &lt;userRealms&gt;
+                &lt;userRealm implementation="org.mortbay.jetty.security.HashUserRealm"&gt;
+                    &lt;!-- this name must match the realm-name in web.xml --&gt;
+                    &lt;name&gt;Cayenne Realm&lt;/name&gt;
+                    &lt;config&gt;realm.properties&lt;/config&gt;
+                &lt;/userRealm&gt;
+            &lt;/userRealms&gt;
+        &lt;/configuration&gt;
+    &lt;/plugin&gt;
 &lt;/plugins&gt;</programlisting>
         <para>Now create a new file called {["realm.properties"}} <emphasis role="italic">at the
                 root of the server project</emphasis> and put user login/password in there:</para>
@@ -89,30 +89,30 @@ org.apache.cayenne.remote.hessian.Hessia
 INFO: Error establishing remote session. URL - http://localhost:8080/tutorial/cayenne-service; 
       CAUSE - cannot retry due to server authentication, in streaming mode
 java.net.HttpRetryException: cannot retry due to server authentication, in streaming mode
-	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1257)
-	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
-	at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:168)
-	at $Proxy0.establishSession(Unknown Source)
-	at org.apache.cayenne.remote.hessian.HessianConnection.connect(HessianConnection.java:210)
-	at org.apache.cayenne.remote.hessian.HessianConnection.getServerEventBridge(HessianConnection.java:114)
-	at org.apache.cayenne.remote.ClientChannel.setupRemoteChannelListener(ClientChannel.java:337)
-	at org.apache.cayenne.remote.ClientChannel.&lt;init>(ClientChannel.java:108)
-	at org.example.cayenne.Main.main(Main.java:25)
+    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1257)
+    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
+    at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:168)
+    at $Proxy0.establishSession(Unknown Source)
+    at org.apache.cayenne.remote.hessian.HessianConnection.connect(HessianConnection.java:210)
+    at org.apache.cayenne.remote.hessian.HessianConnection.getServerEventBridge(HessianConnection.java:114)
+    at org.apache.cayenne.remote.ClientChannel.setupRemoteChannelListener(ClientChannel.java:337)
+    at org.apache.cayenne.remote.ClientChannel.&lt;init>(ClientChannel.java:108)
+    at org.example.cayenne.Main.main(Main.java:25)
 Exception in thread "main" org.apache.cayenne.CayenneRuntimeException: [v.3.1M3 Sep 19 2011 07:12:41] 
 Error establishing remote session. URL - http://localhost:8080/tutorial/cayenne-service; 
 CAUSE - cannot retry due to server authentication, in streaming mode
-	at org.apache.cayenne.remote.hessian.HessianConnection.connect(HessianConnection.java:229)
-	at org.apache.cayenne.remote.hessian.HessianConnection.getServerEventBridge(HessianConnection.java:114)
-	at org.apache.cayenne.remote.ClientChannel.setupRemoteChannelListener(ClientChannel.java:337)
-	at org.apache.cayenne.remote.ClientChannel.&lt;init>(ClientChannel.java:108)
-	at org.example.cayenne.Main.main(Main.java:25)
+    at org.apache.cayenne.remote.hessian.HessianConnection.connect(HessianConnection.java:229)
+    at org.apache.cayenne.remote.hessian.HessianConnection.getServerEventBridge(HessianConnection.java:114)
+    at org.apache.cayenne.remote.ClientChannel.setupRemoteChannelListener(ClientChannel.java:337)
+    at org.apache.cayenne.remote.ClientChannel.&lt;init>(ClientChannel.java:108)
+    at org.example.cayenne.Main.main(Main.java:25)
 Caused by: java.net.HttpRetryException: cannot retry due to server authentication, in streaming mode
-	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1257)
-	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
-	at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:168)
-	at $Proxy0.establishSession(Unknown Source)
-	at org.apache.cayenne.remote.hessian.HessianConnection.connect(HessianConnection.java:210)
-	... 4 more</programlisting>
+    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1257)
+    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
+    at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:168)
+    at $Proxy0.establishSession(Unknown Source)
+    at org.apache.cayenne.remote.hessian.HessianConnection.connect(HessianConnection.java:210)
+    ... 4 more</programlisting>
         <para>Which is exactly what you'd expect, as the client is not authenticating itself. So
             change the line in Main.java where we obtained an ROP connection to this:</para>
         <programlisting language="java">ClientConnection connection = new HessianConnection(

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/web-service.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/web-service.xml?rev=1425988&r1=1425987&r2=1425988&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/web-service.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/web-service.xml Wed Dec 26 18:38:17 2012
@@ -7,36 +7,36 @@
         <para>Now lets get back to the "tutorial" project that contains a web application and set up
             dependencies. The only extra one that we don't have yet is resin-hessian.jar, just like
             the client, so let's add it (and the caucho repo declaration) to the pom.xml.</para>
-        <programlisting>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 	
+        <programlisting>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
-	...
-	&lt;dependencies&gt;
-		...
-		&lt;dependency&gt;
-			&lt;groupId&gt;com.caucho&lt;/groupId&gt;
-			&lt;artifactId&gt;resin-hessian&lt;/artifactId&gt;
-			&lt;version&gt;3.1.6&lt;/version&gt;
-		&lt;/dependency&gt;
-	&lt;/dependencies&gt;
+    ...
+    &lt;dependencies&gt;
+        ...
+        &lt;dependency&gt;
+            &lt;groupId&gt;com.caucho&lt;/groupId&gt;
+            &lt;artifactId&gt;resin-hessian&lt;/artifactId&gt;
+            &lt;version&gt;3.1.6&lt;/version&gt;
+        &lt;/dependency&gt;
+    &lt;/dependencies&gt;
 
-	&lt;build&gt;
-	...
-	&lt;/build&gt;
-	
-	&lt;repositories&gt;
-		&lt;repository&gt;
-			&lt;id&gt;caucho&lt;/id&gt;
-			&lt;name&gt;Caucho Repository&lt;/name&gt;
-			&lt;url&gt;http://caucho.com/m2&lt;/url&gt;
-			&lt;layout&gt;default&lt;/layout&gt;
-			&lt;snapshots&gt;
-				&lt;enabled&gt;false&lt;/enabled&gt;
-			&lt;/snapshots&gt;
-			&lt;releases&gt;
-				&lt;enabled&gt;true&lt;/enabled&gt;
-			&lt;/releases&gt;
-		&lt;/repository&gt;
-	&lt;/repositories&gt;
+    &lt;build&gt;
+    ...
+    &lt;/build&gt;
+
+    &lt;repositories&gt;
+        &lt;repository&gt;
+            &lt;id&gt;caucho&lt;/id&gt;
+            &lt;name&gt;Caucho Repository&lt;/name&gt;
+            &lt;url&gt;http://caucho.com/m2&lt;/url&gt;
+            &lt;layout&gt;default&lt;/layout&gt;
+            &lt;snapshots&gt;
+                &lt;enabled&gt;false&lt;/enabled&gt;
+            &lt;/snapshots&gt;
+            &lt;releases&gt;
+                &lt;enabled&gt;true&lt;/enabled&gt;
+            &lt;/releases&gt;
+        &lt;/repository&gt;
+    &lt;/repositories&gt;
 &lt;/project&gt;</programlisting>
         <informaltable class="noteMacro" border="1">
             <col width="4%"/>
@@ -77,16 +77,16 @@
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
 &lt;web-app>
-	&lt;display-name>Cayenne Tutorial&lt;/display-name>
-	&lt;servlet>
-		&lt;servlet-name>cayenne-project&lt;/servlet-name>
-		&lt;servlet-class>org.apache.cayenne.configuration.rop.server.ROPHessianServlet&lt;/servlet-class>
+    &lt;display-name>Cayenne Tutorial&lt;/display-name>
+    &lt;servlet>
+        &lt;servlet-name>cayenne-project&lt;/servlet-name>
+        &lt;servlet-class>org.apache.cayenne.configuration.rop.server.ROPHessianServlet&lt;/servlet-class>
         &lt;load-on-startup>0&lt;/load-on-startup>
-	&lt;/servlet>
-	&lt;servlet-mapping>
-		&lt;servlet-name>cayenne-project&lt;/servlet-name>
-		&lt;url-pattern>/cayenne-service&lt;/url-pattern>
-	&lt;/servlet-mapping>
+    &lt;/servlet>
+    &lt;servlet-mapping>
+        &lt;servlet-name>cayenne-project&lt;/servlet-name>
+        &lt;url-pattern>/cayenne-service&lt;/url-pattern>
+    &lt;/servlet-mapping>
 &lt;/web-app></programlisting>
         <informaltable class="noteMacro" border="1">
             <col width="4%"/>
@@ -130,9 +130,9 @@ INFO::Started SelectChannelConnector@0.0
 INFO: Loading XML configuration resource from file:cayenne-project.xml
 INFO: loading user name and password.
 INFO: Created connection pool: jdbc:derby:memory:testdb;create=true
-	Driver class: org.apache.derby.jdbc.EmbeddedDriver
-	Min. connections in the pool: 1
-	Max. connections in the pool: 1</programlisting>
+    Driver class: org.apache.derby.jdbc.EmbeddedDriver
+    Min. connections in the pool: 1
+    Max. connections in the pool: 1</programlisting>
         <para>Cayenne ROP service URL is <emphasis role="italic"
                 >http://localhost:8080/tutorial/cayenne-service</emphasis>. If you click on it, you
             will see "Hessian Requires POST" message, that means that the service is alive, but you

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/java-classes.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/java-classes.xml?rev=1425988&r1=1425987&r2=1425988&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/java-classes.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/java-classes.xml Wed Dec 26 18:38:17 2012
@@ -38,21 +38,21 @@
             This is because our project does not include Cayenne as a Maven dependency yet. Let's
             fix it now by adding "cayenne-server" artifact in the bottom of the pom.xml file. The
             resulting POM should look like
-            this:<programlisting>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 	
+            this:<programlisting>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
-	&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
-	&lt;groupId&gt;org.example.cayenne&lt;/groupId&gt;
-	&lt;artifactId&gt;tutorial&lt;/artifactId&gt;
-	&lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
+    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
+    &lt;groupId&gt;org.example.cayenne&lt;/groupId&gt;
+    &lt;artifactId&gt;tutorial&lt;/artifactId&gt;
+    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
 
-	&lt;dependencies&gt;
-		&lt;dependency&gt;
-			&lt;groupId&gt;org.apache.cayenne&lt;/groupId&gt;
-			&lt;artifactId&gt;cayenne-server&lt;/artifactId&gt;
+    &lt;dependencies&gt;
+        &lt;dependency&gt;
+            &lt;groupId&gt;org.apache.cayenne&lt;/groupId&gt;
+            &lt;artifactId&gt;cayenne-server&lt;/artifactId&gt;
    &lt;!-- Here specify the version of Cayenne you are actually using --&gt;
-			&lt;version&gt;3.1M3&lt;/version&gt;
-		&lt;/dependency&gt;
-	&lt;/dependencies&gt;
+            &lt;version&gt;3.1M3&lt;/version&gt;
+        &lt;/dependency&gt;
+    &lt;/dependencies&gt;
 &lt;/project&gt;</programlisting></para>
         <para>Your computer must be connected to the internet. Once you save the pom.xml, Eclipse
             will download the needed Cayenne jar file and add it to the project build path. As a

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/object-context.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/object-context.xml?rev=1425988&r1=1425987&r2=1425988&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/object-context.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/object-context.xml Wed Dec 26 18:38:17 2012
@@ -66,9 +66,9 @@ public class Main {
                 started:<programlisting>INFO: Loading XML configuration resource from file:cayenne-project.xml
 INFO: loading user name and password.
 INFO: Created connection pool: jdbc:derby:memory:testdb;create=true
-	Driver class: org.apache.derby.jdbc.EmbeddedDriver
-	Min. connections in the pool: 1
-	Max. connections in the pool: 1</programlisting><informaltable
+    Driver class: org.apache.derby.jdbc.EmbeddedDriver
+    Min. connections in the pool: 1
+    Max. connections in the pool: 1</programlisting><informaltable
                 border="1">
                 <col width="4%"/>
                 <col width="96%"/>

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/persistent-objects.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/persistent-objects.xml?rev=1425988&r1=1425987&r2=1425988&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/persistent-objects.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/persistent-objects.xml Wed Dec 26 18:38:17 2012
@@ -91,8 +91,8 @@ stein.setGallery(metropolitan);</program
 INFO: Loading XML configuration resource from file:cayenne-project.xml
 ... 
 INFO: Opening connection: jdbc:derby:memory:testdb;create=true
-	Login: null
-	Password: *******
+    Login: null
+    Password: *******
 INFO: +++ Connecting: SUCCESS.
 INFO: Detected and installed adapter: org.apache.cayenne.dba.derby.DerbyAdapter
 INFO: --- transaction started.

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/webapp.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/webapp.xml?rev=1425988&r1=1425987&r2=1425988&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/webapp.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/webapp.xml Wed Dec 26 18:38:17 2012
@@ -98,7 +98,7 @@
             } %&gt;
         &lt;hr&gt;
         &lt;p&gt;&lt;a href="detail.jsp"&gt;Create new artist...&lt;/a&gt;&lt;/p&gt;
-    &lt;/body&gt;	
+    &lt;/body&gt;
 &lt;/html&gt; </programlisting></para>
             </listitem>
             <listitem>
@@ -170,7 +170,7 @@
                 &lt;/tr&gt;  
             &lt;/table&gt;
         &lt;/form&gt;
-    &lt;/body&gt;	
+    &lt;/body&gt;
 &lt;/html&gt;</programlisting></para>
             </listitem>
         </itemizedlist>
@@ -243,12 +243,12 @@ INFO::Started SelectChannelConnector@0.0
         <programlisting>INFO: Loading XML configuration resource from file:/.../tutorial/target/classes/cayenne-project.xml
 INFO: loading user name and password.
 INFO: Created connection pool: jdbc:derby:memory:testdb;create=true
-	Driver class: org.apache.derby.jdbc.EmbeddedDriver
-	Min. connections in the pool: 1
-	Max. connections in the pool: 1
+    Driver class: org.apache.derby.jdbc.EmbeddedDriver
+    Min. connections in the pool: 1
+    Max. connections in the pool: 1
 INFO: Opening connection: jdbc:derby:memory:testdb;create=true
-	Login: null
-	Password: *******
+    Login: null
+    Password: *******
 INFO: +++ Connecting: SUCCESS.
 INFO: Detected and installed adapter: org.apache.cayenne.dba.derby.DerbyAdapter
 INFO: --- transaction started.

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/common-customizations.xsl
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/common-customizations.xsl?rev=1425988&r1=1425987&r2=1425988&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/common-customizations.xsl (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/common-customizations.xsl Wed Dec 26 18:38:17 2012
@@ -20,15 +20,13 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 
 	<!-- The next line is needed to work with maven injecting the docbook stylesheets -->
-	<xsl:import href="urn:docbkx:stylesheet" />
+	<!---->
 	<!-- <xsl:import href="urn:docbkx:stylesheet/highlight.xsl"/> -->
 
-    <xsl:import href="highlight.xsl" />
-
 	<xsl:param name="keep.relative.image.uris" select="1"/>
 	<xsl:param name="toc.section.depth">1</xsl:param>
 
 	<!-- disable TOC for each part -->
-	<xsl:template name="generate.part.toc"></xsl:template>
+	<xsl:template name="generate.part.toc" />
 
 </xsl:stylesheet>

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/html.xsl
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/html.xsl?rev=1425988&r1=1425987&r2=1425988&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/html.xsl (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/html.xsl Wed Dec 26 18:38:17 2012
@@ -18,10 +18,10 @@
 	under the License.
 -->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-
         version="1.0">
-    <!--  xmlns:xslthl="http://xslthl.sf.net"
-        exclude-result-prefixes="xslthl" -->
+
+    <xsl:import href="urn:docbkx:stylesheet" />
+    <xsl:import href="highlight.xsl" />
     <xsl:include href="common-customizations.xsl"/>
 
     <!--<xsl:param name="highlight.source" select="1"/>-->
@@ -38,6 +38,4 @@
 
     <xsl:param name="use.id.as.filename">1</xsl:param>
 
-
-
 </xsl:stylesheet>

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/pdf.xsl
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/pdf.xsl?rev=1425988&r1=1425987&r2=1425988&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/pdf.xsl (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/pdf.xsl Wed Dec 26 18:38:17 2012
@@ -1,115 +1,502 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <!--
-	Licensed to the Apache Software Foundation (ASF) under one
-	or more contributor license agreements.  See the NOTICE file
-	distributed with this work for additional information
-	regarding copyright ownership.  The ASF licenses this file
-	to you 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.   
+    This is the XSL FO (PDF) stylesheet for the Cayenne documentation.
 -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-	<xsl:include href="common-customizations.xsl"/>
-
-	<xsl:param name="paper.type">A4</xsl:param>
-
-	<!-- don't indent the body text -->
-	<xsl:param name="body.start.indent">0pt</xsl:param>
-
-	<!-- print headers and footers mirrored so double sided printing works -->
-	<xsl:param name="fop1.extensions" select="1"/>
-	<xsl:param name="double.sided" select="1"/>
-
-	<xsl:param name="admon.graphics" select="0"/>
-	<xsl:param name="admon.graphics.extension">.png</xsl:param>
-	<xsl:param name="admon.graphics.path">stylesheets/docbook-xsl-ns/images/</xsl:param>
-	<xsl:param name="admon.textlabel" select="1"/>
-
-	<xsl:param name="callout.graphics" select="1"/>
-	<xsl:param name="callout.graphics.extension">.png</xsl:param>
-	<xsl:param name="callout.graphics.path">stylesheets/docbook-xsl-ns/images/callouts/</xsl:param>
-
-	<xsl:param name="footer.rule">0</xsl:param>
-
-	<!-- Separation between glossary terms and descriptions when glossaries are presented using lists. -->
-	<xsl:param name="glossterm.separation">2em</xsl:param>
-
-	<!-- This parameter specifies the width reserved for glossary terms when a list presentation is used.  -->
-	<xsl:param name="glossterm.width">10em</xsl:param>
-
-	<!--  Specifies the longest term in variablelists. In variablelists, the listitem is indented to leave room for the term elements. The indent may be computed if it is not specified with a termlength attribute on the variablelist element. The computation counts characters in the term elements in the list to find the longest term. However, some terms are very long and would produce extreme indents. This parameter lets you set a maximum character count. Any terms longer than the maximum would line wrap. The default value is 24. The character counts are converted to physical widths by multiplying by 0.50em. There is some variability in how many characters fit in the space since some characters are wider than others. -->
-	<xsl:param name="variablelist.max.termlength">18</xsl:param>
-
-	<!-- Custom font settings - preferred truetype font -->
-	<xsl:param name="title.font.family">Lucinda Grande,sans-serif</xsl:param>
-	<xsl:param name="body.font.family">Times,serif</xsl:param>
-	<xsl:param name="sans.font.family">Lucinda Grande,sans-serif</xsl:param>
-	<xsl:param name="dingbat.font.family">Lucinda Grande,serif</xsl:param>
-	<xsl:param name="monospace.font.family">monospace</xsl:param>
-
-	<!-- Specify the default text alignment. The default text alignment is used for most body text. -->
-	<xsl:param name="alignment">left</xsl:param>
-
-
-	<!--  Specifies the default point size for body text. The body font size is specified in two parameters (body.font.master and body.font.size) so that math can be performed on the font size by XSLT. -->
-	<xsl:param name="body.font.master">11</xsl:param>
-
-	<xsl:param name="hyphenate">false</xsl:param>
-
-	<!-- "normal" is 1.6. This value is multiplied by the font size -->
-	<xsl:param name="line-height">1.5</xsl:param>
-
-	<!--  Specify the spacing required between normal paragraphs. -->
-	<xsl:attribute-set name="normal.para.spacing">
-		<xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
-		<xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
-		<xsl:attribute name="space-before.maximum">1.0em</xsl:attribute>
-	</xsl:attribute-set>
-
-	<!--  Tables, examples, figures, and equations don't need to be forced onto onto one page without page breaks. -->
-	<xsl:attribute-set name="formal.object.properties">
-		<xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
-	</xsl:attribute-set>
-
-	<!-- The body bottom margin is the distance from the last line of text in the page body to the bottom of the region-after. -->
-	<xsl:param name="body.margin.bottom">20mm</xsl:param>
-
-	<!-- The body top margin is the distance from the top of the region-before to the first line of text in the page body. -->
-	<xsl:param name="body.margin.top">20mm</xsl:param>
-
-	<!-- The top page margin is the distance from the physical top of the page to the top of the region-before. -->
-	<xsl:param name="page.margin.top">10mm</xsl:param>
-
-	<!-- The bottom page margin is the distance from the bottom of the region-after to the physical bottom of the page. -->
-	<xsl:param name="page.margin.bottom">10mm</xsl:param>
-
-	<!-- The inner page margin. The inner page margin is the distance from binding edge of the page to the first column of text. In the left-to-right, top-to-bottom writing direction, this is the left margin of recto pages. The inner and outer margins are usually the same unless the output is double-sided. -->
-	<xsl:param name="page.margin.inner">25mm</xsl:param>
-
-	<!-- The outer page margin. The outer page margin is the distance from non-binding edge of the page to the last column of text. In the left-to-right, top-to-bottom writing direction, this is the right margin of recto pages. The inner and outer margins are usually the same unless the output is double-sided. -->
-	<xsl:param name="page.margin.outer">15mm</xsl:param>
-
-	<!-- Make hyperlinks blue and don't display the underlying URL -->
-	<xsl:param name="ulink.show" select="0" />
-
-	<xsl:attribute-set name="xref.properties">
-		<xsl:attribute name="color">blue</xsl:attribute>
-	</xsl:attribute-set>
-
-	<xsl:attribute-set name="monospace.verbatim.properties">
-		<xsl:attribute name="font-size">7pt</xsl:attribute>
-	</xsl:attribute-set>
-	
-	<xsl:param name="img.src.path">../</xsl:param>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:d="http://docbook.org/ns/docbook"
+                version="1.0">
+
+    <xsl:import href="urn:docbkx:stylesheet"/>
+    <xsl:include href="common-customizations.xsl"/>
+
+    <xsl:template name="border">
+        <xsl:param name="side" select="'start'"/>
+
+        <xsl:attribute name="border-{$side}-width">
+            <xsl:value-of select="$table.cell.border.thickness"/>
+        </xsl:attribute>
+        <xsl:attribute name="border-{$side}-style">
+            <xsl:value-of select="$table.cell.border.style"/>
+        </xsl:attribute>
+        <xsl:attribute name="border-{$side}-color">
+            <xsl:value-of select="$table.cell.border.color"/>
+        </xsl:attribute>
+        <xsl:attribute name="my-attr">
+            <xsl:value-of select="'1'"/>
+        </xsl:attribute>
+    </xsl:template>
+
+    <!-- don't indent the body text -->
+    <xsl:param name="body.start.indent">0pt</xsl:param>
+
+    <!-- print headers and footers mirrored so double sided printing works -->
+    <!--<xsl:param name="fop1.extensions" select="1"/>-->
+    <xsl:param name="double.sided" select="0"/>
+
+    <xsl:param name="admon.graphics" select="0"/>
+    <xsl:param name="admon.graphics.extension">.png</xsl:param>
+    <xsl:param name="admon.graphics.path">stylesheets/docbook-xsl-ns/images/</xsl:param>
+    <xsl:param name="admon.textlabel" select="1"/>
+
+    <xsl:param name="callout.graphics" select="1"/>
+    <xsl:param name="callout.graphics.extension">.png</xsl:param>
+    <xsl:param name="callout.graphics.path">stylesheets/docbook-xsl-ns/images/callouts/</xsl:param>
+
+    <xsl:param name="footer.rule">0</xsl:param>
+
+    <!-- Separation between glossary terms and descriptions when glossaries are presented using lists. -->
+    <xsl:param name="glossterm.separation">2em</xsl:param>
+
+    <!-- This parameter specifies the width reserved for glossary terms when a list presentation is used.  -->
+    <xsl:param name="glossterm.width">10em</xsl:param>
+
+    <!--  Specifies the longest term in variablelists. In variablelists, the listitem is indented to leave room for the term elements. The indent may be computed if it is not specified with a termlength attribute on the variablelist element. The computation counts characters in the term elements in the list to find the longest term. However, some terms are very long and would produce extreme indents. This parameter lets you set a maximum character count. Any terms longer than the maximum would line wrap. The default value is 24. The character counts are converted to physical widths by multiplying by 0.50em. There is some variability in how many characters fit in the space since some characters are wider than others. -->
+    <xsl:param name="variablelist.max.termlength">18</xsl:param>
+
+    <!-- Custom font settings - preferred truetype font -->
+    <xsl:param name="title.font.family">Lucinda Grande,sans-serif</xsl:param>
+    <xsl:param name="body.font.family">Times,serif</xsl:param>
+    <xsl:param name="sans.font.family">Lucinda Grande,sans-serif</xsl:param>
+    <xsl:param name="dingbat.font.family">Lucinda Grande,serif</xsl:param>
+    <xsl:param name="monospace.font.family">monospace</xsl:param>
+
+    <!-- Specify the default text alignment. The default text alignment is used for most body text. -->
+    <xsl:param name="alignment">justify</xsl:param>
+
+    <!--  Specifies the default point size for body text. The body font size is specified in two parameters (body.font.master and body.font.size) so that math can be performed on the font size by XSLT. -->
+    <xsl:param name="body.font.master">11</xsl:param>
+
+    <xsl:param name="hyphenate">true</xsl:param>
+
+    <!-- "normal" is 1.6. This value is multiplied by the font size -->
+    <xsl:param name="line-height">1.5</xsl:param>
+
+    <!--  Specify the spacing required between normal paragraphs. -->
+    <xsl:attribute-set name="normal.para.spacing">
+        <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
+        <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
+        <xsl:attribute name="space-before.maximum">1.0em</xsl:attribute>
+    </xsl:attribute-set>
+
+    <!--  Tables, examples, figures, and equations don't need to be forced onto onto one page without page breaks. -->
+    <xsl:attribute-set name="formal.object.properties">
+        <xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
+    </xsl:attribute-set>
+
+    <!-- The body bottom margin is the distance from the last line of text in the page body to the bottom of the region-after. -->
+    <xsl:param name="body.margin.bottom">20mm</xsl:param>
+
+    <!-- The body top margin is the distance from the top of the region-before to the first line of text in the page body. -->
+    <xsl:param name="body.margin.top">20mm</xsl:param>
+
+    <!-- The top page margin is the distance from the physical top of the page to the top of the region-before. -->
+    <xsl:param name="page.margin.top">10mm</xsl:param>
+
+    <!-- The bottom page margin is the distance from the bottom of the region-after to the physical bottom of the page. -->
+    <xsl:param name="page.margin.bottom">10mm</xsl:param>
+
+    <!-- The inner page margin. The inner page margin is the distance from binding edge of the page to the first column of text. In the left-to-right, top-to-bottom writing direction, this is the left margin of recto pages. The inner and outer margins are usually the same unless the output is double-sided. -->
+    <xsl:param name="page.margin.inner">18mm</xsl:param>
+
+    <!-- The outer page margin. The outer page margin is the distance from non-binding edge of the page to the last column of text. In the left-to-right, top-to-bottom writing direction, this is the right margin of recto pages. The inner and outer margins are usually the same unless the output is double-sided. -->
+    <xsl:param name="page.margin.outer">18mm</xsl:param>
+
+    <!-- Make hyperlinks blue and don't display the underlying URL -->
+    <xsl:param name="ulink.show" select="0"/>
+
+    <xsl:attribute-set name="xref.properties">
+        <xsl:attribute name="color">blue</xsl:attribute>
+    </xsl:attribute-set>
+
+    <xsl:param name="img.src.path">../</xsl:param>
+
+    <!-- Prevent blank pages in output -->
+    <xsl:template name="book.titlepage.before.verso">
+    </xsl:template>
+    <xsl:template name="book.titlepage.verso">
+    </xsl:template>
+    <xsl:template name="book.titlepage.separator">
+    </xsl:template>
+
+    <!--###################################################
+                     Header
+   ################################################### -->
+
+    <!-- More space in the center header for long text -->
+    <xsl:attribute-set name="header.content.properties">
+        <xsl:attribute name="font-family">
+            <xsl:value-of select="$body.font.family"/>
+        </xsl:attribute>
+        <xsl:attribute name="margin-left">-5em</xsl:attribute>
+        <xsl:attribute name="margin-right">-5em</xsl:attribute>
+    </xsl:attribute-set>
+
+    <!--###################################################
+                     Custom Footer
+   ################################################### -->
+    <xsl:template name="footer.content">
+        <xsl:param name="pageclass" select="''"/>
+        <xsl:param name="sequence" select="''"/>
+        <xsl:param name="position" select="''"/>
+        <xsl:param name="gentext-key" select="''"/>
+        <xsl:variable name="Version">
+            <xsl:if test="//releaseinfo">
+                <xsl:text>Spring-Integration (</xsl:text>
+                <xsl:value-of select="//releaseinfo"/>
+                <xsl:text>)</xsl:text>
+            </xsl:if>
+        </xsl:variable>
+        <xsl:choose>
+            <xsl:when test="$sequence='blank'">
+                <xsl:if test="$position = 'center'">
+                    <xsl:value-of select="$Version"/>
+                </xsl:if>
+            </xsl:when>
+            <!-- for double sided printing, print page numbers on alternating sides (of the page) -->
+            <xsl:when test="$double.sided != 0">
+                <xsl:choose>
+                    <xsl:when test="$sequence = 'even' and $position='left'">
+                        <fo:page-number/>
+                    </xsl:when>
+                    <xsl:when test="$sequence = 'odd' and $position='right'">
+                        <fo:page-number/>
+                    </xsl:when>
+                    <xsl:when test="$position='center'">
+                        <xsl:value-of select="$Version"/>
+                    </xsl:when>
+                </xsl:choose>
+            </xsl:when>
+            <!-- for single sided printing, print all page numbers on the right (of the page) -->
+            <xsl:when test="$double.sided = 0">
+                <xsl:choose>
+                    <xsl:when test="$position='center'">
+                        <xsl:value-of select="$Version"/>
+                    </xsl:when>
+                    <xsl:when test="$position='right'">
+                        <fo:page-number/>
+                    </xsl:when>
+                </xsl:choose>
+            </xsl:when>
+        </xsl:choose>
+    </xsl:template>
+
+    <!--###################################################
+                     Extensions
+        ################################################### -->
+
+    <!-- These extensions are required for table printing and other stuff -->
+    <xsl:param name="use.extensions">1</xsl:param>
+    <xsl:param name="tablecolumns.extension">1</xsl:param>
+    <xsl:param name="callout.extensions">1</xsl:param>
+    <!-- FOP provide only PDF Bookmarks at the moment -->
+    <xsl:param name="fop1.extensions">1</xsl:param>
+
+    <!-- ###################################################
+                     Table Of Contents
+         ################################################### -->
+
+    <!-- Generate the TOCs for named components only -->
+    <xsl:param name="generate.toc">
+        book toc
+    </xsl:param>
+
+    <!-- Show only Sections up to level 3 in the TOCs -->
+    <!--<xsl:param name="toc.section.depth">2</xsl:param>-->
+
+    <!-- Dot and Whitespace as separator in TOC between Label and Title-->
+    <xsl:param name="autotoc.label.separator" select="'.  '"/>
+
+
+    <!-- ###################################################
+                  Paper & Page Size
+         ################################################### -->
+
+    <!-- Paper type, no headers on blank pages, no double sided printing -->
+    <xsl:param name="paper.type" select="'A4'"/>
+    <!--<xsl:param name="double.sided">0</xsl:param>-->
+    <xsl:param name="headers.on.blank.pages">0</xsl:param>
+    <xsl:param name="footers.on.blank.pages">0</xsl:param>
+
+    <!-- Space between paper border and content (chaotic stuff, don't touch) -->
+    <!--<xsl:param name="page.margin.top">5mm</xsl:param>-->
+    <xsl:param name="region.before.extent">10mm</xsl:param>
+    <!--<xsl:param name="body.margin.top">10mm</xsl:param>-->
+
+    <!--<xsl:param name="body.margin.bottom">15mm</xsl:param>-->
+    <xsl:param name="region.after.extent">10mm</xsl:param>
+    <!--<xsl:param name="page.margin.bottom">0mm</xsl:param>-->
+
+    <!--<xsl:param name="page.margin.outer">18mm</xsl:param>-->
+    <!--<xsl:param name="page.margin.inner">18mm</xsl:param>-->
+
+    <!-- No intendation of Titles -->
+    <xsl:param name="title.margin.left">0pc</xsl:param>
+
+    <!-- ###################################################
+                  Fonts & Styles
+         ################################################### -->
+
+    <!-- Left aligned text and no hyphenation -->
+    <!--<xsl:param name="alignment">justify</xsl:param>-->
+    <!--<xsl:param name="hyphenate">false</xsl:param>-->
+
+    <!-- Default Font size -->
+    <!--<xsl:param name="body.font.master">11</xsl:param>-->
+    <xsl:param name="body.font.small">8</xsl:param>
+
+    <!-- ###################################################
+                  Tables
+         ################################################### -->
+
+    <!-- The table width should be adapted to the paper size -->
+    <xsl:param name="default.table.width">17.4cm</xsl:param>
+
+    <!-- Some padding inside tables -->
+    <xsl:attribute-set name="table.cell.padding">
+        <xsl:attribute name="padding-start">4pt</xsl:attribute>
+        <xsl:attribute name="padding-end">4pt</xsl:attribute>
+        <xsl:attribute name="padding-top">4pt</xsl:attribute>
+        <xsl:attribute name="padding-bottom">4pt</xsl:attribute>
+    </xsl:attribute-set>
+
+    <!-- Only hairlines as frame and cell borders in tables -->
+    <xsl:param name="default.table.frame">all</xsl:param>
+    <xsl:param name="default.table.rules">all</xsl:param>
+
+    <xsl:param name="table.frame.border.thickness">0.5pt</xsl:param>
+    <xsl:param name="table.frame.border.style">solid</xsl:param>
+    <xsl:param name="table.frame.border.color">black</xsl:param>
+    <xsl:param name="table.cell.border.thickness">0.5pt</xsl:param>
+    <xsl:param name="table.cell.border.color">black</xsl:param>
+    <xsl:param name="table.cell.border.style">solid</xsl:param>
+    <xsl:param name="border-start-style">solid</xsl:param>
+    <xsl:param name="border-end-style">solid</xsl:param>
+    <xsl:param name="border-top-style">solid</xsl:param>
+    <xsl:param name="border-bottom-style">solid</xsl:param>
+
+    <!--###################################################
+                        Labels
+   ################################################### -->
+
+    <!-- Label Chapters and Sections (numbering) -->
+    <xsl:param name="chapter.autolabel">1</xsl:param>
+    <xsl:param name="section.autolabel" select="1"/>
+    <xsl:param name="section.label.includes.component.label" select="1"/>
+
+    <!--###################################################
+                        Titles
+   ################################################### -->
+
+    <!-- Chapter title size -->
+    <xsl:attribute-set name="chapter.titlepage.recto.style">
+        <xsl:attribute name="text-align">left</xsl:attribute>
+        <xsl:attribute name="font-weight">bold</xsl:attribute>
+        <xsl:attribute name="font-size">
+            <xsl:value-of select="$body.font.master * 1.8"/>
+            <xsl:text>pt</xsl:text>
+        </xsl:attribute>
+    </xsl:attribute-set>
+
+    <!-- Why is the font-size for chapters hardcoded in the XSL FO templates?
+        Let's remove it, so this sucker can use our attribute-set only... -->
+    <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
+        <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                  xsl:use-attribute-sets="chapter.titlepage.recto.style">
+            <xsl:call-template name="component.title">
+                <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
+            </xsl:call-template>
+        </fo:block>
+    </xsl:template>
+
+    <!-- Sections 1, 2 and 3 titles have a small bump factor and padding -->
+    <xsl:attribute-set name="section.title.level1.properties">
+        <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
+        <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+        <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
+        <xsl:attribute name="font-size">
+            <xsl:value-of select="$body.font.master * 1.5"/>
+            <xsl:text>pt</xsl:text>
+        </xsl:attribute>
+        <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+    </xsl:attribute-set>
+    <xsl:attribute-set name="section.title.level2.properties">
+        <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
+        <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
+        <xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
+        <xsl:attribute name="font-size">
+            <xsl:value-of select="$body.font.master * 1.25"/>
+            <xsl:text>pt</xsl:text>
+        </xsl:attribute>
+        <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+    </xsl:attribute-set>
+    <xsl:attribute-set name="section.title.level3.properties">
+        <xsl:attribute name="space-before.optimum">0.4em</xsl:attribute>
+        <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
+        <xsl:attribute name="space-before.maximum">0.4em</xsl:attribute>
+        <xsl:attribute name="font-size">
+            <xsl:value-of select="$body.font.master * 1.0"/>
+            <xsl:text>pt</xsl:text>
+        </xsl:attribute>
+        <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+    </xsl:attribute-set>
+
+    <!-- Titles of formal objects (tables, examples, ...) -->
+    <xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing">
+        <xsl:attribute name="font-weight">bold</xsl:attribute>
+        <xsl:attribute name="font-size">
+            <xsl:value-of select="$body.font.master"/>
+            <xsl:text>pt</xsl:text>
+        </xsl:attribute>
+        <xsl:attribute name="hyphenate">false</xsl:attribute>
+        <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
+        <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
+        <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
+    </xsl:attribute-set>
+
+    <!--###################################################
+                     Programlistings
+   ################################################### -->
+
+    <!-- Verbatim text formatting (programlistings) -->
+    <xsl:attribute-set name="monospace.verbatim.properties">
+        <xsl:attribute name="font-size">
+            <xsl:value-of select="$body.font.small * 0.9"/>
+            <xsl:text>pt</xsl:text>
+        </xsl:attribute>
+    </xsl:attribute-set>
+
+    <xsl:attribute-set name="verbatim.properties">
+        <xsl:attribute name="space-before.minimum">0.9em</xsl:attribute>
+        <xsl:attribute name="space-before.optimum">0.9em</xsl:attribute>
+        <xsl:attribute name="space-before.maximum">0.9em</xsl:attribute>
+        <xsl:attribute name="border-color">#444444</xsl:attribute>
+        <xsl:attribute name="border-style">solid</xsl:attribute>
+        <xsl:attribute name="border-width">0.1pt</xsl:attribute>
+        <xsl:attribute name="padding-top">0.5em</xsl:attribute>
+        <xsl:attribute name="padding-left">0.5em</xsl:attribute>
+        <xsl:attribute name="padding-right">0.5em</xsl:attribute>
+        <xsl:attribute name="padding-bottom">0.5em</xsl:attribute>
+        <xsl:attribute name="margin-left">0.5em</xsl:attribute>
+        <xsl:attribute name="margin-right">0.5em</xsl:attribute>
+    </xsl:attribute-set>
+
+    <!-- Shade (background) programlistings -->
+    <xsl:param name="shade.verbatim">1</xsl:param>
+    <xsl:attribute-set name="shade.verbatim.style">
+        <xsl:attribute name="background-color">#F0F0F0</xsl:attribute>
+    </xsl:attribute-set>
+
+    <!--###################################################
+                        Callouts
+   ################################################### -->
+
+    <!-- Use images for callouts instead of (1) (2) (3) -->
+    <!--<xsl:param name="callout.graphics">0</xsl:param>-->
+    <!--<xsl:param name="callout.unicode">1</xsl:param>-->
+
+    <!-- Place callout marks at this column in annotated areas -->
+    <xsl:param name="callout.defaultcolumn">90</xsl:param>
+
+    <!--###################################################
+                      Admonitions
+   ################################################### -->
+
+    <!-- Use nice graphics for admonitions -->
+    <!--<xsl:param name="admon.graphics">'1'</xsl:param>-->
+    <!--  <xsl:param name="admon.graphics.path">&admon_gfx_path;</xsl:param> -->
+
+    <!--###################################################
+                         Misc
+   ################################################### -->
+
+    <!-- Placement of titles -->
+    <xsl:param name="formal.title.placement">
+        figure after
+        example before
+        equation before
+        table before
+        procedure before
+    </xsl:param>
+
+    <!-- Format Variable Lists as Blocks (prevents horizontal overflow) -->
+    <xsl:param name="variablelist.as.blocks">1</xsl:param>
+
+    <!-- The horrible list spacing problems -->
+    <xsl:attribute-set name="list.block.spacing">
+        <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
+        <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+        <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
+        <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+        <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+    </xsl:attribute-set>
+
+    <!--###################################################
+             colored and hyphenated links
+   ################################################### -->
+    <xsl:template match="ulink">
+        <fo:basic-link external-destination="{@url}"
+                       xsl:use-attribute-sets="xref.properties"
+                       text-decoration="underline"
+                       color="blue">
+            <xsl:choose>
+                <xsl:when test="count(child::node())=0">
+                    <xsl:value-of select="@url"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:apply-templates/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </fo:basic-link>
+    </xsl:template>
+
+    <xsl:template name="table.frame">
+        <xsl:variable name="frame" select="'all'" />
+
+        <xsl:attribute name="border-start-style">
+            <xsl:value-of select="$table.frame.border.style"/>
+        </xsl:attribute>
+        <xsl:attribute name="border-end-style">
+            <xsl:value-of select="$table.frame.border.style"/>
+        </xsl:attribute>
+        <xsl:attribute name="border-top-style">
+            <xsl:value-of select="$table.frame.border.style"/>
+        </xsl:attribute>
+        <xsl:attribute name="border-bottom-style">
+            <xsl:value-of select="$table.frame.border.style"/>
+        </xsl:attribute>
+        <xsl:attribute name="border-start-width">
+            <xsl:value-of select="$table.frame.border.thickness"/>
+        </xsl:attribute>
+        <xsl:attribute name="border-end-width">
+            <xsl:value-of select="$table.frame.border.thickness"/>
+        </xsl:attribute>
+        <xsl:attribute name="border-top-width">
+            <xsl:value-of select="$table.frame.border.thickness"/>
+        </xsl:attribute>
+        <xsl:attribute name="border-bottom-width">
+            <xsl:value-of select="$table.frame.border.thickness"/>
+        </xsl:attribute>
+        <xsl:attribute name="border-start-color">
+            <xsl:value-of select="$table.frame.border.color"/>
+        </xsl:attribute>
+        <xsl:attribute name="border-end-color">
+            <xsl:value-of select="$table.frame.border.color"/>
+        </xsl:attribute>
+        <xsl:attribute name="border-top-color">
+            <xsl:value-of select="$table.frame.border.color"/>
+        </xsl:attribute>
+        <xsl:attribute name="border-bottom-color">
+            <xsl:value-of select="$table.frame.border.color"/>
+        </xsl:attribute>
+    </xsl:template>
 
 </xsl:stylesheet>



Mime
View raw message