Cleaning up the servicemix-saxon documentation

git-svn-id: https://svn.apache.org/repos/asf/servicemix/documentation/trunk@950186 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/common/src/main/resources/styles/docbook-fo.xsl b/common/src/main/resources/styles/docbook-fo.xsl
index 7561146..1779a8a 100644
--- a/common/src/main/resources/styles/docbook-fo.xsl
+++ b/common/src/main/resources/styles/docbook-fo.xsl
@@ -26,6 +26,8 @@
 ]>
 <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"
+                exclude-result-prefixes="d"
                 version="1.0">
 
   <xsl:import href="urn:docbkx:stylesheet"/>
@@ -221,7 +223,7 @@
 
   <!-- 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">
+  <xsl:template match="d:title|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">
@@ -359,12 +361,14 @@
     <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
   </xsl:attribute-set>
 
+  <!-- hide the link url from the contents of the page -->  
+  <xsl:param name="ulink.show">0</xsl:param>
+
   <!--###################################################
-                colored and hyphenated links
+              colored and hyphenated links
       ################################################### -->
-  <xsl:template match="ulink">
+  <xsl:template match="d:ulink|ulink">
     <fo:basic-link external-destination="url({@url})"
-                   xsl:use-attribute-sets="xref.properties"
                    text-decoration="underline"
                    color="blue">
       <xsl:choose>
diff --git a/docs/jbi/src/confluence/servicemix-saxon.wiki b/docs/jbi/src/confluence/servicemix-saxon.wiki
index 13fad5c..ccf95de 100644
--- a/docs/jbi/src/confluence/servicemix-saxon.wiki
+++ b/docs/jbi/src/confluence/servicemix-saxon.wiki
@@ -22,14 +22,88 @@
 h2. Endpoint {{saxon:xslt}}
 
 The XSLT endpoint can be used to apply an XSLT stylesheet to the incoming exchange and will return the transformed result as the output message.
-
-Simple transformation:
 {code:lang=xml}
 <saxon:xslt service="test:xslt" endpoint="endpoint"
             resource="classpath:transform.xsl" />
 {code}
 
