Nested for loops error

Hi all members of the community, I am experiencing problem with pulling the attributes of an xml I created. I use nested for loop. Please kindly help me to solve this problem...

Thanks in advance...

Here's the code & xml...


import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events. *;
flash.net import. *;

var myXML:XML;

var voiceOver: String;
var startOffset:Number;
var slideData:Array;
var id_cont_array:Array = new Array();
var id_textfield_array:Array = new Array();
var id_image_array:Array = new Array();

var myXML_Container_Length:Number;
var myXML_textField_Length:Number;
var myXML_images_Length:Number;

var loader: URLLoader = new URLLoader();
Loader.Load (new URLRequest ("dynamic.xml"));

loader.addEventListener (Event.COMPLETE, processXML);

function processXML(e:Event):void
{
slideData = new Array();
myXML = new XML (loader.data);

loader.removeEventListener (Event.COMPLETE, processXML);
loader.removeEventListener (IOErrorEvent.IO_ERROR, loadError);

myXML = new XML (e.target.data);
voice-over = myXML. @ voice_over;
startOffset = myXML. @ start_offset;

for (var i: uint = 0; i < myXML.*.length (); i ++)
{
trace (myXML + 'slide');
}


myXML_List = myXML.children ();
myXML_Container_Length = myXML.children () .length ();
trace (myXML_Container_Length + "is myXML_Container_Length")
myXML_textField_Length = myXML.containerss [0] .children () .length ();
myXML_images_Length = myXML.children () .length ();
trace (myXML.Child ("containerss") [3]. @ id.toXMLString () + "== myXML.containerss [0].") @ id; ») ;
trace (.textfield myXML.containerss [0] [0]. @ id + "== myXML.slide.containerss [0].") ("@ id");
trace (myXML.containerss [0] .textfield [1]. @ id + "== myXML.slide.containerss [1].") ("@ id");
trace (myXML.containerss [3] [0] image. @ id + "is image [0]");
trace(myXML.containerss[0].) Children() + "== myXML.containerss [0] .children ()"); "."

for (var j: Number = 0; j < = myXML_Container_Length; j ++)
{
id_cont_array.push (myXML.containerss [j]. @ id);
trace (myXML.containerss [j]. Children () .length () + 'is j');
myXML_textField_Length = myXML.containerss [j] .children () .length ();
trace (myXML_textField_Length + "is myXML_textField_Length");
for (var k: Number = 0; k < = myXML_textField_Length-1; k ++)
{

id_textfield_array.push (.textfield myXML.containerss [j] [k]. @ id);
id_image_array.push (image of [k] myXML.containerss [j]. @ id);
trace (id_textfield_array [k] + "== id_textfield_array [k] ==" + k + "--j ==" + j);
trace ("== id_image_array" + id_image_array [k]);
}
trace(id_textfield_array[j]+"==id_cont_array[j]");
}

trace (myXML_List.length () + "= myXML_List");

}

function loadError(e:IOErrorEvent):void
{

trace ("loadError");
}

XML is as below...

< drag direction = "VERTICAL" voice_over = "Slide1.mp3" start_offset = "0" margin ="" > "

< set id = "0" direction = "HORIZONTAL" padding = "10" margin = "10" x = "10" y = "160" width = "200" height = "150" >
< textfield id = "Text1" text = "textfieldText1" padding = "10" margin = "10" x = "10" y = "160" / >
< image id = "img1" text = "" padding = "10" margin = "10" x = "10" y = "160" / > "
< textfield id = "Text2" text = "textfieldText2" padding = "10" margin = "10" x = "10" y = "160" / >
< / define >
< set id = "1" orientation = "HORIZONTAL" padding = "10" margin = "10" width = "200" height = "200" x = "10" y = "160" >
< textfield id = "Text3" text = "textfieldText3" padding = "10" margin = "10" x = "10" y = "160" / >
< image id = "img2" text = "" padding = "10" margin = "10" x = "10" y = "160" / > "

