FOR loop in XML Publisher

Hi,
Is there a construct to run a loop for a specific number of time?
Like 'FOR i in 1 .. 5 ' ?
Thanks,
Ashish

Instead of that FOR loop,
you can use the recusrsion,
by putting a sub-template , and call it by passing the number as parameter ,
following is the sample XSL code.
<xsl:template match="test">
<xsl:call-template name="loop">
<xsl:with-param name="var">3</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="loop">
<xsl:choose>
<xsl:when test="$var &gt; 0">
test
<xsl:call-template name="loop">
<xsl:with-param name="var">
<xsl:number value="number($var)-1" />
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
weird
</xsl:otherwise>
</xsl:choose>
</xsl:template>

Similar Messages

  • Looping in XML publisher

    For this problem I went through
    following links
    Re: FOR loop in XML Publisher
    Re: How do you iterate through a string?
    Re: How can print blank rows for XML output report..
    Based on the information I created one template
    as follow
    <?for-each:xdoxslt:foreach_number($_XDOCTX,1,3,1)?>
    <?for-each:/ROWSET?>
    <?for-each:ROW?> DEPT ---it (DEPT)is a XML tag generated with desktop tool
    <?end for-each?>
    <?end for-each?>
    <?end for-each?>
    XML is
    - <ROWSET>
    <PAR>2</PAR>
    - <ROW>
    <DEPT>Z1</DEPT>
    <DATA>2112</DATA>
    </ROW>
    - <ROW>
    <DEPT>A1</DEPT>
    <DATA>7985</DATA>
    </ROW>
    - <ROW>
    <DEPT>B1</DEPT>
    <DATA>8452</DATA>
    </ROW>
    - <ROW>
    <DEPT>B2</DEPT>
    <DATA>2159</DATA>
    </ROW>
    </ROWSET>
    I am now successful in repeating the record sets but not individual records.
    Suppose XML contains single record for
    Z1
    A1
    B1
    B2
    This is the record set.
    Now what I am getting is
    Z1
    A1
    B1
    B2
    Z1
    A1
    B1
    B2
    Z1
    A1
    B1
    B2
    But I want it in the form
    Z1
    Z1
    Z1
    .A1
    A1
    A1
    B1
    B1
    B1
    C1
    C1
    Please help me in the issue.
    Thanks in advance
    C1

    Hiii,
    Sorry about the @row. I was in a bit of a hurry. But you're right. The @row is the row of the table.
    try just to use the position() and last().
    <?if:position()!=last()?>
    <!-- Add page break -->
    <?end if?>
    br Kenneth

  • Creating a template in Financials for using with XML Publisher..

    to whom..
    I hope someone can help please. I'm trying this process for the first time so please bear with me..
    Ive got everything in place for producing PDF reports via XML Publisher through ORACLE Financials but I'm stuck on the last
    part.
    According to the notes (Publishing Concurrent Requests with XML Publisher - An Oracle White Paper Jan 2005) I've come
    across, I need to update the concurrent program definition with a default template (when you submit a request, its in the
    'upon completion' last section where theres an option to change or enter a template layout) yet this section is GREYED OUT.
    Now according to my notes, to create a template you..
    "Setting a Default Template....to select a default template in the Update Concurrent Program page available from the System Administration
    responsibility (Note that this field is available only from System Administration. It is not available from the System
    Administrator Forms interface)......."
    My query is, where is this 'Update Concurrent Program page'..?
    Thanks In Advance..
    Steven
    Edited by: user554089 on Sep 16, 2008 4:02 AM

    OK, so now I've found out how to 'default a template for EBS 11i' (System Administration > Concurrent > Programs - notice its Administration not Administrator)... but its unavailable.. in the the 'OnSite Setting' tab there was no box visible for me to enter a template filename. Does anybody know why this could be?
    thanks,
    Steven

  • For loop and xml - how to point the right content in a XML file with a dynamically created button?

    Hi Everybody,
    as my first experience in AS3 I'm bulding a photo multigallery. In that gallery I have some buttons, each one pointing to its respective set of images.
    Each button is created with the for loop, that picks the information from a XML file. From this XML I get the text of the button, the position etc. What I did with some sucess. But there is a scary problem: I don't know how to make each button load the respective and unique set of images.
    I've tryied several different methods, with no effect, to make each loop to give to each button an unique identity to load the respective set of images.
    I imagine that the solution pass by the use of arrays. I wrote some code, and I guess that I'm almost there (but not sure). Here is my AS3 code until now:
    // CREATE MENU CONTAINER //
    var menuContainer:MovieClip = new MovieClip();
    menuContainer.x=10;
    menuContainer.y=300;
    addChild(menuContainer);
    // CREATE IMAGES CONTAINER //
    var imagesContainer:MovieClip = new MovieClip();
    imagesContainer.x=10;
    imagesContainer.y=10;
    addChild(imagesContainer);
    //// LOAD XML ////
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.addEventListener(Event.COMPLETE, whenLoaded);
    xmlLoader.load(new URLRequest("XML/roiaXML.xml"));
    var xml:XML;
    function whenLoaded(evt:Event):void {
         xml=new XML(evt.target.data);
         var mySetsList:XMLList=xml.children();
         //// MENU BUTTONS ////
         // CREATE ARRAYS //
         var totalArray:Array = new Array();
         var setNodesArray:Array = new Array();
         var setNamesArray:Array = new Array();
         // POSITIONING BUTTONS INSIDE MENU CONTAINER//
         var rowsQuantity:Number=3;
         var columnsQuantity:Number=Math.ceil(mySetsList.length()/rowsQuantity);
         var cellWidth:Number=160;
         // CREATE BUTTONS //
         for (var i:int=0; i< mySetsList.length(); i++) {
              var newSetButtonMC:setButtonMC=new setButtonMC();
              //what do I do here to make it works? To give each button created a unique id.
              setNodesArray.push(i);
              //trace(setNodesArray);
              var imageNodesArray:Array = new Array();
              for (var j:int=0; j<mySetsList[i].IMAGE.length(); j++) {
                   imageNodesArray.push(mySetsList[i].IMAGE[j].attribute("imageTitle"));
              totalArray.push(imageNodesArray);
              newSetButtonMC.setButtonText.text=mySetsList.attribute("galeriaTitle")[i];
              newSetButtonMC.setButtonText.autoSize=TextFieldAutoSize.LEFT;
              var cellX:Number=Math.floor(i/rowsQuantity);
              var cellY:Number=i%rowsQuantity;
              newSetButtonMC.x=cellX*cellWidth;
              newSetButtonMC.y=cellY*(newSetButtonMC.height+10);
              newSetButtonMC.addEventListener(MouseEvent.CLICK, onClick);
              menuContainer.addChild(newSetButtonMC);
         totalArray.push(setNodesArray);
         //// MENU BUTTONS ACTIONS ////
         function onClick(mevt:MouseEvent):void {
              trace(totalArray [0][0]);
              trace(totalArray [0][0]);
              // in the line above I achieved some success loading a specific info from XML.
              // but I don't know what to do with it.
              //what do I do here? To make each button to load its own node from XML.
    Here is my XML:
    <GALERIA galeriaTitle="galeria 01">
      <IMAGE imageTitle="imageTitle01">feio.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle02">muitofeio.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle03">aindamaisfeio.jpg</IMAGE>
    </GALERIA>
    <GALERIA galeriaTitle="galeria 02">
      <IMAGE imageTitle="imageTitle01">estranho.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle02">maisestranho.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle03">aindamaisestranho.jpg</IMAGE>
    </GALERIA>
    Thanks everyone . ABSTRATO

    you can assign each newSetButtonMC and ivar property that points to its i value or, even easier:
    // CREATE MENU CONTAINER //
    var menuContainer:MovieClip = new MovieClip();
    menuContainer.x=10;
    menuContainer.y=300;
    addChild(menuContainer);
    // CREATE IMAGES CONTAINER //
    var imagesContainer:MovieClip = new MovieClip();
    imagesContainer.x=10;
    imagesContainer.y=10;
    addChild(imagesContainer);
    //// LOAD XML ////
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.addEventListener(Event.COMPLETE, whenLoaded);
    xmlLoader.load(new URLRequest("XML/roiaXML.xml"));
    var xml:XML;
    function whenLoaded(evt:Event):void {
         xml=new XML(evt.target.data);
         var mySetsList:XMLList=xml.children();
         //// MENU BUTTONS ////
         // CREATE ARRAYS //
         var totalArray:Array = new Array();
         var setNodesArray:Array = new Array();
         var setNamesArray:Array = new Array();
         // POSITIONING BUTTONS INSIDE MENU CONTAINER//
         var rowsQuantity:Number=3;
         var columnsQuantity:Number=Math.ceil(mySetsList.length()/rowsQuantity);
         var cellWidth:Number=160;
         // CREATE BUTTONS //
         for (var i:int=0; i< mySetsList.length(); i++) {
              var newSetButtonMC:setButtonMC=new setButtonMC();
              //what do I do here to make it works? To give each button created a unique id.
              setNodesArray.push(i);
              //trace(setNodesArray);
              var imageNodesArray:Array = new Array();
              for (var j:int=0; j<mySetsList[i].IMAGE.length(); j++) {
                   imageNodesArray.push(mySetsList[i].IMAGE[j].attribute("imageTitle"));
             nextSetButtonMC.imageArray = imageNodesArray;
              //totalArray.push(imageNodesArray);
              newSetButtonMC.setButtonText.text=mySetsList.attribute("galeriaTitle")[i];
              newSetButtonMC.setButtonText.autoSize=TextFieldAutoSize.LEFT;
              var cellX:Number=Math.floor(i/rowsQuantity);
              var cellY:Number=i%rowsQuantity;
              newSetButtonMC.x=cellX*cellWidth;
              newSetButtonMC.y=cellY*(newSetButtonMC.height+10);
              newSetButtonMC.addEventListener(MouseEvent.CLICK, onClick);
              menuContainer.addChild(newSetButtonMC);
         totalArray.push(setNodesArray);
         //// MENU BUTTONS ACTIONS ////
         function onClick(mevt:MouseEvent):void {
              var mc:setButtonMC=setButtonMC(mevt.currentTarget);
    for(i=0;i<mc.imageArray.length;i++){
    trace(mc.imageArray[i]);
    Here is my XML:
    <GALERIA galeriaTitle="galeria 01">
      <IMAGE imageTitle="imageTitle01">feio.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle02">muitofeio.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle03">aindamaisfeio.jpg</IMAGE>
    </GALERIA>
    <GALERIA galeriaTitle="galeria 02">
      <IMAGE imageTitle="imageTitle01">estranho.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle02">maisestranho.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle03">aindamaisestranho.jpg</IMAGE>
    </GALERIA>
    Thanks everyone . ABSTRATO

  • Variables + for each group + xml publisher

    Hi All,
    My requirement: one group is repeating many times, but based on one data in that group i need to display it.
    Ex:
    <GROUP>
    <DATE>23-July-2007</DATE>
    <DESC>Testing1</DESC>
    </GROUP><GROUP>
    <DATE>10-Aug-2008</DATE>
    <DESC>Testing2</DESC>
    </GROUP><GROUP>
    <DATE>10-Aug-2008</DATE>
    <DESC>Testing2</DESC>
    </GROUP><GROUP>
    <DATE>23-July-2007</DATE>
    <DESC>Testing1</DESC>
    </GROUP>
    In the above exapmle if u see the date xml tag holds 2 different dates which is same (repeating twice). But while displaying i need to show that only once.
    Means.. 23-July-2007 - 1 time and 10-Aug-2008 - 1 time instead of twice.
    I tried through using variables. getting the first date in that variable and checking with others. But not able to compare those..... (No idea)
    How can we achieve that. Please someone help me in this ASAP.
    Thanks in Advance,
    Vinoth

    Shanmu, thanks for responding -- I think I may have actually figured this out. I believe I had a trailing "/" on my "select" on the for-each-group that wasn't supposed to be there. I've reviewed this stuff so many times my eyes are crossed -- but this time I saw it. I've done some additional testing and it appears to be working properly, although I'm going to be extending the functionality now to include a nested for-each-group so we'll see how that goes.
    I'm marking this one as answered for now as it does appear to be working as expected.
    Thanks!!

  • How to Create a group for text in XML publisher template

    Hi-
    Can i try to group the several text of lines so that I can split to a different page, in case text exceeds the page length
    Regards,
    DMAC

    In Mac OS X, every user account is a member of at least one group, and every file and folder has group permissions assigned. Groups give permissions to sets of users who are able to perform similar functions. Mac OS X does not provide an application to easily create and manage groups. Instead, it uses some preset groups to give users permissions and functionality. If you need to create and manage groups, you will need to use Mac OS X Server, or the built in NetInfo Manager.
    If you need more information, any book dealing with OS X and Unix should suffice.

  • Excel output gets expanded when developing Xml publisher report !!

    I am developing a report using XML publisher which generates Excel output ....
    And my layout keeps repeating for every unique delivery...(i am passing 'x' deliveries as input)
    1) When i try to generate a pdf output, my report works fine but when i try to generate an excel output the table size expands..
    2) The jpg file inserted in the rtf(layout template) appears when i generate pdf report and does not appear in the excel output..
    What could be the reason ??

    Hi;
    Please see below thread which could be helpful for your issue:
    XML PUBLISHER report in Excel out put problem
    Regard
    Helios

  • Security - Query - XML Publisher

    Hello,
    I need some help concerning the security for queries and XML Publisher.
    I am on an HR peoplesoft, tools8.49.
    When I am with user PS I see my query in query manager and my XML Publisher report.
    My query is Public and my report definition for XML Publisher too.
    My problem is that I am not able to publish my query to see it in query viewer and I suppose (perhaps I'm wrong) that's why when I'm connecting with another user which have access to the security query tree to see this query, I am not able to see my XML Publisher report definition.
    Could you tell me where I should search to publish this query in query viewer ? Or is it something special to do to see my XML Publisher report definition ?
    Any ideas are welcome.
    Thanks in advance for your help.

    Problem solved : I have forgotten to add my role in Reporting Tools > XML Publisher > Setup > Report Category.

  • Optimize XML Publisher in EBS R12

    Dear All,
    I hope this is the Appropriate Forum for posting with respect to above subject.
    We have recently gone LIVE on the HRMS Suite R12.
    Our Reports have been developed using Reports Developer with the Layout in XML Publisher.
    There was a Report that we have run for Payroll for the Month of June which was working correctly.
    Running the same report in July has for effect that it is taking a very long time to run and hangs.
    Pls. advise if there are any optimizations that can be done to resolve this.
    Thks
    Ravi

    Hi ravi;
    Please check below which could be helpful for your issue:
    XML publisher Troubleshooting
    oracle.apps.fnd.cp.opp.PostProcessorException: XML Publisher output file no
    How To Increase the Processing Performance of Inbound XML Messages [ID 276016.1]
    How to increase the performance of inbound transaction delivery XML messages [ID 265855.1]
    Regard
    Helios

  • A issue with post-procesing  phase of XML Publisher in eBS environment

    I have to optimize some XML Bi Publiser reports in eBS 11i enviroment . I optimezed sql query from report but ... my reports take a long time to finish . My log file of the request looks like :
    Report Builder: Release 6.0.8.27.0 - Production on Fri Oct 1 15:24:48 2010
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    Enter Username:
    Executing request completion options...
    ------------- 1) PUBLISH -------------
    Beginning post-processing of request 48022736 on node TCONCMGR1 at 01-OCT-2010 15:38:30.
    Post-processing of request 48022736 completed at 01-OCT-2010 16:36:07.
    So , my query takes about 14 minutes to complete . and 1 hour in post-processing phase . Why takes so long time to make this phase and how I make to downing this time interval.
    Please give me some advices.
    Some pointers to some articles covering this area would be helpfull also.
    Many thanks,
    Aurel

    Hi ravi;
    Please check below which could be helpful for your issue:
    XML publisher Troubleshooting
    oracle.apps.fnd.cp.opp.PostProcessorException: XML Publisher output file no
    How To Increase the Processing Performance of Inbound XML Messages [ID 276016.1]
    How to increase the performance of inbound transaction delivery XML messages [ID 265855.1]
    Regard
    Helios

  • XML publisher API registration

    Hai,
    Can anyone tell me the procedures to be followed for calling a XML publisher APIs in EBS to get certain output format?
    Thanks in Advance.

    The document
    XML Publisher 5.6.2 Core Components APIs
    can be found here:
    http://www.oracle.com/technology/products/xml-publisher/xmlpdocs.html

  • Where we get real time XML publisher with neat explanation

    hi every one
    where we get real time XML publisher with neat explanation for oracle apps

    Why XML Publisher Reports Why NOT Traditional Oracle Reports?
    Oracle Applications, SQL, PL/SQL: Why XML Publisher Reports Why NOT Traditional Oracle Reports?
    Developing XML Publisher Report - using Data Source as PL/SQL Stored Procedure
    Oracle Applications, SQL, PL/SQL: Developing XML Publisher Report - using Data Source as PL/SQL Stored Procedure
    Developing XML Publisher Report - Using Data Template as Data Source
    Oracle Applications, SQL, PL/SQL: Developing XML Publisher Report - Using Data Template as Data Source
    Regards,
    Srini

  • How to filter cancelled PO lines using XML publisher desktop

    Hello,
    I've created a new PO template for printing using XML Publisher Desktop for Word. Output format is in RTF. All data required was printed except when the user canceled a particular PO line, that line will also be printed out with quantity and total amount 0. How can I filter PO lines with "canceled" flag not be printed out? Is it possible to insert conditional statement within the table template? How to do that?
    Thanks in advance

    if you want only test it by XML publisher desktop
    then you can use if statement
    for example in field
    <?if:TAG1='test?>then
    <?TAG2?>then
    <?end if?>for row between (for example)
    <?for-each:G_GROUPNAME?>and
    <?end for-each?>BTW use this method is not correct in my opinion
    if you use "canceled" flag as parameter in concurrent program
    then you may get xml for RTF template only with needed data

  • XML publisher issue

    Hi,
    xml publisher is failing with warnings and in OPP log file i found below error.
    java.lang.OutOfMemoryError: JVMXE006:OutOfMemoryError, stAllocArray for executeJava failed
    XML publisher version is 5.6.3
    Please advice i'm facing this is prod.
    Thanks

    Hi hussen,
    Please find the error in the OPP log file. Yes they face this issue today only.
    [UNEXPECTED] [534844:RT1541460] java.lang.OutOfMemoryError: JVMXE006:OutOfMemoryError, stAllocArray for executeJava failed
         at java.io.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:75)
         at oracle.apps.xdo.template.FOProcessor.duplicateStream(FOProcessor.java:1695)
         at oracle.apps.xdo.template.FOProcessor.duplicateInput(FOProcessor.java:1679)
         at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1585)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:967)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5888)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3438)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3527)
         at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:247)
         at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:157)
    Exception: java.lang.OutOfMemoryError
    java.lang.OutOfMemoryError
         at oracle.jdbc.dbaccess.DBDataSetImpl._allocItemsAndBuffers(DBDataSetImpl.java(Compiled Code))
         at oracle.jdbc.dbaccess.DBDataSetImpl._allocDataAndItems(DBDataSetImpl.java(Inlined Compiled Code))
         at oracle.jdbc.dbaccess.DBDataSetImpl.setType(DBDataSetImpl.java(Compiled Code))
         at oracle.jdbc.dbaccess.DBDataSetImpl.setType(DBDataSetImpl.java(Compiled Code))
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterBytes(OracleCallableStatement.java(Compiled Code))
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java(Inlined Compiled Code))
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java(Compiled Code))
         at oracle.apps.fnd.cp.gsm.GenCartComm.getQueueMessage(GenCartComm.java:181)
         at oracle.apps.fnd.cp.gsf.GSMStateMonitor.waitForNextEvent(GSMStateMonitor.java:95)
         at oracle.apps.fnd.cp.gsf.GSMServiceController.mainLoop(GSMServiceController.java:236)
         at oracle.apps.fnd.cp.gsf.BaseServiceController.run(BaseServiceController.java:71)
         at java.lang.Thread.run(Thread.java:570)
    Thanks

  • XML Publisher Multiple loops page break

    In my XML Publisher template i am haveing nested loops. The tag <?split-by-page-break:?> is working fine for all but the last iteration. Is there a tag for page break which work always irrespective of the iteration.
    I cannot use ctrl+enter in the template as the whole page is a table whose headers are repeating and on inserting the ctrl+enter the table break.
    Is there any other way to achieve the functionality of ctrl+enter through the xml tag.

    Hi,
    Yes, i was abe to do this, i moved the Customer name filed above the Invoice group and added extra conditin in the rtf.
    Regards,
    RR

