Author: supun Date: Fri Jun 26 01:24:57 2009 New Revision: 40012 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=40012
Log: Adding to mediator guide Added: trunk/esb/java/docs/xdoc/mediators/xquery.xml trunk/esb/java/docs/xdoc/mediators/xslt.xml Added: trunk/esb/java/docs/xdoc/mediators/xquery.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/docs/xdoc/mediators/xquery.xml?pathrev=40012 ============================================================================== --- (empty file) +++ trunk/esb/java/docs/xdoc/mediators/xquery.xml Fri Jun 26 01:24:57 2009 @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>WSO2 ESB - Aggregate Mediator </title> + <link href="css/esb-docs.css" rel="stylesheet" /> + <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" + media="all" /> +</head> + +<body> +<h2>XQuery Mediator</h2> + +<p></p> + +<p>The XQuery mediator can be used to perform an XQuery transformation. The +'key' attribute specifies the XQuery transformation, and the optional 'target' +attribute specifies the node of the message that should be transformed. This +defaults to the first child of the SOAP body of the payload. The 'variable' +elements define a variable that could be bound to the dynamic context of the +XQuery engine in order to access those variables through the XQuery script . +</p> + +<p>It is possible to specify just a literal 'value', or an XPath expression +over the payload, or even specify a registry key or a registry key combined +with an XPath expression that selects the variable. The name of the variable +corresponds to the name of variable declaration in the XQuery script. The +'type' of the variable must be a valid type defined by the JSR-000225 (XQJ +API). </p> + +<h3>Syntax</h3> +<pre xml:space="preserve"><xquery key="string" [target="xpath"]> + <variable name="string" type="string" [key="string"] [expression="xpath"] [value="string"]/>? +</xquery> </pre> + +<p>The supported types are: </p> +<ul> + <li>XQItemType.XQBASETYPE_INT -> INT </li> + <li>XQItemType.XQBASETYPE_INTEGER -> INTEGER </li> + <li>XQItemType.XQBASETYPE_BOOLEAN -> BOOLEAN </li> + <li>XQItemType.XQBASETYPE_BYTE - > BYTE </li> + <li>XQItemType.XQBASETYPE_DOUBLE -> DOUBLE </li> + <li>XQItemType.XQBASETYPE_SHORT -> SHORT </li> + <li>XQItemType.XQBASETYPE_LONG -> LONG </li> + <li>XQItemType.XQBASETYPE_FLOAT -> FLOAT </li> + <li>XQItemType.XQBASETYPE_STRING -> STRING </li> + <li>XQItemType.XQITEMKIND_DOCUMENT -> DOCUMENT </li> + <li>XQItemType.XQITEMKIND_DOCUMENT_ELEMENT -> DOCUMENT_ELEMENT </li> + <li>XQItemType.XQITEMKIND_ELEMENT -> ELEMENT </li> +</ul> + +<h3>UI Configuration</h3> +<img src="../xquery-mediator/docs/images/xquery_mediator_screenshot.jpg" /> + +<p><strong>Figure1: XQuery Mediator</strong> </p> +<ul> + <li>Key: The key that represent the xquery transformation. </li> + <li>Target: (optional) Specify the node of the message that should be + transformed using an xpath expression. ( default to the first child of the + SOAP body ) The namespace prefixes used in the expression can be defined by + clicking the namespaces link in front of the 'Target' input field. </li> +</ul> + +<p>Variables for the XQuery Mediator: Defines values/expressions that could be +bound to the dynamic context of the XQuery engine in order to access those +variables through the XQuery script. </p> + +<p><img src="../xquery-mediator/docs/images/xquery_mediator_variables.jpg" /> +</p> + +<p><strong>Figure1: XQuery Mediator - Adding Variables</strong> </p> +You have the following option in a variable. +<ul> + <li>Variable Type: The 'type' of the variable must be a valid type defined by + the JSR-000225 (XQJ API). + <p>The supported types are: </p> + <ol> + <li>XQItemType.XQBASETYPE_INT->INT</li> + <li>XQItemType.XQBASETYPE_INTEGER->INTEGER</li> + <li>XQItemType.XQBASETYPE_BOOLEAN->BOOLEAN</li> + <li>XQItemType.XQBASETYPE_BYTE->BYTE</li> + <li>XQItemType.XQBASETYPE_DOUBLE->DOUBLE</li> + <li>XQItemType.XQBASETYPE_SHORT->SHORT</li> + <li>XQItemType.XQBASETYPE_LONG->LONG</li> + <li>XQItemType.XQBASETYPE_FLOAT->FLOAT</li> + <li>XQItemType.XQBASETYPE_STRING->STRING</li> + <li>XQItemType.XQITEMKIND_DOCUMENT->DOCUMENT</li> + <li>XQItemType.XQITEMKIND_DOCUMENT_ELEMENT->DOCUMENT_ELEMENT</li> + <li>XQItemType.XQITEMKIND_ELEMENT->ELEMENT</li> + </ol> + </li> + <li>Variable Name: The name of the variable should correspond to the name of + variable declaration in the XQuery script. </li> + <li>Value Type: Whether the value of the variable is a static value or an + expession. </li> + <li>Value/Expression: Static value or the expression. </li> + <li>Registry Key: Key, if the value is retrieved from the registry. </li> + <li>NSEditor: Defines the namespaces for the prefixes used in the xpath + query. </li> + <li>Action: Delete the variable. </li> +</ul> +</body> +</html> Added: trunk/esb/java/docs/xdoc/mediators/xslt.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/docs/xdoc/mediators/xslt.xml?pathrev=40012 ============================================================================== --- (empty file) +++ trunk/esb/java/docs/xdoc/mediators/xslt.xml Fri Jun 26 01:24:57 2009 @@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>WSO2 ESB - XSLT Mediator </title> + <link href="css/esb-docs.css" rel="stylesheet" /> + <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" + media="all" /> +</head> + +<body> +<h2>XSLT Mediator</h2> + <p> + The <xslt> mediator applies the specified XSLT transformation to the + selected element of the current message payload. If the source element is not + specified, it defaults to the first child of the soap body. Optionally + parameters (XSLT) could be passed into the transformations through the + 'property' elements. The 'feature' element defines any features which should be + explicitly set to the TransformerFactory. The feature + 'http://ws.apache.org/ns/synapse/transform/feature/dom' turns on DOM based + transformations instead of serializing elements into Byte streams and/or + temporary files. Though this would be better in performance than using byte + streams, sometimes it may not work for all transformations. + </p> + + <p> + Finally, the 'resource' element can be used to resolve XSLT imports and + includes from the repository. It works in exactly the same way as the + corresponding element in a <proxy> definition. + </p> + + <p> + The <xslt> mediator applies the specified XSLT transformation to the + selected element of the current message payload. If the source element is not + specified, it defaults to the first child of the soap body. Optionally + parameters (XSLT) could be passed into the transformations through the + 'property' elements. The 'feature' element defines any features which should be + explicitly set to the TransformerFactory. The feature + 'http://ws.apache.org/ns/synapse/transform/feature/dom' turns on DOM based + transformations instead of serializing elements into Byte streams and/or + temporary files. Though this would be better in performance than using byte + streams, sometimes it may not work for all transformations. + </p> + + <p> + Finally, the 'resource' element can be used to resolve XSLT imports and + includes from the repository. It works in exactly the same way as the + corresponding element in a <proxy> definition. + </p> + + <h3>Syntax</h3> + + <pre xml:space="preserve"> <xslt key="string" [source="xpath"]> + <property name="string" (value="literal" | expression="xpath")/>* + <feature name="string" value="true| false" />* + <resource location="..." key="..."/>* + </xslt></pre> + <p></p> + <pre xml:space="preserve"><xquery key="string" [target="xpath"]> + <variable name="string" type="string" [key="string"] [expression="xpath"] [value="string"]/>? +</xquery> </pre> + <h3>UI Configuration</h3> + <p> + <img src="../xslt-mediator/docs/images/xslt_mediator_screenshot.jpg" alt=""/> + </p> + <p> + <strong>XSLT Mediator</strong> + </p> + + <ul> + <li> + Key : The registry key to refer the xslt. + </li> + <li> + Source: Specify in which part of message (specified in xpath) the xslt should be applied. Default is the SOAP body of + the message. + </li> + </ul> + + <h2>Properties of the XSLT mediator</h2> + <p> + Manage the properties which would be referred from the xslt in transformation (using get-property(prop-name) xpath extension function). + </p> + <p> + <img src="../xslt-mediator/docs/images/add_properties_screenshot.jpg" alt=""/> + </p> + <p> + <strong>XSLT Mediator - Add Properties</strong> + </p> + + <ul> + <li> + Property Name: Name of the property. + </li> + <li> + Property Type: Whether it is a static value or an xpath expression. + </li> + <li> + Value/ Expression: The static value or the xpath expression. + </li> + <li> + NSEditor: Specify the namespaces that are used in the xpath expression. + </li> + <li> + Action: Delete the property. + </li> + </ul> + + + <h2>Features of the XSLT mediator</h2> + <p> + Specify the features to be enabled in the XSLT transformation. Read the introduction paragraph of this guide for an example feature. + </p> + <p> + <img src="../xslt-mediator/docs/images/add_features_screenshot.jpg" alt=""/> + </p> + <p> + <strong>XSLT Mediator - Add Features</strong> + </p> + + <ul> + <li> + Feature Name: Name of the feature. + </li> + <li> + Feature Value: Specify whether the feature is turn on (True) or Not (False). + </li> + <li> + Action: Delete the feature. + </li> + </ul> +<p></p> +</body> +</html> _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