< / define >
< set id = "2" orientation = "VERTICAL" padding = "10" margin = "10" width = "200" height = "150" x = "10" y = "160" >
< textfield id = "Rem5" text = "textfieldText5" padding = "10" margin = "10" width = "200" height = "150" x = "10" y = "160" / >
< image id = "img3" text = "" padding = "10" margin = "10" x = "10" y = "160" / > "
< textfield id = 'Text6"text ="textfieldText6"padding ="10"margin ="10"x ="10"y ="160"/ >
< / define >
< set id = "4" orientation = "VERTICAL" padding = "10" margin = "10" width = "200" height = "150" x = "10" y = "160" >
< textfield id = 'Text7"text ="textfieldText7"padding ="10"margin ="10"width ="200"height ="150"x ="10"y ="160"/ >
< image id = "img4" text = "" padding = "10" margin = "10" x = "10" y = "160" / > "
< textfield id = "Texte8" text = "textfieldText8" padding = "10" margin = "10" width = "200" height = "150" x = "10" y = "160" / >
< / define >
< / slide >

The analysis is totally false. You operate processXML() should be like this:

function processXML(e:Event):void
{
          slideData = new Array();
          loader.removeEventListener(Event.COMPLETE, processXML);
          loader.removeEventListener(IOErrorEvent.IO_ERROR, loadError);
          myXML = new XML(e.target.data);
          voiceOver = myXML.@voice_over;
          startOffset = myXML.@start_offset;
          myXML_Container_Length = myXML.children().length();
          var node:XMLList;
          for (var j:Number = 0; j <= myXML_Container_Length - 1; j++)
          {
                    id_cont_array.push(myXML.containerss[j].@id);
                    node = myXML.containerss[j].children();
                    myXML_textField_Length = node.length();
                    for (var k:Number = 0; k <= myXML_textField_Length - 1; k++)
                    {
                              switch (node[k].name().toString())
                              {
                                        case "textfield":
                                                  trace(node[k].@id);
                                                  id_textfield_array.push(node[k].@id);
                                                  break;

                                        case "image":
                                                  id_image_array.push(node.@id);
                                                  break;
                              }
                    }
          }
}

Tags: Adobe Animate