Maybe you are looking for

  • Oracle 8.1.6 jre problem on Linux Mandrake 7.2

    I tried to install Oracle 8.1.6 on a Linux Mandrake 7.2 distribution using bash (sh is a link to bash) as shell and glibc 2.1.xx (this is the last Mandrake distribution) runInstaller script died complaining about command not found. Running the runIns

  • Backdated Inventory

    Hi Experts,          Today,  Can we see the last month inventory in BI as well as in R/3? If it is could you please explain in detail? As per my knowledge by using Transaction MB5B we can see the stock on posting date in R/3. For the same selections

  • Plant as a condition to determine output messages in PO

    Hi All: I configure condition table  for PO with the fields: Doc Type, Purch Org, Vendor and Plant (all the previous fields at header level except for the plant ) this table is assigned to an access that also contain the condition table: Doc Type, Pu

  • Best Practice for FlexConnect Wireless roaming in MediaNet environment?

    Hello! Current Cisco best practice recommendations for enterprise MediaNet design, specify that VLANs be local to a switch / switch stack (i.e., to limit the scope of spanning-tree).  In the wireless world, this causes problems if you want users whil

  • HT3310 Can't get remote and mic to work at all with my iPad. Anyone else having this problem?

    Can't get EarPods remote and mic to work with my iPad 3. Anyone else having this problem and, if so, how did they fix it?