Project

General

Profile

Feature #5096

Updated by Reynaud Sylvain over 10 years ago

+Refactoring steps+: 
 1) replace Replace @path-template with list of <argument> 

  * support <argument> for path() only. 
  * develop XSL to translate @path-template to <argument> (for lavoisier-update-config.sh). 

 2) replace XPath functions path() and request(). 


 +Replace @path-template with list of <argument>+: <argument>: 
 * @name="string" 
 * @pattern="regexp | .*" 
 * @path-format=" | VALUE | name/value" 
 * @eval => the default value (_+example+: property('def')_). 
 * text() => the default value (_+NOTE+: not allowed if preceding-sibling::argument[text()='']_). 

 +Example+: Example: 
 <pre><code class="xml"> 
 <view><!-- /vo/{vo=dteam}/{site=CC-IN2P3} --> 
     <argument name="vo" path-format="name/value">dteam</argument> 
     <argument name="site">CC-IN2P3</argument> 
 </view> 
 </code></pre> 

 +Replace Replace XPath functions path() and request() with args() and post()+: post(): 
 * path(    ) (_+NOTE+: 'key' no more supported here_). 
 * arguments( [<key>] ) => XML or [string] (_+NOTE+: 'path' is a reserved keyword for 'key'_). 
 * post(    ) => XML (_+NOTE+: a synonym for function current()_). 

 +Modify Modify XPath functions view() and view_request()+: view_request(): 
 * view( <view>, [<entries>] ) => XML. 
 * view_post( <view>, <post>, [<entries>] ) => XML. 

 +Function Function arguments() is a <e:entries> XML document, which contains *ALL* of the following+: following: 
 * default values described in list of <argument> 
 * key/values extracted from path 
 * key/values extracted from query fields 
 * key/values extracted from posted HTML form 

 +Function Function post() is any XML document, which contains *ONLY ONE* of the following+: following: 
 * posted HTML form 
 * posted XML data 
 * XML data sent by view (_+NOTE+: using function view_post()_) 
 * NULL 

 +Examples+: Examples: 
 <pre> 
 view('view1') 
 view('view1', arguments()) 
 view('view1', entries(entry('newK',arguments('oldK')))) 
 view_post('view1', post(), arguments()) 
 </pre>

Back