How to import an XML element into a loop parameter is XSL

Hi,
We are using XSL template to generate output in a pdf format. The input in an XML file. In the XSL we have a loop. Currently the initial and final value of the loop counter is hardcoded in the xsl file.
<xsl:call-template name="forloop">
     <xsl:with-param name="i">1</xsl:with-param>
     <xsl:with-param name="count">6</xsl:with-param>
</xsl:call-template>
Down below we are using
     <xsl:template name="forloop">
          <xsl:param name="i"/>
          <xsl:param name="count"/>
          <xsl:if test="$i &lt;=$count">
               <fo:table-row>
               <xsl:call-template name="forloop">
                    <xsl:with-param name="i">
                         <xsl:value-of select="$i + 1"/>
                    </xsl:with-param>
etc, etc.
Query :
Currently the final value of the loop is hardcoded to 6. I want to set its value based of an element BAR_CODE_PRINT_NUM value (which can be either 0 or 6) of the XML File.
<LIST_G_BAR_CODE_PRINT>
<G_BAR_CODE_PRINT>
<BAR_CODE_PRINT>Y</BAR_CODE_PRINT>
<BAR_CODE_PRINT_NUM>6</BAR_CODE_PRINT_NUM>
</G_BAR_CODE_PRINT>
</LIST_G_BAR_CODE_PRINT>
Can anyone please tell me how this is to be done. I have tried the following but it did not work.
Approach 1 :
<xsl:if test="LIST_G_BAR_CODE_PRINT/G_BAR_CODE_PRINT/BAR_CODE_PRINT_NUM &gt; 3">
     <xsl:with-param name="count">6</xsl:with-param>
</xsl:if>
<xsl:if test="LIST_G_BAR_CODE_PRINT/G_BAR_CODE_PRINT/BAR_CODE_PRINT_NUM &lt; 3">
     <xsl:with-param name="count">0</xsl:with-param>
</xsl:if>
Approach 2 :
<xsl:with-param name="count"><xsl:value-of disable-output-escaping="no" select="LIST_G_BAR_CODE_PRINT/G_BAR_CODE_PRINT/BAR_CODE_PRINT_NUM"/>
</xsl:with-param>
Thanks

I have managed to resolve it. It was a problem with the nesting of the attribute. The following worked
<xsl:with-param name="count"><xsl:value-of disable-output-escaping="no" select="/NUMNEWJOBCARD/LIST_G_BAR_CODE_PRINT/G_BAR_CODE_PRINT/BAR_CODE_PRINT_NUM"/></xsl:with-param>
Thanks

