[ https://issues.apache.org/jira/browse/ODE-281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexis Midon updated ODE-281: ----------------------------- Description: Provide 2 new Xpath functions as described in the ODE wiki: __combineUrl(base, relative)__ ---------------------------------------------------- Takes the relative URL and combines it with the base URL to return a new absolute URL. If the relative parameter is an absolute URL, returns it instead. __composeUrl(template, [name, value]*)__ __composeUrl(template, pairs)__ ---------------------------------------------------- Expands the template URL by substituting place holders in the template, for example, ('/order/{id}', 'id', 5) returns '/order/5'. Substitute values are either name/value pairs passed as separate parameters, or a node-set returning elements with name mapping to value. The functions applies proper encoding to the mapped values. Undefined variables are replaced by an empty string. Basically a uri is always returned. Compliant with the URI Template spec [1]. __expandTemplate(template, [name, value]*)__ __expandTemplate(template, pairs)__ ---------------------------------------------------- Same behavior as composeUrl except that undefined variables are *NOT* replaced by an empty string. The corresponding expansion pattern is not replaced. The immediate coensquence is that the function may return a template. [1] http://bitworking.org/projects/URI-Templates/spec/draft-gregorio-uritemplate-03.html was: Provide 2 new Xpath functions as described in the ODE wiki: __combineUrl(base, relative)__ ---------------------------------------------------- Takes the relative URL and combines it with the base URL to return a new absolute URL. If the relative parameter is an absolute URL, returns it instead. __composeUrl(template, [name, value]*)__ __composeUrl(template, pairs)__ ---------------------------------------------------- Expands the template URL by substituting place holders in the template, for example, ('/order/{id}', 'id', 5) returns '/order/5'. Substitute values are either name/value pairs passed as separate parameters, or a node-set returning elements with name mapping to value. The functions applies proper encoding to the mapped values. Undefined variables are replaced by an empty string. Compliant with the URI Template spec [1]. __expandTemplate(template, [name, value]*)__ __expandTemplate(template, pairs)__ ---------------------------------------------------- Same behavior as composeUrl except that undefined variables are *NOT* replaced by an empty string. The corresponding expansion pattern is not replaced. Meaning that the function may return a template. [1] http://bitworking.org/projects/URI-Templates/spec/draft-gregorio-uritemplate-03.html > XPath functions for RESTful BPEL: combineUrl, composeUrl > -------------------------------------------------------- > > Key: ODE-281 > URL: https://issues.apache.org/jira/browse/ODE-281 > Project: ODE > Issue Type: New Feature > Components: BPEL Runtime > Affects Versions: 1.1 > Reporter: Alexis Midon > > Provide 2 new Xpath functions as described in the ODE wiki: > __combineUrl(base, relative)__ > ---------------------------------------------------- > Takes the relative URL and combines it with the base URL to return a new > absolute URL. If the relative parameter is an absolute URL, returns it > instead. > __composeUrl(template, [name, value]*)__ > __composeUrl(template, pairs)__ > ---------------------------------------------------- > Expands the template URL by substituting place holders in the template, for > example, ('/order/{id}', 'id', 5) returns '/order/5'. Substitute values are > either name/value pairs passed as separate parameters, or a node-set > returning elements with name mapping to value. The functions applies proper > encoding to the mapped values. Undefined variables are replaced by an empty > string. > Basically a uri is always returned. > Compliant with the URI Template spec [1]. > __expandTemplate(template, [name, value]*)__ > __expandTemplate(template, pairs)__ > ---------------------------------------------------- > Same behavior as composeUrl except that undefined variables are *NOT* > replaced by an empty string. The corresponding expansion pattern is not > replaced. The immediate coensquence is that the function may return a > template. > [1] > http://bitworking.org/projects/URI-Templates/spec/draft-gregorio-uritemplate-03.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.