Extend XSLT sort function

Is there a way to extend the sort function provided by XSLT? I am using XALAN. Basically, the elements that I need to sort need a more specific sort than just text or number.
thanks

well the default sorts are on number or text. But say I want to sort on network addresses, such as 1.2.3.4 ....text and number dont work here, I need my own sorting (like i would do with a Comparator)..
so if i had
1.2.3.4
170.1.3.3
2.4.3.2
I would want the sort to be like
1.2.3.4
2.4.3.2
170.1.3.3
...however (number wont work) and text sort does
1.2.3.4
170.1.3.3
2.4.3.2
see what i mean?

Similar Messages

  • How to remove the sort function on the drill down and then save

    how to remove the sort function on the drill down and then save in the  change local view of the Query
    Is it possible to change the porperties of any characteristic in the local view and then save?
    If so please post the answer.

    I do not think that option is possible.
    Regards,
    Venkata Boga.

  • Sort functionality in Data Grid

    Hi Gurus,
    I am new to this DataGrid control.I want to establish the sort functionality when clicking on the headercolumns as in matrices.
    (ie.When double clicking the header column , sort the data in ascending or descending order of that column) like in system form matrices.
    How ever this is not possible when I tried with grid control.
    The problem I am facing is that I cannot get the column headers of the grid programmatically.(in duble click event or itempressed event)
    Anybody did this one previously? Also how
    we can change the column order of the grid using screen painter?
    The columns that actually come visible in the grid  are actually columns of the linked datatable object.
    In the designer ,there is no "swap" button for column re-ordering.
    Only one way I know is changing the query associated with datatable.
    This is a crucial thing ,since client may ask for re-ordering of columns frequently.
    Can anybody help?
    Regards,
    Deepesh

    Hi Deepesh,
    1. This functionality is not available with the SDK. Thus it's not possible to change it on the fly. Your only option is to change the query associated with datatable (as you mentioned). You may set up a user preference table, that the user can configure with its preference. That's the best you can do.
    2. To swap the columns in screen painter you must use SBO 2005 (it's not available on previous release). What you must do is, click on the one column you want to swap and the other you want to swap and click on the swap button (on the left bottom of the page in the columns tab)

  • Javascript sort() function not working correctly

    I have an image gallery that automatically loads via a PHP readdir function which populates an array, and then I have a Javascript sort() function which sorts the images in order numerically. In Chrome and Safari, the images display as numbered in the directory. However, in Firefox and Internet Explorer, they display out of order (firefox) and not at all (ie). Here is the code for the php file: <?
    Header("content-type: application/x-javascript");
    function returnimages($dirname=".") {
    $pattern="(\.jpg$)|(\.png$)|(\.jpeg$)|(\.gif$)";
    $files = array();
    $curimage=0;
    if($handle = opendir($dirname)) {
    while(false !== ($file = readdir($handle))){
    $file = basename($file,".jpg");
    echo 'myImg['.$curimage.']="'.$file .'";';
    $curimage++;
    closedir($handle);
    return($files);
    echo 'var myImg=new Array();';
    returnimages()
    ?>
    and here is the code for the javascript sort:
    function sortNumber(a,b)
    return a - b;
    myImg.sort(sortNumber);
    // Tell browser the type of file
    myImgEnd = ".jpg";
    var i = 0;
    // Create function to load image
    function loadImg(){
    document.imgSrc.src = myImg[i] + myImgEnd;
    Any ideas as to why Firefox is behaving this way?

    After you check the box to sort on the column, are you making sure to select a sort order for the same column?
    Earl

  • Sort function doesn't work E12

    the sort function doesn't work half the time on Elements 12 organizer.

    What about FUNCTION CLOCK_INFormula
    RETURN NUMBER
    IS
        l_hours_worked  NUMBER;
        l_to_return     NUMBER;
    BEGIN
        l_hours_worked := TO_NUMBER(NVL(:ATX_CLOCK_IN,'0'));
        IF (MOD((l_hours_worked - 0.02),0.25) = 0) THEN
            l_to_return := TRUNC((l_hours_worked - 0.02) * 4) / 4;
        ELSE
            l_to_return := TRUNC((l_hours_worked + 0.23) * 4) / 4;
        END IF;
        RETURN (l_to_return);
    EXCEPTION  
        WHEN VALUE_ERROR THEN
            RAISE_APPLICATION_ERROR ( -20100
            ,   'ERROR, Cannot represent '
            ||  :ATX_CLOCK_IN
            ||  ' as a number.');
    END CLOCK_INFormula;?
    This function assumes :ATX_CLOCK_IN is always positive.
    T.

  • Looking for example - abap xslt - that uses xslt document() function

    Hello,
    I'm looking for an example that shows the use of abap xslt with the xslt document() function.  Using the xslt document() function seems like a straightforward way to use xslt to create a result xml document by processing the content of two or more
    source documents.  For example, if source document A.xml and aux.xml are available in  memory as xstringand using stylesheet ztransformwhat would be the argument for the document() function to associate aux.xml.  Thanks for any insight.
    Regards,
    jb10809

    Hi,
    Sorry, perhaps I should have been clearer! The function that I picked just to test what you need to do just happened to return a string that contains SPAN tags with style attributes. The actual function code is:
    create or replace FUNCTION out_string_fn
       RETURN VARCHAR2
    IS
       CURSOR emp_cur
       IS
          SELECT ename
            FROM emp;
       v_string   VARCHAR2 (4000);
    BEGIN
       v_string := ' ';
       FOR c IN emp_cur
       LOOP
          v_string :=
                v_string
             || '&lt;SPAN style="font-weight:bold;color:green"&gt;'
             || c.ename
             || '&lt;/SPAN&gt;'
             || ', &lt;/br&gt;&lt;/br&gt;';
       END LOOP;
       RETURN v_string;
    END;And this returned a naff list in green (see [http://apex.oracle.com/pls/otn/f?p=55041:57] and click the Test button) - but it does show that you can style the validation error messages
    Andy

  • XSLT document() function in PL/SQL XDK

    I'm using the PL/SQL XDK (9.2.0.2.0) to do XSLT transformations but having
    no success using the XSLT document() function.
    I just get the error
    ORA-20100: Error occurred while processing: XSL-1021: (Error) Error parsing
    external document: 'wrongmachine.mycompany.com'.
    Can the document function access an external xml file using http from pl/sql?
    eg. http://amachine.mycompany.com/xmldocs/myxml.xml
    I've tried setting the ref parameter of the newStylesheet function, assuming
    this sets up the base uri for the stylesheet
    xslss := xslProcessor.newStylesheet
    (xmldoc => xsl_doc,
    ref => 'http://amachine.mycompany.com/xmldocs');
    I've also used the setBaseDir on both the DOMDocument and the stylesheet
    xmlparser.setBaseDir(p => xsl_parser,
    dir => 'http://amachine.mycompany.com/xmldocs');
    I've tested the XSL stylesheet in Saxon and it works fine.
    Other XSL transformations also work fine using the Oracle XDK but none that use
    document()
    'wrongmachine.mycompany.com' is not even the machine the code is executing on!?
    Is this set up in an installation script?
    Any ideas/examples on how document() can be used in the pl/sql XDK?
    Thanks
    John Holder

    BTW: following this link
    xsl:include within XSL stylesheet stored in XMLType column
    i've encountered that this theme has been asked but none from Oracle staff has answered on it yet ;(((((((

  • XSLT document function - bug?

    I have an XSLT stylesheet which loads several XML documents, by using the XSLT document() function.
    The XSLT document() function works fine using Saxon processor and Firefox. Also it works fine in Safari 3 when the XSLT stylesheet is processed as a stylesheet referenced from an XML-file.
    But, when processing the XSLT stylesheet from Javascript, in Safari 3, using xsltProcessor.transformToDocument() the document() function does not load the files. It can be added, that I am running everything from the local harddrive.
    Anyone has similar experience or some workaround?
    There is a similar post http://discussions.apple.com/thread.jspa?threadID=1559485&tstart=1 about Safari-Windows, but no resolution to the problem.
    Message was edited by: Tomas Jonsson
    Message was edited by: Tomas Jonsson

    I have now made an example to demonstrate this bug. Firefox 3 will do the right thing, Safari 3 and 4 both have the same problem.
    http://www.tomasjonsson.eu/docbugtest/docbugtest.html

  • Sort function not working

    I have a SQL report with different fields. At the report attribute when I checked sort, it gives me error "ORA-00911: invalid character". Any idea?
    My report is working fine without selecting sort function.
    Thanks,
    Mushtak

    After you check the box to sort on the column, are you making sure to select a sort order for the same column?
    Earl

  • Extending the existing functional locations to a new plant?

    Hi Sapiens,
    The following is my concern:
    Q1) I have a set of functional locations(roughly around 5000 records) assigned to say Plant A.
    I would like to extend these existing functional locations to Plant B. I am not permitted to do this using LSMW. I should execute this operation in one shot.
    How to accomplish this?
    Q2) After attaching all the functional locations to Plant B, i should replace the first 4 characters of the functional location structure with the Plant Code itself. Again not through an lsmw. How to accomplish this in one shot?
    Please let me know the procedure of doing it with some guidelines.
    Thanks in Advance,
    Vijaya

    Hi
    1. You can extentd to the other plant with SCAT ,BDC etc
    2. But You can not replace the first four letters from the FL with the New plant code.Remember this is a master data
    Regardas
    Jignesh

  • DRQ#  Payment Wizard Sort Function

    Hi,
    The sort function in the SAP payment wizard, loses it's settings in Step 6.  In Step 3, you can sort the BP name field to sort by alpha, but in Step 6 the sort converts back to numeric, by BP Code.  Our client is having problems with this when making their invoice selections in the wizard, as their invoice filing system is alphabetic and they have a large pile to sort through when making payments. 
    I would have thought the sort option should retain throughout the wizard from Step 3 to Step 6.  Additionally it would be nice if in Step 6 there was also the option to sort again if needed.
    Edited by: Lianne Plant on Nov 9, 2010 3:42 AM

    Hi Janne,
    I trust you are well.
    Please post the DRQ in the forum ['SAP Business One Product Development Collaboration'|/community [original link is broken];.
    All the best,
    Jesper

  • Sort function in web report using servlet

    Dear all
    Please help me this out. I'm doing an online report using servlet. When the report is displayed as a table on the web, is there a way to have a sort function-when you click on the tabs, it will sort the data accordingly.
    If I didn't state my question clearly, please let me know.
    Thank you all for your kind help!
    Grace

    You could probably do that using Javascript, but it's beyond my competence to even suggest how. Alternatively you could make the tabs behave as buttons that send a "sort me" request to the server, which would send out new, resorted, HTML.

  • Sort function issue...

         public void sortDate() {
              ArrayList<Round> temp = new ArrayList<Round>();
              ArrayList<Round> list = new ArrayList<Round>();
    //rounds is and arrayList defined in the class
              rounds.trimToSize();
              temp = rounds;
              int oldestIndex = 0, oldestRound = rounds.get(0).getDate();
              // Sort date from oldest to newest based on yymmdd format
              for (int i = 0; i < temp.size(); i++) {
                   oldestIndex = temp.get(0).getDate();
                   for (int j = 0; j < temp.size(); j++) {
                        if (temp.get(j).getDate() < oldestRound) {
                             oldestRound = temp.get(j).getDate();
                             oldestIndex = j;
                   // Add oldest in the pass to list
                   list.add(temp.get(oldestIndex));
                   temp.remove(oldestIndex);
              // After all passes to sort dates list is set to this.round
              this.rounds = list;
         }What is wrong with this sort function?

    wiebs2334 wrote:
              for (int i = 0; i < temp.size(); i++) {
                   temp.remove(oldestIndex);
              }You are iterating over the temp arraylist from 0-temp.size(), during that time you are removing elements. This is most likely the cause of your index out of bounds exception.
    A solution is to use an iterator and the corresponding remove methods.
    Mel

  • Using SORT function in mapping

    Hi,
    I am having trouble getting my head around using the SORT function.
    My interface is IDOC to File, The IDOC has a repeating segment (PAYLOAD) that can be of 3 types, either type A, B or C (this is set using a "TYPE" field).
    In my file structure I have a repeating "ROW" element which has all of the fields for each row.
    I want to group all the Type A data together, the Type B together and the Type C.
    I have tried the following mapping on the "ROW" element but it doesn't seem to work:
    "TYPE"--"sort"Split By Value (Value Change)--collapseContext--"ROW"
    for each of the mappings under ROW I just have fields copied directly.
    I think I am doing something wrong.
    Thanks.

    Hi,
       You could make this mapping
         TYPE --- +----------------+     +----------------+
               |                |     |                |
               | Concat         | --- | mySortFunction | --- NAME
               |                |     |                |
         NAME --- +----------------+     +----------------+
         TYPE --- +----------------+     +----------------+
               |                |     |                |
               | Concat         | --- | mySortFunction | --- ADDR
               |                |     |                |
         ADDR --- +----------------+     +----------------+
       Where source code of mySortFunction is like this:
    public void mySortFunction(String[] inputValues,ResultList result,Container container){
         for(int i=0;i<inputValues.length;i++)
              if(inputValues<i>.substring(0,1).equals("A"))
                   result.addValue(inputValues<i>.substring(1, inputValues<i>.length-1);               
         for(int i=0;i<inputValues.length;i++)
              if(inputValues<i>.substring(0,1).equals("B"))
                   result.addValue(inputValues<i>.substring(1, inputValues<i>.length-1);
         for(int i=0;i<inputValues.length;i++)
              if(inputValues<i>.substring(0,1).equals("C"))
                   result.addValue(inputValues<i>.substring(1, inputValues<i>.length-1);
       It is very simple. You concat TYPE whit your data, and then you sort all queue, so you have a new sort queue data. You must only then put out data.

  • Sorting functionality : Project systems information system

    Hello Experts,
    I have a problem,as discribed below. Please give me your expert suggestion.
    Requirement is : in report CN41 I need to display one custom field "XXXXX"
    and I need to enable sorting functionality on  this field.
    For this have created a sort profile in "define profiles for srting crietria" and assigned
    field "XXXXX".The sort criteria for this is assending order.
    Then have assigned this sorting profile to the PS info profile.
    Now when i Run CN41...the field 'XXXXX" is displayed and the sort icon appears
    on the top of the field collumn' 'XXXXX". BUT i am not able sort my CN41 report based on this.
    Did I miss anything here ? Even View--> sort/summarize/group ( from the top bar )
    is also not enabled.
    Can you please guide me where have gone wrong. Any other suggestions to enable this sorting functionality are welcome.
    Thanks in advance
    Sandeep

    Hi,
    I think in CN41 sort/summarize/group under 'View' menu is related to 'PS hier. type' of project view in OPUR.
    If you have fixed sort criteria then you can::
    Create a profile for sort criteria in OPTV.
    Add sort criteria profile in profile for calling overviews in OPSL.
    Add profile for calling overview in overall profiles for info. sys. under 'Structure overv' Field.
    Regards,
    Harsh.

Maybe you are looking for

  • N95 v21.0.016 bug(?) in SIP phone

    This one had me stumped for a while... My N95 is hooked up to my own Asterisk server and, as such, rings whenever someone calls me by VoIP or on any of the DID numbers I have attached to my VoIP account. It's logged in as extension 2002 on my server

  • Getting BLOB content in C#

    Folks, I've an image file in BLOB container and I need to download the file on client devices. I've both container, file name and image URL as well. Which one gives better performance to get the data from Azure storage by following mechanism. 1. Acce

  • Safari behaviour with BBC website

    Since installing Leopard on my MacBook the BBC website is misbehaving. I solved the video problem by downloading RealPlayer 10 (thanks for the postings on this). BUT ... The banner at the top of the BBC News opening page flickers. Parts of the page d

  • How to restore old backup in itunes

    OK, I screwed something up and need to restore my Ipad using a previous backup from earlier today. I can see it on my /mobilesync folder, but I don't see it in Itunes. How do I get it back?

  • JTextArea uses a small font that i cant read

    I tried viewing a few examples of java swing applications but everytime i see a JTextArea on them the font on it is really small and hard to read. (I think it uses new courier, size 9 according to an application i tried to make on NetBeans) apparentl