Author: indika Date: Tue Jun 30 00:10:21 2009 New Revision: 40376 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=40376
Log: update XQuery mediator doc Modified: trunk/esb/java/docs/xdoc/mediators/xquery.xml Modified: trunk/esb/java/docs/xdoc/mediators/xquery.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/docs/xdoc/mediators/xquery.xml?rev=40376&r1=40375&r2=40376&view=diff ============================================================================== --- trunk/esb/java/docs/xdoc/mediators/xquery.xml (original) +++ trunk/esb/java/docs/xdoc/mediators/xquery.xml Tue Jun 30 00:10:21 2009 @@ -95,23 +95,28 @@ <h3>Examples </h3> <ol> - <li></li> -</ol> -<pre><xquery key="xquery\example.xq"> + <li><pre><xquery key="xquery\example.xq"> <variable name="payload" type="ELEMENT"/> </xquery></pre> - -<p>In the above configuration, XQuery script is in the registry and that script -can be picked by key <strong>xquery\example.xq</strong>. There is a one -variable name <strong>payload</strong> and type as <strong>ELEMENT</strong>. As -there is no expression in the variable definitions, default value - the first -child of SOAP Body is used as the value of variable <strong>payload</strong>. . -Within XQuery script, you can access this variable by defining <strong>declare -variable $payload as document-node() external;</strong> . Refer sample 390 and -391 for more information.</p> - -<p></p> - -<p></p> + <p>In the above configuration, XQuery script is in the registry and that + script can be picked by key <strong>xquery\example.xq</strong>. There is a + one variable name <strong>payload</strong> and type as + <strong>ELEMENT</strong>. As there is no expression in the variable + definitions, default value - the first child of SOAP Body is used as the + value of variable <strong>payload</strong>. . Within XQuery script, you can + access this variable by defining <strong>declare variable $payload as + document-node() external;</strong> . Refer sample 390 and 391 for more + information.</p> + </li> + <li><pre><variable name="commission" type="ELEMENT" key="misc/commission.xml"></variable></pre> + <p>A variable definitions that pick a XML resource from the registry using + key misc/commission.xml and bind in to XQuery Runtime so that it can be + accessed with in XQuery script. Refer sample 391 for more information.</p> + </li> + <li><pre><variable name="price" type="DOUBLE" expression="self::node()//m0:return/m0:last/child::text()" xmlns:m0="http://services.samples/xsd"/></pre> + <p>A variable whose value is calculated from current message SOAP Payload + using an expression. Here , value is a type of double.</p> + </li> +</ol> </body> </html> _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