Similar Messages

  • How to import a XML file into the document?

    Hai,
    i had created a table using xml file....
    Now i want to import that xml file tabel into the document...
    Can any one tell me how to import the xml file into the document?
    thanks
    senthil

    Hai...
    this is senthil...
    i'm beginner for creating adobe indesign plugins..
    i want to import a html file in the document...
    i want to create a table by using html tags and
    that table will be imported into the document..
    How shall i do it?
    can any one plzz explain me?

  • How to import the internal table into subroutine as parameter

    how to import the internal table into subroutine as parameter, and its structure can be recognized inside the subroutine

    Hi Yong,
    try this:
    parameters: p_tabnm like dd03l-tabname.
    field-symbols: <fs_tabname> type standard table.
    data: itab_ref type ref to data.
    create data itab_ref type standard table of (p_tabnm)
                         with default key.
    assign itab_ref->* to <fs_tabname>.
    select * from (p_tabnm) into table <fs_tabname>.
    perform subroutine tables <fs_tabname>
                       using p_tabnm.
    *&      Form  subroutine
          text
         -->P_<FS_TABNAME>  text
         -->P_P_TABNM  text
    form subroutine  tables   p_tabname type standard table
                     using    p_tabnm.
    Here p_tabname already has the structure of the table you gave as input
    parameter
    endform.                    " subroutine

  • How to import iTunes XML library into MS Acess database?

    I have exported my iTunes data to a library XML file. When I try to import these data to a MS Access database (without the sound files of course) I only get strange and stupid table entries.
    I would like to use MS Access to create more flexible reports of my music collection.
    Has anyone ever imported iTunes XML files into MS Access successfully?
    P.S. An import solution to OpenOffice.org as alternative is also appreciated.

    In iTunes, you can "Export Song List" and one of the other options is to export as a text file. This actually creates a comma or tab separated values file, which is a lot easier to import into Microsoft stuff than the XML file is.

  • How to import multiple XML files into one inDesign document without copy/paste ?

    I use InDesign CS6, and I have several XML files with the same structure. Only the data are different.
    I created  an Indesign layout with some tagged placeholder frames on merge mode, for automated layout.
    Today for each XML file I have to create a new InDesign document to import the XML. Everything works fine. Then in order to have all Indesign layouts one after the other into a single Indesign layout, I have to use the copy/paste function.
    I mean for example, copy the contents of all documents to the first one. Or add pages of other documents to the first one, then delete spaces between each page.
    So my question is the following:
    How to repeat this process without copy/paste function, knowing that the
    number of XML files could be unknown.
    Thank you very much for your answer.

    Yes, effectively I would like to catalogue the files into one collection so i can save as one PDF and Print as one.:)
    I know I could save each AI as a pdf them then merge the pdf's together in acrobat, but I have nearly 100 files so would feel more comfortable seeing them all together before print / saving.
    My concern is that if I insert them in Ai, will the file resolution reduce? and will the ai still be editable and would it update the indesign file?
    Thanks for the quick reply

  • How to import multiple xml records into PDF form

    Our organization needs to print and distribute serveral hundred PDF forms to our members.  We want to populate the names and some other basic info at the top of each form so the member can fill in the rest and sign and return it.  I have the one page form set up with the fields and it's connected to an xml schema data source.  When I import the xml file it reads the first record and that's it - how do I get it to read all of the xml records into a copy of the form for each record in the xml data source file so we can print and discribute the forms?  We are using Acrobat 9 Pro on a Windows 7 32 bit machine.
    Thanks

    Is this a form created with Acrobat or LiveCycle?
    Acrobat would need uniquely named fields for each individual's page or pages if they are all in one file.
    If you are processing one PDF file per individual, I would look at splitting the XML or FDF file into a record for each individual and them populating each individual's PDF form.
    You could even use a tab delimited file and a template to populate the  PDF template and then spawn a new page from the template.
    With LiveCycle I would look at using a database for the variable data.

  • How to import premier xml file into FCP X?

    Hi There,
    Premier has an export to "Final Cut Pro XML" option but how do you import these files into FCP X?
    If I navigate from within FCP X, the file is greyed out and if I right click from the finder and open in FCP X I see the error:
    The document “V1-0008_M07-1538.mov.xml” could not be opened. Final Cut Pro cannot open files in the “XML text” format.
    I'm using FCP 10.1.1 and Premiere Pro CC 7.2.1
    Any pointers in the right direction would be much appreciated.
    Cheers

    Looks like this is the only option: https://itunes.apple.com/us/app/7tox-for-final-cut-pro/id496926258?ls=1&mt=12

  • How to import the xml file into bcc?

    My input file to atg is xml which contain category or products assets.
    I want the scheduler to run in such a way that it should auto create a project and send an email to client for approval.
    When the client approves the xml file,then run the scheduler to input the xml file datas into bcc.
    i will be using : SingletonSchedulableService for this
    Give me a guidance for the same.
    Thanks in advance.

    I want to implement this in bcc.
    Which listener will listen for the approval of the client for the email (which contains the xml to import)we sent to him?
    You would have to do custom development to hook your custom workflow with the inbound email. For sending email notifications the action is already there and while creating its element in ACC you can specify a JSP for the email template. You may refer following relevant documentation:
    Oracle ATG Web Commerce - Workflows
    Oracle ATG Web Commerce - Workflow Action Elements
    I recommend to refer the existing DeploymentEmailer source in <ATG>\Publishing\samples\Java and see different DeploymentEvent types and states can be used based on your requirement in your custom component. Also refer these API javadocs to know about the available deployment events and process:
    DeploymentEvent (ATG Java API)
    DeploymentServer (ATG Java API)
    ATG does have a /atg/dynamo/service/POP3Service component to retrieve mails from a POP3 e-mail server but it is primarily used for detecting the bounced email. Not too sure if it would help or fit in your case but still you can go through about its details to know what is already there:
    Oracle ATG Web Commerce - Bounced E-mail
    You may also refer to the InboundEmail event and API javadocs for InboundEmailMessage which are used in this bounced email detection feature:
    Oracle ATG Web Commerce - InboundEmail Event
    InboundEmailMessage (ATG Java API)
    Now based on all this, if you extend and customize a lot of things it would be bit complex and tedious to detect the inbound approval mail based on its content and then advance your workflow. Another approach can be to put a URL in the mail template of your notification email which the approver would have to click and on the landing page you can authenticate and advance your custom workflow as required.

  • How to parse whole xml elements into a java String

    hello everybody,
    I am trying to parse whole xml into a string for example
    my xml file is as below:
    <root>
        <element>
           <data id="1">1</data>
        </element>
        <element>
           <data id="2">2</data>
        </element>
    </root>
    in java whole data should be transfered as
    String xmlString ="<root><element><data id=\"1\">1</data></element><element><data id=\"2\">2</data></element></root>";or in a simple way can xml be copied into a string? any assistance ...
    thanQ in Advance.
    Han.

    This code is to convert xml document to a string.
                             try {
                                  javax.xml.transform.TransformerFactory tfactory = TransformerFactory.newInstance();
                                  javax.xml.transform.Transformer xform = tfactory.newTransformer();
                                  javax.xml.transform.Source src = new DOMSource(xmlString);
                                  java.io.StringWriter writer = new StringWriter();
                                  StreamResult result = new javax.xml.transform.stream.StreamResult(writer);
                                  xform.transform(src, result);
                                  //System.out.println(writer.toString());          
                             } catch (TransformerConfigurationException e) {
                                  e.printStackTrace();
                             }catch(Exception ex )
                                  ex.printStackTrace();
                             }

  • How do I import one xml file into 3 separate tables in db?

    I need to utilize xslt to import one xml file into 3 separate tables: account, accountAddress, streetAddress
    *Notice the missing values in middleName, accountType
    sample xml
    <account>
    <firstName>Joe</firstName>
    <middleName></middleName>
    <lastName>Torre</lastName>
    <accountAddress>
    <streetAddress>
    <addressLine>myAddressLine1</addressLine>
    <addressLine>myAddressLine2</addressLine>
    </streetAddress>
    <city>myCity</city>
    <state>myState</state>
    <postalCode>mypostalCode</postalCode>
    </accountAddress>
    <accountId>A001</accountId>
    <accountType></accountType>
    <account>
    I need the following 3 results in 3 separate xml files in order for me to upload into my 3 tables.
    Result #1
    <rowset>
    <row>
    <firstName>Joe</firstName>
    <lastName>Torre</lastName>
    <accountId>A001</accountId>
    <row>
    <rowset>
    Result #2
    <rowset>
    <row>
    <addressId>1</address>
    <city>myCity</city>
    <state>myState</state>
    <postalCode>myPostalCode</postalCode>
    <row>
    <rowset>
    Result #3
    <rowset>
    <row>
    <addressId>1</addressId>
    <addressLineSeq>1</addressLineSeq>
    <addressLine>myAddressLine1</addressLine>
    <row>
    <row>
    <addressId>1</addressId>
    <addressLineSeq>2</addressLineSeq>
    <addressLine>myAddressLine2</addressLine>
    <row>
    <rowset>

    Use XSU to store in multiple tables.
    "XSU can only store data in a single table. You can store XML across tables, however, by using the Oracle XSLT processor to transform a document into multiple documents and inserting them separately. You can also define views over multiple tables and perform insertions into the views. If a view is non-updatable (because of complex joins), then you can use INSTEAD OF triggers over the views to perform the inserts."
    http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b14252/adx_j_xsu.htm#i1007013

  • Is there a way to import large XML files into HANA efficiently are their any data services provided to do this?

    1. Is there a way to import large XML files into HANA efficiently?
    2. Will it process it node by node or the entire file at a time?
    3. Are there any data services provided to do this?
    This for a project use case i also have an requirement to process bulk XML files, suggest me to accomplish this task

    Hi Patrick,
         I am addressing the similar issue. "Getting data from huge XMLs into Hana."
    Using Odata services can we handle huge data (i.e create schema/load into Hana) On-the-fly ?
    In my scenario,
    I get a folder of different complex XML files which are to be loaded into Hana database.
    Then I gotta transform & cleanse the data.
    Can I use oData services to transform and cleanse the data ?
    If so, how can I create oData services dynamically ?
    Any help is highly appreciated.
    Thank you.
    Regards,
    Alekhya

  • Moving an existing xml element into aTable

    Hi Everyone,
    After importing the xml I need to place or convert the xml elements into the table. Is there any way to do this by JS?
    Here is the sample Table xml elements....
    <table-wrap id="ch3_t1">
    <label>Table 3.1</label>
    <caption>
    <title>Anatomy and Classification of Major Hepatic Resections</title>
    </caption>
    <table>
    <thead>
    <tr>
    <th align="left" valign="top" colspan="5">Anatomic Classification</th>
    </tr>
    <tr>
    <th align="left" valign="top">Couinaud</th>
    <th align="left" valign="top" colspan="2">Goldsmith and Woodburne</th>
    <th align="left" valign="top">Brisbane</th>
    <th align="left" valign="top">Segments resected</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td align="left" valign="top">Right hepatectomy</td>
    <td align="left" valign="top" colspan="2">Right hepatic lobectomy</td>
    <td align="left" valign="top">Right hemihepatectomy</td>
    <td align="left" valign="top">V, VI, VII, VIII</td>
    </tr>
    <tr>
    <td align="left" valign="top">Right lobectomy<sup>a</sup>
    </td>
    <td align="left" valign="top" colspan="2">Extended right hepatic lobectomy</td>
    <td align="left" valign="top">Right trisectionectomy</td>
    <td align="left" valign="top">IV,V,VI, VII, VIII<sup>b</sup>
    </td>
    </tr>
    <tr>
    <td align="left" valign="top">Left hepatectomy</td>
    <td align="left" valign="top" colspan="2">Left hepatic lobectomy</td>
    <td align="left" valign="top">Left hemihepatectomy</td>
    <td align="left" valign="top">II, III, IV</td>
    </tr>
    <tr>
    <td align="left" valign="top">Extended left hepatectomy<sup>a</sup>
    </td>
    <td align="left" valign="top" colspan="2">Extended left lobectomy</td>
    <td align="left" valign="top">Left lateral sectionectomy</td>
    <td align="left" valign="top">II, III, IV, V, VIII<sup>b</sup>
    </td>
    </tr>
    <tr>
    <td align="left" valign="top">Left lobectomy</td>
    <td align="left" valign="top" colspan="2">Left lateral segmentectomy</td>
    <td align="left" valign="top">Left trisectionectomy</td>
    <td align="left" valign="top">II, III</td>
    </tr>
    </tbody>
    </table>
    </table-wrap>
    Looking forward your replies... Your help will be thankful....

    You may want to look again, specifically section 20.11 Moving Oracle Enterprise Content Management to a Production System, Task 4.
    The same basic steps would apply to 10g, minus the WebLogic parts. (Also note that prior to 11g, what you are attempting is really a non-supported configuration. In 11g, Oracle at least gives this set of supported pointers.)

  • A query while  importing  an XML file into a Database Table

    Hi,
    I am Creating an ODI Project to import an XML file into a Database Table.With the help of the following link
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/odi/odi_11g/odi_project_xml-to-table/odi_project_xml-to-table.htm
    I am facing a problem while creating Physical Schema for the XML Source Model.
    For the
    Schema(Schema)
    and
    Schema(Work Schema) field they have selected GEO_D.
    What is GEO_D here??
    or
    What I have to select here?
    1) schema of the xml file (NB:-I havn't created any .xsd or .dtd file for my .xml file)
    or
    2)my target servers schema
    Please tell me what I'll do??
    Thanks

    and
    Schema(Work Schema) field they have selected GEO_D.
    What is GEO_D here??This is the schema name which is specified in the XML file .
    What I have to select here?
    1) schema of the xml file (NB:-I havn't created any .xsd or .dtd file for my .xml file)Yes
    2)my target servers schema
    Please tell me what I'll do??
    Thanks

  • How to import a PDF form into FormsCentral

    Hi,
    Please help me in How to  import a PDF form into FormsCentral.
    Thanks,
    Techvedic

    Hi Techvedic,
    Import of form in Formscentral depends on how it was created. If you used LiveCycle designer to create the original form then it cannot be imported. However, if the form is created in Acrobat then you can import it by clicking on Import PDF form under Create New form heading.
    Note: In the imported form you may edit the position of the submit button, but other design edits to the imported form will need to be made in the tool used to create that form.
    Hope that helps, let me know if you have any other question.
    Regards,
    ~Pranav

  • How to import a PSD file into Indesign WITH layers so it can be edited/saved as an InDesign file?

    How to import a Photoshop file into Indesign CS6 so that it's layers show in InDesign and it can then be edited/saved as an InDesign file?

    MyTienN wrote:
    Someone had mentioned the possibility of saving each individual layer in Photoshop as a png file and importing into Indesign and adjusting it in there
    What do you mean by "adjust"? Editing of Photoshop images should be done in Photoshop.
    Sure, it's possible to save individual layers from an image in Photoshop as inidvidual files in a variety of formats, but what's the point? You could just as easily import the layered file, then copy/paste it into a new layer for each layer in the image and use layer visibility to control which ones show. I don't think that will do you a lot of good, though, if you use adjustment layers or opacity controls on the layer in Photoshop.

Maybe you are looking for