-Dynamic stylesheet selection:
+h3. Mandatory properties
+The endpoint requires one of these two properties to be specified:
+- {{resource}} ([Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html]) :: the spring resource pointing to the XSLT stylesheet
+- {{expression}} ([ServiceMix expression|http://incubator.apache.org/servicemix/dist/servicemix-3.0-incubating/site/servicemix-core/apidocs/org/apache/servicemix/expression/Expression.html]) :: expression used to dynamically load the stylesheet
+
+h3. Optional properties
+- {{wsdlResource}} ([Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html]) :: if set, the wsdl will be retrieved from the given Spring resource
+- {{transformerFactory}} (TransformerFactory, defaults to the Saxon implementation) :: TraX factory to create transformers
+- {{configuration}} ([Saxon configuration|http://www.saxonica.com/documentation/javadoc/net/sf/saxon/Configuration.html]) :: Saxon configuration object
+- {{result}} (String, defaults to {{dom}}) :: Allows specifying the output result type, possible values are {{dom}}, {{bytes}}, {{string}}
+- {{copyAttachments}}, {{copyProperties}} and {{copySubject}} (default to {{true}} ::  Configure to copy message attachments, properties and security subject over to the result message
+- {{useDomSourceForXslt}} (defaults to {{true}} :: when set to {{true}}, forces the transformation of the xslt stylesheet into a DOM document before giving it to the transformer
+- {{useDomSourceForContent}} (defaults to {{false}}) :: when set to {{true}}, forces the transformation of the incoming JBI message into a DOM document before giving it to the transformer
+- {{parameters}} :: a {{Map}} containing additional parameters to give to the transformation engine
+
+h3. Using properties and parameters
+All properties defined on the JBI exchange and input JBI message will be available for use inside the XSLT stylesheet as parameters.
+In addition to those properties and the one specified in the {{parameters}} property on the endpoint, the following objects are also available:
+- {{exchange}} :: the JBI exchange
+- {{in}} :: the input JBI NormalizedMessage
+- {{component}} :: the XsltEndpoint instance being called
+
+All those parameters can be accessed using XSLT standard ways using {{<xsl:param/>}}.
+
+h2. Endpoint {{saxon:proxy}}
+One common use case is the need to transform a request coming from a service and send it to another service and do the same with the response.  A simple example is the need to translate the request and responses between two SOAP endpoints.  Such a use case could be implemented using two XSLT endpoints and an EIP StaticRoutingSlip.  However, there are some drawbacks, as the operation is lost in the process, and a static routing slip can not be used to process InOnly exchanges.
+{code:lang=xml}
+<saxon:proxy service="test:proxy" endpoint="endpoint"
+             resource="classpath:transform-in.xsl"
+             outResource="classpath:transform-out.xsl"
+             faultResource="classpath:transform-fault.xsl">
+  <saxon:target>
+    <saxon:exchange-target service="test:echo" />
+  </saxon:target>
+</saxon:proxy>
+{code}
+
+h3. Mandatory properties
+Depending on the MEP, you have to set one or more XSL stylesheets to be used for converting the message payloads:
+- {{resource}} :: [Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html] pointing to the XSLT stylesheet used to transform the input message
+- {{outResource}} :: [Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html] pointing to the XSLT stylesheet used to transform the output message
+- {{faultResource}} :: [Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html] pointing to the XSLT stylesheet used to transform the fault message
+- {{expression}} :: [ServiceMix expression|http://incubator.apache.org/servicemix/dist/servicemix-3.0-incubating/site/servicemix-core/apidocs/org/apache/servicemix/expression/Expression.html] used to dynamically load the stylesheet. If set, it will prevail against all resource, outResource and faultResource attributes
+
+You also have to specify the target service that should be invoked from this endpoint:
+- {{target}} :: ExchangeTarget that specifies the target service for the proxy endpoint
+
+h3. Optional properties
+- {{wsdlResource}} :: if set, the wsdl will be retrieved from the given ([Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html])
+- {{transformerFactory}} (defaults to the Saxon implementation) :: TraX TransformerFactory to create transformers
+- {{configuration}} ([Saxon configuration|http://www.saxonica.com/documentation/javadoc/net/sf/saxon/Configuration.html]) :: Saxon configuration object
+- {{result}} (defaults to {{dom}}) :: Allows specifying the output result type, possible values are {{dom}}, {{bytes}}, {{string}}
+- {{copyAttachments}}, {{copyProperties}} and {{copySubject}} (default to {{true}}) ::  Configure to copy message attachments, properties and security subject over to the result message
+
+h2. Endpoint {{saxon:xquery}}
+The XQuery endpoint can be used to apply a selected XQuery to the input document.
+{code:lang=xml}
+<saxon:xquery service="test:xquery" endpoint="endpoint"
+              resource="classpath:query.xq" />
+{code}
+
+h3. Mandatory properties
+You need to specify one of {{query}}, {{resource}} or {{expression}}
+- {{query}} :: String containing the inlined XQuery expression
+- {{resource}} :: [Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html] resource pointing to the XQuery
+- {{expression}} :: | [ServiceMix expression|http://incubator.apache.org/servicemix/dist/servicemix-3.0-incubating/site/servicemix-core/apidocs/org/apache/servicemix/expression/Expression.html]  to dynamically load the xquery
+
+h3. Optional properties
+- {{wsdlResource}} :: if set, the wsdl will be retrieved from the given ([Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html])
+- {{outputProperties}} :: Map containing the Saxon specific output properties
+- {{configuration}} ([Saxon configuration|http://www.saxonica.com/documentation/javadoc/net/sf/saxon/Configuration.html]) :: Saxon configuration object
+- {{result}} (defaults to {{dom}}) :: Allows specifying the output result type, possible values are {{dom}}, {{bytes}}, {{string}}
+- {{copyAttachments}}, {{copyProperties}} and {{copySubject}} (default to {{true}}) ::  Configure to copy message attachments, properties and security subject over to the result message
+
+h2. Sample configurations
+h3. {{saxon:xslt}} : Dynamic stylesheet selection
+This endpoint configuration will dynamically load the XSL-T resource that is specified in the {{xslt.source}} property on the {{NormalizedMessage}}
 {code:lang=xml}
 <saxon:xslt service="test:xslt-dynamic" endpoint="endpoint">
   <saxon:expression>
@@ -40,39 +114,8 @@
 </saxon:xslt>
 {code}
 
-|| Name || Type || Description || Required ||
-| resource | [Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html] | the spring resource pointing to the XSLT stylesheet | one of (resource, expression) |
-| expression | [ServiceMix expression|http://incubator.apache.org/servicemix/dist/servicemix-3.0-incubating/site/servicemix-core/apidocs/org/apache/servicemix/expression/Expression.html] | expression used to dynamically load the stylesheet | one of (resource, expression) |
-| wsdlResource | [Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html] | if set, the wsdl will be retrieved from the given Spring resource | no |
-| transformerFactory | TransformerFactory | TraX factory to create transformers | defaults to Saxon implementation |
-| configuration | [Saxon configuration|http://www.saxonica.com/documentation/javadoc/net/sf/saxon/Configuration.html] | Saxon configuration | no |
-| result | String | Output result type | defaults to {{dom}}, possible values are {{dom}}, {{bytes}}, {{string}} |
-| copyAttachments | boolean | | defaults to {{true}} |
-| copyProperties | boolean | | defaults to {{true}} |
-| copySubject | boolean | | defaults to {{true}} |
-| useDomSourceForXslt | boolean | force the transformation of the xslt stylesheet into a DOM document before giving it to the transformer | defaults to {{true}} |
-| useDomSourceForContent | boolean | force the transformation of the incoming JBI message into a DOM document before giving it to the transformer | no |
-| parameters | Map | additional parameters to give to the transformation engine | no |
-
-h3. Using properties and parameters
-
-All properties defined on the JBI exchange and input JBI message will be available for use inside the XSLT stylesheet as parameters.
-In addtion to those properties and the one specified in the {{parameters}} property on the endpoint, the following objects are also available:
-* exchange: the JBI exchange
-* in: the input JBI NormalizedMessage
-* component: the XsltEndpoint instance being called
-
-All those parameters can be accessed using XSLT standard ways.
-For example:
-{code:lang=xml}
-<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
-  <xsl:param name="stringParam"/>
-  <xsl:param name="integerParam"/>
-  ...
-</xsl:stylesheet>
-{code}
-
-and the configuration of those values on the endpoint (in case they are not available on the JBI exchange / message):
+h3. {{saxon:xslt}} : Using parameters in the XSL-T stylesheet
+You can define a Map of parameters on the {{saxon:xslt}} endpoint.
 {code:lang=xml}
 <saxon:xslt service="test:xslt-params" endpoint="endpoint"
             resource="classpath:parameter-test.xsl">
@@ -89,49 +132,17 @@
 </saxon:xslt>
 {code}
 
-h2. Endpoint {{saxon:proxy}}
-
-One common use case is the need to transform a request coming from a service and send it to another service and do the same with the response.  A simple example is the need to translate the request and responses between two SOAP endpoints.  Such a use case could be implemented using two XSLT endpoints and an EIP StaticRoutingSlip.  However, there are some drawbacks, as the operation is lost in the process, and a static routing slip can not be used to process InOnly exchanges.
-
-The 4.0 version of servicemix-saxon provides such a feature in a single endpoint:
-
+In the XSL file, you can access the parameter values with {{<xsl:param/>}}.  You can also access headers on the NormalizedMessage (like e.g. {{org.apache.servicemix.file}}) with the same syntax.
 {code:lang=xml}
-<saxon:proxy service="test:proxy" endpoint="endpoint"
-             resource="classpath:transform-in.xsl"
-             outResource="classpath:transform-out.xsl"
-             faultResource="classpath:transform-fault.xsl">
-  <saxon:target>
-    <saxon:exchange-target service="test:echo" />
-  </saxon:target>
-</saxon:proxy>
+<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
+  <xsl:param name="stringParam"/>
+  <xsl:param name="integerParam"/>
+  <xsl:param name="org.apache.servicemix.file" />
+  ...
+</xsl:stylesheet>
 {code}
 
-|| Name || Type || Description || Required ||
-| resource | [Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html] | the spring resource pointing to the XSLT stylesheet used to transform the input message | no |
-| outResource | [Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html] | the spring resource pointing to the XSLT stylesheet used to transform the output message | no |
-| faultResource | [Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html] | the spring resource pointing to the XSLT stylesheet used to transform the fault message | no |
-| expression | [ServiceMix expression|http://incubator.apache.org/servicemix/dist/servicemix-3.0-incubating/site/servicemix-core/apidocs/org/apache/servicemix/expression/Expression.html] | expression used to dynamically load the stylesheet. If set, it will prevail against all resource, outResource and faultResource attributes | no |
-| wsdlResource | [Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html] | if set, the wsdl will be retrieved from the given Spring resource | no |
-| transformerFactory | TransformerFactory | TraX factory to create transformers | defaults to Saxon implementation |
-| configuration | [Saxon configuration|http://www.saxonica.com/documentation/javadoc/net/sf/saxon/Configuration.html] | Saxon configuration | no |
-| result | String | Output result type | defaults to {{dom}}, possible values are {{dom}}, {{bytes}}, {{string}} |
-| copyAttachments | boolean | | defaults to {{true}} |
-| copyProperties | boolean | | defaults to {{true}} |
-| copySubject | boolean | | defaults to {{true}} |
-| target | ExchangeTarget | the destination where the transformed exchange will be sent to | yes |
-
-
-h2. Endpoint {{saxon:xquery}}
-
-The XQuery endpoint can be used to apply a selected XQuery to the input document.
-
-Simple XQuery:
-{code:lang=xml}
-<saxon:xquery service="test:xquery" endpoint="endpoint"
-              resource="classpath:query.xq" />
-{code}
-
-Inlined XQuery with specific output configuration:
+h3. {{saxon:xquery}} : Inlined XQuery and specific output configuration
 {code:lang=xml}
 <saxon:xquery service="test:xquery-inline" endpoint="endpoint">
   <saxon:query>
@@ -145,7 +156,8 @@
 </saxon:xquery>
 {code}
 
-Dynamic selection of XQuery:
+h3. {{saxon:xquery}} : Dynamic XQuery selection
+This endpoint configuration will dynamically load the XQuery resource that is specified in the {{xquery.source}} property on the {{NormalizedMessage}}
 {code:lang=xml}
 <saxon:xquery service="test:xquery-dynamic" endpoint="endpoint">
   <saxon:expression>
@@ -156,14 +168,3 @@
 </saxon:xquery>
 {code}
 
-|| Name || Type || Description || Required ||
-| query | String | inlined XQuery | one of (query, resource, expression) |
-| resource | [Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html] | the spring resource pointing to the XQuery | one of (query, resource, expression) |
-| expression | [ServiceMix expression|http://incubator.apache.org/servicemix/dist/servicemix-3.0-incubating/site/servicemix-core/apidocs/org/apache/servicemix/expression/Expression.html] | expression used to dynamically load the xquery | one of (query, resource, expression) |
-| wsdlResource | [Spring resource|http://springframework.org/docs/api/org/springframework/core/io/Resource.html] | if set, the wsdl will be retrieved from the given Spring resource | no |
-| outputProperties | Map | Saxon specific output properties | no |
-| configuration | [Saxon configuration|http://www.saxonica.com/documentation/javadoc/net/sf/saxon/Configuration.html] | Saxon configuration | no |
-| result | String | Output result type | defaults to {{dom}}, possible values are {{dom}}, {{bytes}}, {{string}} |
-| copyAttachments | boolean | | defaults to {{true}} |
-| copyProperties | boolean | | defaults to {{true}} |
-| copySubject | boolean | | defaults to {{true}} |
\ No newline at end of file