Xquery how to arrange { .. } in right syntax

In the xquery code bellow, i can't seem to get the syntax arranged starting with this line if (empty($bb)) then . The problem is either syntax error or i have xquery code shown in the output xml. I would appreciate help with the syntax of those last lines - how to place the curly brackets.
for $x in doc ($doc_name)/ProcessValueTrace/Trace
return
<Trace>
for $y in $x/DtsResult
let $bb:=for $xx in $y/DtsRequest where (contains($xx/PDU, string($pdu_byte_pattern))) return $xx
return
(: my problem is from here down. i have 3 outputs - first the beginning tag and a few tags i just output :)
     if (empty($bb)) then
     else
     return
          <DtsResult>
          { $y/LogicalLink }
          { $y/ComPrimitive }
(: than i output some selected tags:)
for $z in $y/DtsRequest
where (contains($z/PDU, string($pdu_byte_pattern)))
     return
$z
(: than i output the close tag - in case i had something before it:)
if (empty($bb)) then
else
          </DtsResult>     
</Trace>
I tried to place each of the 3 outputs in {..} but i kept getting error. I played a little with the {} but i didn't get them and the output right. I appreciate your help.
Best regards.
Paul

Why is it that you dont use one of the built in structures like a LinkedList to help you out? Also, if the data is coming from a DB why not do an order by on your query?
The fastest sort algorythim to use will be the Quick sort. If you look at the demos that come with java there is a sort demo that has this as one of the three examples and you could pull it right from Sun's code.
If you could even temporarily use something like a LinkedList then you could use the java.util.Arrays class to help you.