Similar Questions

  • Capture of sequences of images - issues with nested for loops

    Hi all

    I've written a vi. to capture a number of images ("Image") and save these images, sent to a folder of my choice.  Each image is identified sequentially.  However, I would like to make a number of iterations ("run") of this capture sequence, such that each image file name would be "Filename (Run) _(Image_No).png", for example run 5, image 10 'Filename 5_10.png.  I tried a nested for loop for this but I have an error message 'Current asynchronous i/o Operation' (I have attached a printscreen).

    Can someone help me solve this problem?  Please find attached my vi.

    Sincere greetings and thanks,

    Miika

    Hi toto26,.

    Thank you for your response.  I solved the problem by using a sequence structure flat - file in the first image and all the treatment in the second.

    Kind regards

    Miika

  • Creating tables in a nested for loop

    Hi all.

    I was stuck in this problem for quite a while now and I still don't know how to continue. Some outside the entrance would be greatly appreciated!

    I'm doing the following:

    -Take an array of numbers, to check if they are within a certain range (e.g. between 2 and 4)

    -Build two new arrays: one with all the numbers that are inside the beach and the other with the rest.

    An additional condition is that the amount and value of the range conditions will change (for example, it could be between 2 and 4 only / 2, 4 AND 6 and 7 according to the entry)

    To treat this, I created two nested for loops - one that goes on a table that contains conditions of the beach and inside that actually go and check if the values are in the range. I think I did that part successfully, but the next part is confusing to me - how to actually create the tables separated within two loops for?

    My apologies if I did not explain it well. Another method to support this problem is I want to translate following LabVIEW:

    Ranges of table / / [1 5 7 10] exodus-> This means we want to divide numbers based on those who are in (1,2) and (4.5) against those who are not

    Table of values / / [2 3 6 11 3]

    EndOperationDelegate table / / array of values within the range
    Table outValues / / Array of values out of range

    for m = 1:size (ranges)

    for n = 1:size (values)
    If (THE NUMBER IS on the INSIDE of EACH RANGE)
    EndOperationDelegate = [EndOperationDelegate NEWNUMBER]
    on the other
    outValues = [outValues NEWNUMBER]
    end

    end
    end

    Sounds easy enough, but it gets so chaotic with Labview that I don't know what to do. I have attached a reference image - insertion in the array function is not in fact add to the table, it creates a new table. How can I save that for when the nested for the ends of the loop?

    I have seen a few examples with shift registers which lie in a loop and I couldn't successfully that transfers in my block diagram.

    Any help/direction would be greatly appreciated.

    Hello!

    See the following example to understand how you can create a table in the loop For

    In your case, you also can uce conditional terminal to create a table only when then located nearby. It makes the code much cleaner that the structures of the case

    Hope this helps, if not, let me know if I can help you!

    Marcin

  • nested for loop in the collection

    Hi Experts,

    Collection1

    ============

    SELECT o.object_id

    LOOSE COLLECTION l_obj_info

    FROM (SELECT n.node_id, n.object_id

    N nodes

    START WITH n.node_id = 100

    N.node_id CONNECT BY PRIOR = n.parent_node_id) n

    JOIN IN-HOUSE

    objects o ON o.object_id = n.object_id

    WHERE o.object_type_id = 285;

    s Collection2

    ============

    SELECT *.

    LOOSE COLLECTION l_tab

    OF ((SELECT REGEXP_SUBSTR (i_l_text, "[^,] +', 1, NIVEAU)))

    OF THE DOUBLE

    CONNECT BY REGEXP_SUBSTR (i_l_text, "[^,] +', 1, LEVEL") IS NOT NULL));

    END;

    collection3

    ============

    SELECT o.object_id

    LOOSE COLLECTION l_fin_tab

    Of objects o JOIN ATTRIBUTES att

    ON o.object_id = att.object_id

    WHERE o.object_id = collection1.object_id

    - AND att. VALUE = collection2.val;

    Please tell me how to implement for loop in the collection3 to get the values of collection1 and s collection2.

    I tried in the way below

    CREATE or REPLACE TYPE LIST_OF_ATTRIBUTES_TYPE AS TABLE OF THE varchar2 (4000);

    /

    CREATE or REPLACE TYPE LIST_OF_OBJECT_IDS_TYPE AS TABLE OF THE number (9);

    /

    (F_get_objects_by_type_id) CREATE or REPLACE FUNCTION

    i_object_type_id in NUMBERS

    i_l_text IN VARCHAR2,

    i_scope_node_id NUMBER

    )

    RETURN list_of_object_ids_type

    AS

    CURSOR objs_info

    IS

    SELECT o.object_id

    FROM (SELECT n.node_id, n.object_id

    N nodes

    START WITH n.node_id = i_scope_node_id

    N.node_id CONNECT BY PRIOR = n.parent_node_id) n

    JOIN IN-HOUSE

    objects o ON o.object_id = n.object_id

    WHERE o.object_type_id = i_object_type_id;

    l_tab list_of_attributes_type: = list_of_attributes_type ();

    -l_obj_info list_of_object_ids_type: = list_of_object_ids_type ();

    l_fin_tab list_of_object_ids_type: = list_of_object_ids_type ();

    BEGIN

    BEGIN

    SELECT *.

    LOOSE COLLECTION l_tab

    OF ((SELECT trREGEXP_SUBSTR (i_l_text, "[^,] +', 1, NIVEAU)))

    OF THE DOUBLE

    CONNECT BY REGEXP_SUBSTR (i_l_text, "[^,] +', 1, LEVEL") IS NOT NULL));

    END;

    IF l_tab. COUNT > 0

    THEN

    BECAUSE me IN objs_info

    LOOP

    FOR j IN l_tab. FIRST... l_tab. LAST

    LOOP

    SELECT o.object_id

    LOOSE COLLECTION l_fin_tab

    O JOIN ATTRIBUTES att OBJECTS ON o.object_id =

    att.object_id

    WHERE

    att. VALUE = l_tab (j) and o.object_id = objs_info (i);

    END LOOP;

    END LOOP;

    END IF;

    RETURN l_fin_tab;

    END f_get_objects_by_type_id;

    /

    What this different problem from that of pls 00382 expression is incorrect, as they were returning a record type ?

    Please do not raise the same question several times. The answer is always the same. Your data model is seriously wrong - and that's the reason why you can't get data from it.

  • Nested for loops EACH in the XML editor

    I have a xml like this.

    <?xml version="1.0" encoding="UTF-8"?>
    <DATA_DS>
         <Line_Approver>
              <getLineNumberAssigneesResponse>
              <result>
                    <LineNumber>1</LineNumber>
                    <Assignees>One</Assignees>
               </result>
              <results>
    
                   <LineNumber>2</LineNumber>
                   <Assignees>Two</Assignees>
              </result>
    
              </getLineNumberAssigneesResponse>
         </Line_Approver>
    <DATA_DS>
         <HEADER>
         <INVOICE_ID>300100071480733</INVOICE_ID>
         <AMOUNT>1111</AMOUNT>
         <INVOICE_CURRENCY_CODE>USD</INVOICE_CURRENCY_CODE>
         <INVOICE_NUM>100</INVOICE_NUM>
         <INVOICE_DATE>2015-11-13T00:00:00.000+05:30</INVOICE_DATE>
         <PAYMENT_CURRENCY_CODE>USD</PAYMENT_CURRENCY_CODE>
         <ORG_ID>204</ORG_ID>
         
         <INVOICELINES>
                  <LINE_NUMBER>1</LINE_NUMBER><LINE_TYPE>Item</LINE_TYPE><AMOUNT>1000</AMOUNT><INVOICE_ID>zzz</INVOICE_ID><EXPENDITURE_ITEM_DATE></EXPENDITURE_ITEM_DATE>
         </INVOICELINES>
         <INVOICELINES>
              <LINE_NUMBER>2</LINE_NUMBER><LINE_TYPE>Item</LINE_TYPE><AMOUNT>111</AMOUNT><INVOICE_ID>300100071480733</INVOICE_ID><EXPENDITURE_ITEM_DATE></EXPENDITURE_ITEM_DATE>
         </INVOICELINES>
         </HEADER>
    
    <some more xml/>
    </DATA_DS>
    
    </DATA_DS>
    

    As you can see there are two results and and two invoice lines.

    I want to create a table of invoice lines for which the line number is present in the result.

    So my psudo code is as follows

    for each in result:
         assign result.linenumber to variable
         for each in InvoiceLines:
              compare the InvoiceLines.Line_number to variable:
                   if match print row.
    

    I know I won't have access to the LineNumber result with in second forloop because of the determination of the lexical scope.

    Far from assignment, I am unable to get the value of the number of the line itself.

    I tried two methods of application for with in what work force. The underside of work that uses the absolute path.

    What xpath Miss. Can I do better?

    FOR1: <?for-each:/DATA_DS/Line_Approver/getLineNumberAssigneesResponse/result?>
    
    FOR2: <?for-each:/DATA_DS/DATA_DS/HEADER/INVOICELINES?>
    

    LINE_NUMBER

    LINE_TYPE

    AMOUNT

    For 1 <? LineNumber? > 2 LINE_NUMBER

    LINE_TYPE

    AMOUNT ENDFOR1 ENDFOR2

    I think I gave enough information. Answer just in case I did not say anything clearly.

    You can do this via a simple foreach loop and the code would be

    Please see the data XML and RTF attached for your reference.

    I changed the data in XML format (I added 10 instead of 1) just to make sure that its works or not, and it works very well.

  • Problems with nested for loops - save images from a camera


    Dear Norbert_B,

    Thank you for your response.  I solved the problem by using a sequence structure flat - file in the first image and all the treatment in the second! Easy as pi!

    Kind regards

    Miika

  • for loop error

    for (var id: int = 0; id < 10; id ++) {}

    for (var jt:int = 1; jt < 4; jt ++) {}

    {If (carteP1.indexOf (this ["map","puntiTotaliP"+ jt [3] {.seme] [id])! =-1)}

    This ["carteP1Asta"] [id] = this ["map" + puntiTotaliP1 [3] .seme] [id]

    }

    }

    }

    There is something bad in this formula... I think in bold text...

    I don't know how to write:

    puntiTotaliP1 .seme [3]

    puntiTotaliP2 .seme [3]

    puntiTotaliP3 .seme [3]

    Try:

    {if (carteP1.IndexOf (this ["map" + this ["puntiTotaliP + String (JT)] [3].]))} {(Seme][id])! =-1)}

  • nested for loop

    I have positioning XY with two different controllers.

    the time of execution of these two controllers are different.

    I have attached block digram to understand. In highlight mode, code works very well... but in execution mode, step there gets delayed a little and moves with X stage.

    How can I make sure movement of steps one after the other.

    Thank you

    A simple data dependency is expected to create the design.

    Lynn

  • Create a directory tree: how to call a global function from inside a for loop

    Hello

    I am trying to create a workflow that will create a directory tree in vCenter.

    Concept:

    Basically, I am trying to execute nested for loops for each level of the tree to the caller a global tree.

    Problem:

    The 1st loop for works and creates the file 'Dev '.  The second loop for does not work with error message:

    [19:16:16.219 2013-06-27] [I] building Dev folder
    [19:16:16.474 2013-06-27] [I] directory Built: Dev
    [19:16:16.476 2013-06-27] [I] the records building servers
    [19:16:16.480 2013-06-27] [I] TypeError: cannot find the createFolder function in dev object. (Workflow: TEST_TNG_New_Site_Folder_Structure / Scriptable task (item2) #36)

    I think it has to do with JavaScript not being not able to call a global function in a nested object (I'm not a programmer and don't know JavaScript, so don't shoot me on that :)

    Code: (will clean this up once I do work)

    var folderBase is ['Dev', 'DMZ', 'Prod', 'UAT'];.

    var folderT1 = ["servers", "Jobs"];

    var folderT2 = ['Window', 'Linux'];

    var folderT3 is ["Repo2', 'Repo3', 'Repo1', 'Repo4'];.

    var folderT4 is ["T1", "T2", "T3"];.

    Create the files folderBase level

    for (var i = 0, l = folderBase.length; i < l; i ++) {}

    var rootFolder = parentFolder;

    buildFolderTree (folderBase [i]);

    Create the files folderT1 level

    for (var j = 0, l = folderT1.length; j < l; j ++) {}

    var rootFolder = folderBase [i];

    buildFolderTree (folderT1 [j]);

    Create the files folderT2 level

    for (var k = 0, l = folderT2.length; k < l; k ++) {}

    var rootFolder = folderT1 [j];

    buildFolderTree (folderT2 [k]);

    Create the files folderT3 level

    for (var x = 0, l = folderT3.length; x < l; x ++) {}

    var rootFolder = folderT2 [k];

    buildFolderTree (folderT3 [x]);

    Create the files folderT4 level

    for (var y = 0, l = folderT4.length; y < l; y ++) {}

    var rootFolder = folderT3 [x];

    buildFolderTree(folderT4[y]);

    }

    }

    }

    }

    }

    function buildFolderTree (folderName) {}

    System.log ("Building folder" + folderName);

    rootFolder.createFolder (folderName);

    System.log ("directory of frame:" + folderName);

    }

    Any help will be appreciated.

    Thank you

    B

    Hello

    The createFolder() method returns the object VcFolder to the folder just created, for the new file to be used immediately.  Here is how I modified the code:

    Create the files folderBase level
    for (var i = 0; i)
    var newBaseFolder = buildFolderTree (parentFolder, folderBase [i]);
    Create the files folderT1 level
    for (var j = 0; j)
    var newT1Folder = buildFolderTree (newBaseFolder, folderT1 [j]);
    Create the files folderT2 level
    for (var k = 0; k)
    var newT2Folder = buildFolderTree (newT1Folder, folderT2 [k]);
    Create the files folderT3 level
    for (var x = 0; x)
    var newT3Folder = buildFolderTree (newT2Folder, folderT3 [x]);
    Create the files folderT4 level
    for (var y = 0; y)
    var newT4Folder = buildFolderTree (newT3Folder, folderT4 [y]);
    }
    }
    }
    }
    }

    function buildFolderTree (parentFolderObj, folder_name) {}
    System.log ("Building folder" + folderName);
    var newFolder = parentFolderObj.createFolder (folderName);
    System.log ("directory of frame:" + folderName);
    return NewFolder;
    }

  • For loops with the cursor line and indexing

    Hi all

    I have a question about the loops with the cursor, line and indexing.

    How can I scan via a cursor with an iterator?

    I would use an iterator as

    Whole LoopIndex;
    Whole LoopIndex2;

    for LoopIndex at the beginning of the cursor at the end of the cursor
    loop
    line =: cursor [LoopIndex];
    for LoopIndex2 of LoopIndex at the end of the cursor
    etc...
    end loop;

    I need to use an iterator because I need to use a nested for loop.



    OR


    How can I solve the following problem?

    Class name % ofClass average test Score
    1 Niobe 7 8 8.4
    1 alena 4 7 7.5
    1 9 7 8.9 Estia
    1 Lilly 10 8 9.8
    1 Sandra 6 8 8.3
    1 Melanie 8 8 8.1
    Nadia 2 8 3 4.4
    Sayuki 2 9 8 8.4
    Diasy 2 7 8 8.0
    Flower 2 7 8 6.5
    Diana 2 6 8 7.3
    3 Flora 7 8 5.8
    Sukiya 3 4 8 8.4
    Samantha 3 10 8 7.7
    Roxanne 3 7 8 6.9
    Eline 3 8 8 7.4

    I need to
    -By class, I need to recalculate each average people
    -By class, I need to calculate the % of class score (sum averages / people in the class)

    So it can be done in a nested for loop?
    Or do I just step by step?

    Well, based on this information it would be something like...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select 1 as Class, 'Niobe' as Nm, 7 as Score, 8 as Tests, 8.4 as Average from dual union all
      2             select 1, 'Alena', 4, 7, 7.5 from dual union all
      3             select 1, 'Estia', 9, 7, 8.9 from dual union all
      4             select 1, 'Lilly', 10, 8, 9.8 from dual union all
      5             select 1, 'Sandra', 6, 8, 8.3 from dual union all
      6             select 1, 'Melanie', 8, 8, 8.1 from dual union all
      7             select 2, 'Nadia', 3, 8, 4.4 from dual union all
      8             select 2, 'Sayuki', 9, 8, 8.4 from dual union all
      9             select 2, 'Diasy', 7, 8, 8.0 from dual union all
     10             select 2, 'Blossom', 7, 8, 6.5 from dual union all
     11             select 2, 'Diana', 6, 8, 7.3 from dual union all
     12             select 3, 'Flora', 7, 8, 5.8 from dual union all
     13             select 3, 'Sukiya', 4, 8, 8.4 from dual union all
     14             select 3, 'Samantha', 10, 8, 7.7 from dual union all
     15             select 3, 'Roxanne', 7, 8, 6.9 from dual union all
     16             select 3, 'Eline', 8, 8, 7.4 from dual)
     17  --
     18  -- END OF TEST DATA
     19  --
     20  select class, nm as "NAME", score, tests, average
     21        ,round(((average*tests)+score)/(tests+1),1) as avg_person
     22        ,round((average / sum(average) over (partition by class))*100,1) as class_average
     23  from t
     24* order by class, nm
    SQL> /
    
         CLASS NAME          SCORE      TESTS    AVERAGE AVG_PERSON CLASS_AVERAGE
    ---------- -------- ---------- ---------- ---------- ---------- -------------
             1 Alena             4          7        7.5        7.1          14.7
             1 Estia             9          7        8.9        8.9          17.5
             1 Lilly            10          8        9.8        9.8          19.2
             1 Melanie           8          8        8.1        8.1          15.9
             1 Niobe             7          8        8.4        8.2          16.5
             1 Sandra            6          8        8.3          8          16.3
             2 Blossom           7          8        6.5        6.6          18.8
             2 Diana             6          8        7.3        7.2          21.1
             2 Diasy             7          8          8        7.9          23.1
             2 Nadia             3          8        4.4        4.2          12.7
             2 Sayuki            9          8        8.4        8.5          24.3
             3 Eline             8          8        7.4        7.5          20.4
             3 Flora             7          8        5.8        5.9            16
             3 Roxanne           7          8        6.9        6.9          19.1
             3 Samantha         10          8        7.7          8          21.3
             3 Sukiya            4          8        8.4        7.9          23.2
    
    16 rows selected.
    
  • Error using nested for each activity group transform Oracle SOA 11 g

    I posted this problem in XML general forum section. I don't know if it was in the right place because the error occurs in a BPEL.

    Thank you for taking the time to post this thread.
    I created a XSLT transformation that runs on oxygen, but does not work in a SOA transformation activity.

    Given this XML-

    < country >
    < info enum = "CTRY" name = 'United States' States-total = "50" / >
    < enum = 'ST' index info = '0' sname = "New York" population = "8 244 910" / >
    < enum = 'ST' index info = '0' sname = "Chicago" population = "2 707 120" / >
    < info enum = "CTRY" name = 'Germany' States-total = "16" / >
    < enum = 'ST' index info = '1' sname = population "Berlin" = "3 469 910" / >
    < enum = 'ST' index info = '1' sname = population "Brandenburg" = "2 500 000" / >
    < / country >

    Work of XSLT in the oxygen-

    < xsl: template match = "/" >
    < country >
    [< xsl: for each group-select = "" countries / * ' group-starting-with="info[@enum='CTRY"] ">"
    < CountryInfo >
    < xsl: Call-template name = "ctry" / >
    < / CountryInfo >
    < / xsl: for each group->
    < / country >
    < / xsl: template >

    < xsl: template name = "ctry" >
    < name > country: < xsl: value-of select="@name"/ > < / name >
    districts of <>< xsl: value-of select="@total-states"/ > < / districts >
    < xsl: for each group-select = "current - group ()" group-by="@index" >
    < xsl: Call-template name = "States" / >
    < / xsl: for each group->
    < / xsl: template >

    < xsl: template name = "States" >
    < name of xsl: variable = "index" select="@index"/ >
    States <>
    < xsl: for each select = "current - group ()" >
    < name >
    < xsl: value-of select="@sname"/ >
    < / name >
    < / xsl: foreach >
    < / states >
    < / xsl: template >

    I get the desired oxygen - result

    < country >
    < CountryInfo >
    < name > country: United States of America < / name >
    < > 50 districts < / districts >
    States <>
    < name > New York < / name >
    < name > Chicago < / name >
    < / states >
    < / CountryInfo >
    < CountryInfo >
    < name > country: Germany < / name >
    < > 16 districts < / districts >
    States <>
    < name > Berlin < / name >
    Brandenburg < name > < / name >
    < / states >
    < / CountryInfo >
    < / country >

    In a transformation of Oracle, I get an error "cannot perform XPath expression. I have narrowed down the cause of the error. The error is caused by
    the nested for each group - using 'current - group ()' and 'group-by=@index '.

    < xsl: for each group-select = "current - group ()" group-by="@index" >
    < xsl: Call-template name = "States" / >
    < / xsl: for each group->

    Oracle does not throw an error if I use ' Country/info' instead of ' current - group () or group-starting-with, but this does not produce the desired result.
    because he needs to be grouped by "@index."

    Does anyone know why the Oracle processing activity is not able to use the nested < xsl: for each group-select = "current - group ()" group-by="@index" >?

    This error has been fixed by modifying .

    It seems that the XSLT for Oracle parser does not correctly XSLT 2.0. This is understandable since in 11g does not have full support for XSLT 2.0.

  • Error using nested for each group - in Oracle XSLT

    Hello everyone. Thank you for taking the time to post this thread.
    I created a XSLT transformation that runs on oxygen, but does not work in Oracle.

    Given this XML-

    < country >
    < info enum = "CTRY" name = 'United States' States-total = "50" / >
    < enum = 'ST' index info = '0' sname = "New York" population = "8 244 910" / >
    < enum = 'ST' index info = '0' sname = "Chicago" population = "2 707 120" / >
    < info enum = "CTRY" name = 'Germany' States-total = "16" / >
    < enum = 'ST' index info = '1' sname = population "Berlin" = "3 469 910" / >
    < enum = 'ST' index info = '1' sname = population "Brandenburg" = "2 500 000" / >
    < / country >

    Work of XSLT in the oxygen-

    < xsl: template match = "/" >
    < country >
    [< xsl: for each group-select = "" countries / * ' group-starting-with="info[@enum='CTRY"] ">"
    < CountryInfo >
    < xsl: Call-template name = "ctry" / >
    < / CountryInfo >
    < / xsl: for each group->
    < / country >
    < / xsl: template >

    < xsl: template name = "ctry" >
    < name > country: < xsl: value-of select="@name"/ > < / name >
    districts of <>< xsl: value-of select="@total-states"/ > < / districts >
    < xsl: for each group-select = "current - group ()" group-by="@index" >
    < xsl: Call-template name = "States" / >
    < / xsl: for each group->
    < / xsl: template >

    < xsl: template name = "States" >
    < name of xsl: variable = "index" select="@index"/ >
    States <>
    < xsl: for each select = "current - group ()" >
    < name >
    < xsl: value-of select="@sname"/ >
    < / name >
    < / xsl: foreach >
    < / states >
    < / xsl: template >

    I get the desired oxygen - result

    < country >
    < CountryInfo >
    < name > country: United States of America < / name >
    < > 50 districts < / districts >
    States <>
    < name > New York < / name >
    < name > Chicago < / name >
    < / states >
    < / CountryInfo >
    < CountryInfo >
    < name > country: Germany < / name >
    < > 16 districts < / districts >
    States <>
    < name > Berlin < / name >
    Brandenburg < name > < / name >
    < / states >
    < / CountryInfo >
    < / country >

    In a transformation of Oracle, I get an error "cannot perform XPath expression. I have narrowed down the cause of the error. The error is caused by
    the nested for each group - using 'current - group ().'

    < xsl: for each group-select = "current - group ()" group-by="@index" >
    < xsl: Call-template name = "States" / >
    < / xsl: for each group->

    Oracle does not throw an error if I use ' Country/info' instead of 'current - group ()', but this does not produce the desired result
    because he needs to be grouped by "@index."

    Does anyone know why my XSLT does not work in a transformation from Oracle?

    oracleistheway wrote:
    Does anyone know why my XSLT does not work in a transformation from Oracle?

    What do you mean by "transform Oracle?

    If you are referring to the integrated database XSLT processor available through XMLTransform or DBMS_XSLProcessor API, it does not support XSLT 2.0, 1.0 only.

    If you use the XDK Java (oracle.xml.parser.v2) Please give the exact version.

  • for loop in formula node does not

    Hello

    I; m trying to use for loop in the node of the formula, but it is does not work. I want the output (y1) product value in certain range (a and d, and of course one is smaller than d). I ' do not use primitive labview since a and d are keep changing (both are variable). I tried to put "return 0;" after the y1 equation but the error popup.

    The issue of the loop works not because it gives the last value (I average would be ""). It does not begin with an (initial) value.

    Please help me how to solve this problem...

    Pls ignore other variables not used in the equation. Thank you!! A lot

    Your code works.

    But why you use loop?
    You get the last value, so you can get it in a single step with x correct;

    Also why you say that can not use primitives?
    If you use wire instead of terminals or local variable States values constant.

    Y1, y1_2, y1 3 is the same values calculated differently.

  • For loop creates 1 d data table

    Hello, I am building the circuit below, and I'm running into a lot of problems with the loop, creating a table 1 d of data from certain types of data such as the ERROR OUT and the VISA NAME of RESOURCE. I understand why it does this, but I only need the last value in the table (the value of the last iteration of the loop for). This is true for me for the error, resource name of visa, and I was thinking of using the Boolean value that indicates when the for loop.

    Is there a simple way to extract the last value in the table 1-D so that it is correct to pass along trails, VISA and ERROR type?

    You actually create a block diagram, not a circuit.  A circuit is an electrical system including devices and wires.

    If you right-click on the tunnel and choose disable indexing, then you get the value of the last iteration rather than a 1 d table.

    I recommend you watch the LabVIEW tutorials online
    LabVIEW Introduction course - 3 hours
    LabVIEW Introduction course - 6 hours

  • Parallel for loop 2D table

    Hello

    I don't have any experience with parallel for loops, so I need your help.

    Goal: To do a calculation (average, average) on the rows (or columns) table 2D as quickly as possible. The calculations are independent of each other and I would get a table 1 d with the results.

    I read a few posts on parallel for loops and I would like to find an example for my trivial problem, but I can't.

    Could you help me, it is possible is improve it the effectiveness of the calculation on lines with parallelism in LabVIEW? and it is, could you post an example how to do?

    Thank you

    If the speed issues, do not write your own "average." First of all, it already is in the range of statistics, but then you must be inline your average VI or do the calculation explicitly (as shown below). the size of the array never changes for the duration of the loop, it seems redundant to get the size of the array on each iteration.

    Here's what you could do.

    On my bench, it's much faster than the use of 'mean.vi' of the palette. Average a overhead, Subvi (1) (2) needs to get N with each call and (3) is also an unnecessary error checking.

    (Sorry, I have 32 processors, so the number of instances is set a little high. Modify if needed).

Maybe you are looking for

  • Activation procedure don't remember history?

    Am I missing something? 22 FF with XP SP3. I thought that my privacy option has been set to never remember history before that I played a little bit. I think I'm wrong with that, but am not really sure. I think that I changed to custom and then tried

  • Download the video in Firefox, open and play

    What's the trick to download a video to my host server, it is open in a window and have it start playing? FF wants to download the entire video before you begin. http://www.northbayedu.org/images/video/Curriculum_Meeting.MP4 I think that what I'm loo

  • Pavilion 15 laptop: Admin power on password

    I forgot my admin password on.  My system has been disabled with code 70440866 can you please send me a code to unlock

  • Windows Update error 80072efe. Can't perform a windows update.

    Windows Vista - I can't perform a Windows Update.  I found a 'form of hidden' running when I run the Task Manager.  I researched and found that malware can exist.  I ran malwarebytes scan online windows, security essentials etc., I still have problem

  • Records of e-mail transfer using USB data transfer cable?

    I am trying to transfer some files I've done (original line or match purchases I had to record, etc. etc) in Windows Live Mail on my XP PC, on my Vista PC, I have the same version of Windows Live Mail on both PCs, but in Live Mail options (as opposed