Hello,
As I understand your request correctly, you are using X-Application 3.1.1. Therefore, you can only use a X-Query expression to request documents. With X-Application 4.1.1 and Tamino 4.1.1 you could also use XQuery (standardized query languange of the w3c).
To your problem:
An X-Query to request your documents sorted by the element ‘NUMBER’ could look like this
/GEN-INFO[NAME ~= ‘N*’] sortby (./NUMBER)
With this expression a documents GEN-INFO with a NAME starting with ‘N’ would be returned. Their NUMBER would sort the returned set of the documents.
How to integrate a sort expression into an X-Application?
The generated search page contains the code that defines the query. It includes HTML-input tag that have a special code attribute ‘value’. In your case a tag could be
<input type="text" value="query[/GEN-INFO/NAME,~=)" /></pre><BR><BR>This tag is responsible to connect the text input of the tag to the filter of the query expression.<BR><BR>You can use also a special coding for the value attribute to get sortby clause. <BR><BR><pre class="ip-ubbcode-code-pre"><input type="hidden" value="querysort(/GEN-INFO/NUMBER)" />
For more details about building queries, have a look at the chapter ‘Defining and Processing Queries’.
Important: The input tag for sorting the document set has to be placed manually into your page. You don’t have to code the XSLTs of the generator. The idea is to use the generator for a basic application including 5 JSPs. For individual requirements the JSPs can be modified.
Only if you want to change the general output of the generator, adapt its XSLT to produce another set of JSPs.
Hint: There is a newer version 3.1.3 of X-Application working with Tamino 3.1.1 that you can download from
http://developer.softwareag.com/tamino/x-application/download_old.htm
This version contains a more flexible mechanism to query documents.
Bye,
Christian.
#webMethods#Tamino#API-Management