Similar Messages

  • How to arrange pictures other than by date

    How to arrange pictures other than by date

    You can select a folder of images or a batch and create an album. You can then drag the photos around and they remain fixed in your chosen order within the album.
    Also if you switch from thumbnail view (click the display button near top right in Organizer) to Folder Location view and select an individual folder from the left hand pane, the files will usually be displayed in file name order.

  • How to arrange in alphabetical order

    Hi
    I have a SplayTree , actually you can just say I have a tree for that matter, and there is a String on each line, and I need to print all this out in alphabetical order. I can't use an array since there is huge databse to be arranged in alphabetical order, so what kind of algorithm I can use to put all these words in alphabetical order? The functions I have access to in this Tree are insert, remove, find(returns a BinaryNode), makeEmpty, isEmpty(returns a boolean) and a printTree which returns nothing. So please tell me how to arrange all these in alphabetical order? I am able to print out the entire tree but without the order! Thanks a ton!

    Why is it that you dont use one of the built in structures like a LinkedList to help you out? Also, if the data is coming from a DB why not do an order by on your query?
    The fastest sort algorythim to use will be the Quick sort. If you look at the demos that come with java there is a sort demo that has this as one of the three examples and you could pull it right from Sun's code.
    If you could even temporarily use something like a LinkedList then you could use the java.util.Arrays class to help you.

  • Does anyone know how to get a right ragged margin on this pages app?

    does anyone know how to make a right side margin ragged i.e. it does not break up any words.

    Use the left aligned text arrangement & make sure hyphenate is unchecked in the document inspector.

  • How can I get right data in a cell of JTable when table  enter editing

    how can I get right data in a cell of JTable when table enter editing

    how can I get right data in a cell of JTable when table enter editing

  • How to arrange the information in alphabetical order in a listbox?

    Can you guys help me out?
    How to arrange the information in alphabetical order in a listbox?
    *The information is taken from a text file using FileReader
    Thanks

    private void jbInit() throws Exception {
    // Get information for the text file
    File f1 = new File("Albums.txt");
    try {
    FileReader fr = new FileReader(f1);
    BufferedReader br = new BufferedReader(fr);
    //Use a loop to read
    for (String str = br.readLine();
    str != null;
    str = br.readLine())
    jListModel.addElement(str);
    //Closing the file
    fr.close();
    catch (Exception ex) {
    JOptionPane.showMessageDialog(this, "Error Retriving File", "error",
    JOptionPane.ERROR_MESSAGE);
    Can you explain to me how to use the Collection class? Above codes is getting the data from my text file and put it into my ListBox(jModelList)... So after inputting the text into it.. how do i arrange it using the Collection?
    Thanks

  • I just downloaded the newest version of iTunes and I want to know how to arrange my music by artist/album/name/etc seeing as the little arrow that used to be there is now gone?

    I just can't figure out how to arrange my iTunes library with the newest version that I just downloaded and I'd appreciate if anyone knew how to help me! Thanks

    Try iTunes menu View > Column Browser > Show Column Browser.
    What "little arrow"?

  • How do you populate right side of Shuttle control

    Hi,
    I am trying to use shuttle control. I am not sure how to populate the right side of the shuttle control from database. I am using the following code. But, it is not populating the right side. In this code, P35_COUNTRIES is my shuttle. P35_X is a text field just to test the output. I can see an output 5:8:9 in the text field. But, my shuttle right side is empty. Am I doing something wrong here ? I would really appreciate any suggestions.
    DECLARE
    vCountries VARCHAR2(100);
    vSEP VARCHAR2(1);
    BEGIN
    :P35_X := 'Inside test';
    vCountries := '';
    FOR C IN (SELECT country_id FROM countries WHERE territory_id = 1)
    LOOP
    vCountries := vCountries || vSEP || c.country_id;
    :P35_X := vCountries;
    vSEP := ':';
    END LOOP;
    :P35_COUNTRIES := vCountries;
    :P35_X := vCountries;
    END;
    Thanks

    Hi,
    Yes, it is getting populated: [http://apex.oracle.com/pls/otn/f?p=30879:5]
    My Source settings for the shuttle ("P5_SHUTTLE") are:
    Source Used: Only...
    Source Type: Static Assignment...
    Source Value: (Blank)
    Post Calc Computation: (Blank)
    Default Value: (Blank)
    List of Values Definition: SELECT DNAME d, DEPTNO r FROM DEPT ORDER BY 1
    Settings for my Computation for this item:
    Item Name: P5_SHUTTLE
    Type: PL/SQL Function Body
    Computation Point: Before Header
    Computation:
    DECLARE
    vDEPT APEX_APPLICATION_GLOBAL.VC_ARR2;
    i NUMBER := 1;
    BEGIN
    FOR c IN (SELECT DISTINCT DEPTNO FROM EMP WHERE ENAME LIKE 'A%')
    LOOP
      vDEPT(i) := c.DEPTNO;
      i := i + 1;
    END LOOP;
    RETURN APEX_UTIL.TABLE_TO_STRING(vDEPT);
    END;This computation is unconditional, so runs everytime the page is loaded.
    Andy

  • How to arrange photos in Aperture slide shows to the beat of the  music?

    Is there anyone that knows how to arrange photos to the beat of the music in Aperture slide shows? I have tried to do a search for this topic, looked at "help" and still can get things to work properly. The "beat of music" command seems to be grayed out. Is there a bug in the software? Any help would be appreciated.

    I have been following this thread with great interest. I have tried to do this in Aperture as well. Jumping ahead just a bit to what might be David's next issue, once we figure out why the option is not available to him.
    For me once the music has been added the " Align slide to the beat" is available. However it doesn't seem to do anything.
    I have accomplished this in iMovie and Final Cut Express. In both of these programs you have to actually mark the beats for things to work. You mark the beats and the software sets the play duration to match. This is pretty easy in iMovie. I am hoping for a similar or better interface in Aperture 3. How is this accomplished in Aperture?

  • How to arrange photos in an album, PE11

    I am unable to find how to arrange photos in an album in PE11. Anybody have an idea?

    When you have selected an album, look at the menu 'Sort by', next to the 'All media' button. Set it to 'Album order'. Then you can select (highlight) one or several items and move them around in the browsing space.
    Note that PSE11 is missing the alphabetical sort order (that has been introduced in PSE12).

  • How to arrange photos in camera roll datewise its not showing datewise please let me know

    how to arrange photos in camera roll datewise its not showing datewise please let me know

    Emile
    Bear with me a minute. You're confusing a lot of things.
    1. As Larry says, on Windows you are using a File Manager for you your photos. All well and good if it works for you, but limited. Why? Because it doesn't leverage any of the extra information available with photos files. Essentially, a File Manager doesn't distinguish between a photo nd a Word file or a Music file. They are just files.
    2. Photo Managers like iPhoto (Or Picasa, Aperture, Lightroom et al) work differently. They are designed to leverage the additional information available in the photo file. Case in point: Date. In the File Manager you have folders created for Year/Month/Day. In iPhoto the pics are grouped into Events automatically. These Events are based on the date and time the Photos were taken, and which is recorded in the Exif metadata for the photo file.
    As we all know, when one downloads pictures from a camera, their"names" appear as a bunch of letters and the number indicating thesequence.
    These are Filenames assigned by the Camera. In iPhoto you don't change Filenames you edit Titles. Titles are quite independent of filenames and are an entry in the Exif metadata.
    I'm not sure what you've done in the renaming sequence, but iPhoto does not have a Sort -> by Name command. There is a Sort By Title command.
    But you would not use Events for this job anyway. You would use an Album. Create an Album, drag the pics to it and then you can sort them in any order you want, manually. Then using the Batch Change Command you can create a sequence for them. So, Title the pics 'House Sale' and check the box to append  number and the result:
    House Sale 01, House Sale 02 etc
    Regards
    TD

  • Hi there, i bought an Ipad air and trying to upload the pictures that i have taken in raw files via itunnes. however pictures are quite blurry which is disappointing. appreciate any suggestions on how to make it right via itunes?

    Hi there, i bought an Ipad air and trying to upload the pictures that i have taken in raw files via itunnes. however pictures are quite blurry which is disappointing. Appreciate any suggestions on how to make it right via itunes?
    Thanks

    Hi there, i bought an Ipad air and trying to upload the pictures that i have taken in raw files via itunnes. however pictures are quite blurry which is disappointing. Appreciate any suggestions on how to make it right via itunes?
    Thanks

  • How to apply  special right  to the PDF  file using the LiveCycle Rights Management Server.?

    How to apply special right to the PDF  file using the LiveCycle Rights Management Server.?
    I want  to edit bar code field data using Adobe Reader. Bar Code field was designed and data was changing using Acrobat X1 Professional (Trial Version). But can't do so in adobe reader.

    I think that product has nothing to do with it. You would use LiveCycle Reader Extensions.

  • How to arrange the components in swings

    hi..
    i hava a small problem with components, how to arrange components as i like .
    Name : |____________________|
    Number :|____________________| phone : |____________________|
    Address : |____________________| <------ it is TextField ok.
    Like this, how to do this one in swings. I want 10 Lables & 10 TextField .
    I want Label Behind the Textfield as shown above
    Message was edited by:
    therathna
    Message was edited by:
    therathna

    but gives error when resize the window frameIf you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • How do we write the syntax to show the default values in other languages

    Hi, we have siebel ondemand in 3 different languages-Mandarin, English, and Korean.
    We need to sett he default value of SR Status= Open (for English user), Open in Mandarin 进行中(for Mandarin user) and Open in Korean 진행중(for Korean user).
    how do we write the syntax?
    (if we simply put "Open", the there is an error message when Korean user open the service request )
    Thanks, Sab

    Use LookupValue function. It is documented in help file.

Maybe you are looking for

  • Copying function module from one function group to another

    What is the efficient way to copy a module from one group to other so that all its subroutines and any dependencies with in the FM can also be copied?

  • When i use language for non-unicode [Russian] and i insert another language

    when i use language for non-Unicode [Russian] and i insert another language. it transform to Russian. i insert Thai language into MS access it transform to Russian type.i try to change anything,CharSet, sun.jnu.encoding. but it doesn't have any effec

  • Macbook Pro 2012 wont boot

    While i was using my Macbook all of a sudden it shutdown when i connected a usb to it. It was/is charged to 98/100%. The charger is shockproof and after the shutdown the light at the end of the charger is very faint. Any advice? I wanna avoid opening

  • Why is there only Dyndns and TZO DDNS services?

    With all due respect ..but this is the dumbest thing , I've waited so long for the new firmware to be released in hope that my router e1500 could use a free DDNS service but still only DynDns and Tzo which has been acquired by DynDns ..no free DDNS s

  • Certificate not available in "MCP Certificate Manager "

    Dear, Few weeks ago I passed 2 exams ( Office 365 Deploying and Administering ). It's been more than 7 days since I passed the exams but no certificate is available. Any idea's what/who i can do/contact ? Kind Regards, Nikita Verhaegen