SQL data transformed by XSL-TEXT template

Hi,
please, how can I transform data retrived by SQL query using XSL-TEXT template (need to generate text file using rpad/lpad XSL function)? There is no problem if the data set is 'XML file', with setting the data set as SQL querry I'm lost..
Thanks for all replies.
Rad

Hi,
problem solved by using data template.
Rad

Similar Messages

  • XSL-TEXT: how to import subtemplates in XSL and use xdofx tags?

    Hi,
    I am working on a BI Publisher Report (XML Publisher 5.6.3 in EBS) to generate labels on a label printer. The output needs to be in plain text format, therefore I decided to use the XSL-TEXT template and create my own XSL translation.
    In principle this works pretty fine, but there are two things that worry me a bit:
    1. Does anybody know how I could import other XSL files, like sub-templates in RTF? The problem I have is that I don't know the URI or the sub-template. At the moment I store those other XSL files in the OA_MEDIA folder, but this is not really nice. In RFT you can refer to subtemplates with some xdofx commands... this brings me to my second question:
    2. In RTF templates you can use the Oracle specific XML tags, including the <xdofx:%> and <xdoxslt:%> tags. Does anybody know if and how I can use them in XSL templates?
    Any ideas are highly appreciated!
    regards,
    David.

    Hi Vetsrini,
    1. but what is the absolute path for my subtemplates if I store them in the Template Manager? How can I refer to them?
    This is what the manual says for RTFs:
    >
    Enter the Import Syntax in the Primary Template
    Import the subtemplate to the primary template by entering the following syntax in the
    primary template. The import syntax tells the XML Publisher engine where to find the
    subtemplate RTF in the Template Manager. This syntax may be entered anywhere in the
    template prior to the call-template syntax:
    <?import:xdo://APPCODE.TEMPLATE_CODE.lang.TERR?>
    where
    APPCODE is the Application code you assigned to the subtemplate in the Template
    Manager. For example, if you associated this template with the Receivables application,
    enter "AR".
    TEMPLATE_CODE is the template Code you assigned to the subtemplate in the Template
    Manager. For example, AR_CommonComponents.
    >
    sounds good and easy to me. But I don't have a RTF template. I have just a plain XSLT and those XML Publisher tags do not work there. So how do I get the absolute path of my XSLT templates stored in the Template Manager?
    2. I've included the namespace, no error anymore. But the syntax does not result in actions:
    <xsl:value-of select="xdoxslt:substr((PRODUCT_NAME),1,2)"/>
    {code}
    This does not substring() my string, the full string is returned. But anyway, I don't get an error message anymore. Maybe I just used the wrong XDOXSLT function... I need to search for a list of XDOXSLT functions, but that's not very urgent for now. I think I can do the most with plain XSL and inside the DB itself.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • XSL transform question from XML date datatype to SQL date datatype

    Just to give an idea, I am reading some employee information in a CSV format and I have created the fileadapter to read it and parse it into coherent information where each comma separated value corresponds to a column in an employee table. One of the columns is of the date object in the database.
    So my my variable is created with a list of employees and then fed into the invoke that calls a dbadapter that does the insert. I am using a transformation to get the values from one variable into the other simply because of namespace conflicts. However the xml date will not match the sql date object as to be expected...but how do I work around it? I have a few ideas but I am not sure they are worth mentioning.
    Any suggestions?

    @@Version : ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Microsoft SQL Server 2012 - 11.0.5058.0 (X64)
        May 14 2014 18:34:29
        Copyright (c) Microsoft Corporation
        Developer Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
    (1 row(s) affected)
    Compatibility level is set to 110 .
    One of the limitation states - XML columns with a depth of more than 128 nested nodes
    How do i verify this ? Thanks .
    Rajkumar Yelugu

  • Using a SQL data source and XML data source in the same template

    I am trying to develop a template for the Request for Quote report generated in Apps 11.5.10. I have loaded the data from the XML output into the template, but I am missing one field - I need the org_id from the po_headers table. Is it possible to use a sql data source (i.e., "select org_id from po_headers_all where po_header_id = [insert header_id from xml data]...") in addition to the xml data source to populate the template at runtime? When you use the Insert > SQL functionality is it static at the time the template is created, or does it call to the database at runtime? I've looked through all the docs I could find, but this isn't clear.
    Thanks for any help or suggestions you may have.
    Rhonda

    Hi Pablo
    Thats a tough one ... if you go custom with a data template you will at least get support on the data template functionality ie you have a problem when you try and build one. You will not get support on the query inside the data template as you might have gotten with the Oracle Report, well you could at least log a bug against development for a bad query.
    Eventually that Oracle Report will be converted by development anyway, theres an R12 project going on right now to switch the shipped OReports to data templates. AT this point you'll be fully supported again but:
    1. You have to have R12 and
    2. You'll need to wait for the patch
    On reflection, if you are confident enough in the query then Oracle will support you on its implementation within a data template. Going forward you may be able to swap out your DT and out in the Oracle one without too much effort.
    Regards, Tim

  • SQL Loader-How to insert -ve & date values from flat text file into coloumn

    Question: How to insert -ve & date values from flat text file into coloumns in a table.
    Explanation: In the text file, the negative values are like -10201.30 or 15317.10- and the date values are as DDMMYYYY (like 10052001 for 10th May, 2002).
    How to load such values in columns of database using SQL Loader?
    Please guide.

    Question: How to insert -ve & date values from flat text file into coloumns in a table.
    Explanation: In the text file, the negative values are like -10201.30 or 15317.10- and the date values are as DDMMYYYY (like 10052001 for 10th May, 2002).
    How to load such values in columns of database using SQL Loader?
    Please guide. Try something like
    someDate    DATE 'DDMMYYYY'
    someNumber1      "TO_NUMBER ('s99999999.00')"
    someNumber2      "TO_NUMBER ('99999999.00s')"Good luck,
    Eric Kamradt

  • Data Transformation Service (DTS) available in Oracle SQL Developer?

    Hi All,
    Sorry to bother you again. Is Data Transformation Service (DTS) available in Oracle SQL Developer? So far I cannot find it. For example, i want merge First Name, Last Name column from Access,excel or cvs to migrate as Full Name in Oracle or Full name in Access,Xls or cvs split into First name & last name column in Oracle. What method or service should I use.
    Regards,
    Tun Tun

    On wikipedia, I see that's a SQL Server component, so I don't think it's possible to use it in any other program.
    But you can always tweak columns through normal queries, and even create a new table based on that, like
    CREATE TABLE Table_New AS
    SELECT First_Name || Last_Name FROM Table_OldHope that helps,
    K.

  • XSL:Text img ... Breaks in transformation

    Hi
    I am sure this is a nobrainer. I am using Java to transform an XML document on the server. What I want to do however is to transform values to a corresponding image on the server. eg Database has value 2 stored. The XSL style sheet then transfroms this to <img src="2">.
    I am using the following
    <td class="tableText"><xsl:text><img src="</xsl:text><xsl:value-of select="PRICE"/><xsl:text>"></xsl:text>I have tried using the disable-output-escaping flag and it doesn't seem to make much difference. If I substitute < for < then this is treated as text by the browser. I am sure I am being stupid so please stop me going mad.

    What you have shown there is not even valid XML, as you are not allowed to have the character < in an attribute. You have to escape it by typing &lt; instead. However, your comments "If I substitute < for < ..." indicate that you probably haven't shown what you actually have, because you don't know how to type the input so that it displays correctly in HTML.
    To get a < character, you must type "&lt;". And if you want to see "&lt;" you must type "&amp;lt;".
    So try again, and show us what you actually have.

  • VS2012 - Build - Transform text templates

    We have a relatively large solution file (25 projects). If I build any one of these projects, the final build step is "Transforming templates for all project items". Does anyone know where the setting is to toggle this functionality in visual studio
    2012.
    I thought it was my 'power commands' plugin which was doing this, but I've turned it off but doing so hasn't stopped the functionality.
    It causes all the builds to hang for 5 - 6 seconds at the end, and for something that isn't really needed for each and every build its getting a bit annoying.
    I removed a bunch of add-ins from my VS but no luck.
    These were:
    VS Power Commands
    VS productivity tools
    Tangible T4 Editor (free)
    I've since started VS with all add-ons disabled, but it still does it.
    Strange thing is, in one branch it doesn't do it and in others it does, even after a full merge. I tried deleting the .suo file but it made no difference.
    It even runs if I start a build, and then cancel it.
    Any insights are appreciated.

    Hi marlon_tucker,
    I doubt that the output informaiton would be related to the T4 text templates, could you get the .tt files in your project?
    Reference:
    https://msdn.microsoft.com/en-us/library/bb126478.aspx
    https://msdn.microsoft.com/en-us/library/ee844259.aspx
    If you want to disable it when you build it, maybe you could think about changing the property of this .tt file.
    http://stackoverflow.com/questions/13594860/how-to-disable-t4-template-auto-run-in-visual-studio-2012
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Handling No Data found in e-Text Outbound type template

    Hi,
    I am facing the following issue. I am new to BI Publisher / e-Text templates. Can someone help in getting the issue resolved?
    My XML file looks like this when there is data:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <XX_GIFTAID_CLAIM_REP_XMLP>
    <p_start_date>2010/10/01 00:00:00</p_start_date>
    <p_end_date>2010/10/31 00:00:00</p_end_date>
    - <LIST_G_GIFT_AID>
    - <G_GIFT_AID>
    <C_SUPPORTER_NUMBER>18967929</C_SUPPORTER_NUMBER>
    <C_SUPPORTER_NAME>Barnett</C_SUPPORTER_NAME>
    <C_RECEIPT_DATE>2010-10-03T00:00:00.000+01:00</C_RECEIPT_DATE>
    <C_APPLIED_AMOUNT>33.5</C_APPLIED_AMOUNT>
    </G_GIFT_AID>
    </LIST_G_GIFT_AID>
    </XX_GIFTAID_CLAIM_REP_XMLP>
    When there is no data:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <XX_GIFTAID_CLAIM_REP_XMLP>
    <p_start_date>2010/10/01 00:00:00</p_start_date>
    <p_end_date>2010/10/31 00:00:00</p_end_date>
    <LIST_G_GIFT_AID />
    </XX_GIFTAID_CLAIM_REP_XMLP>
    When there is no data request is completing with warning. When there is data, request completed successfully. I am using data template to generate the XML output. I think I need to handle no data found situation in rtf file. But I have no idea how to write. I tried the following, but it did not work:
    IF NOT(//G_GIFT_AID) THEN
    No data found
    END IF;
    <?if:not(//C_SUPPORTER_NUMBER) =0?>No Data Found<?end if?>
    Any pointers in this regard are highly helpful as this is an critical issue to be delivered ASAP.
    Thanks in Advance!!
    Mukthi

    Try this: <?if:count(/XX_GIFTAID_CLAIM_REP_XMLP/LIST_G_GIFT_AID/G_GIFT_AID/C_SUPPORTER_NUMBER) =0?>No Data Found<?end if?>
    I tried it for both cases of your xml data snapshot provided and it works...
    Thanks,
    BIPuser

  • SQL DM - Data Transformation and Data Movement option ?

    SQL DM - Data Transformation and Data Movement option ?
    I am using SQL DM 3.0.0.665. I need your thoughts on following.
    We find that Erwin introduced Data Transformation and Data Movement functionality to support ETL need. We were able to generate ETL spec using this feature.
    Does SQL DM have any plan to introduce such features?
    How do we use the current SQL DM to build ETL spec ?
    Thanks in helping us out.

    Hello,
    I am currently experimenting with SQL Data Modeler to produce high level solution designs and ETL specifications.
    Have not completed what I am doing but so far have come up with the following:
    Current assumption I am working on:
    All objects specified within the SQL Data Modeler will export to the Reporting Schema tables set up in an Oracle database. Once the data is within these tables then it will be a simple task to develop a SQL report to extract the data in any format required.
    1) There is nothing in the physical (Relational) Model section that supports this
    - though I have yet to fully use the Dimensional Modelling functionality which may have the mapping functionality required to specify an ETL
    2) We need diagrams of the processes as well as the ETL mapping
    - Process modelling is available in the Logical
    - Reverse Engineer all Physical objects to become Logical object i.e. one Table to one Entity
    - For each Entity set up an Information Structure
    (Currently this can only be done in a convoluted method via creating a diagram, creating a Flow and editing the Flow then drilling down)
    MESSAGE to SQL Data Modeler Support: Can things be set up so that Information Structures can be set up directly from the Browser, current method is a bit nonsensical
    - You are now set up to use the Logical Process Modeling functionality to capture the ETL requirements
    - Advise that you reference the training to understand what primitive, composite and transformation processes objects are
    - Also, take the time to understand what an external agent object is
    - Will assume you know what a Data Store is
    Here is the standard I am heading towards that seems feasible, will need to run a proof of concept within the larger team to ensure it works though:
    - A Logical is kept that is a one for one with the Physical
    (The only reason for this is that there is no process modeling functionality for the Physical objects
    MESSAGE to SQL Data Modeler Support: Can you duplicate the Process Modeling for the Logical to be available for the Physical objects too, would be a great help to specify ETL jobs.
    - An External Agent is used to represent an external source e.g. Billing application
    - A primitive process is used to represent the high Level design
    - A composite process is used to specify processes which can be further broken down to ETL jobs
    - A transformation process is used to represent an ETL job
    Within a Transformation process you can specify the mapping from multiple sources to a target table
    There are some negatives to this approach:
    - You lose the physical schemas the tables are part of, though a naming convention will get round this
    - You need to maintain a logical that is one for one with the physical, this is not a big overhead
    However, as I have stated in my message to the SQL Data Modeler support team, would all be resolved if the Process Modeling functionality were also made available within the Physical objects environment.
    Please note that we have not as yet adopted the above approach and are still assessing is SQL Data Modeler will meet this requirement to our satisfaction. The critical bit will be if the data exports to the Reporting Schema, if it does then we have plenty of SQL resource that can produce the reports required procided the data can be captured.
    Hope that all helps.
    Also, hope I have not missed the point of your email.
    Kind regards,
    Yusef

  • Date function in XSL

    Hi,
    I am inserting XML data into database using XSL
    XML File
    <Employee_details>
         <Emp_cd>E002</Emp_cd>
         <Emp_name>Puneet</Emp_name>
         <Emp_DOB>12-dec-90</Emp_DOB>
         <Emp_Height>6.1</Emp_Height>
         <Emp_address>Aundh</Emp_address>
         <Emp_Desgn>TL</Emp_Desgn>
         <Emp_Salary>370000</Emp_Salary>
         <Emp_Dept>EDP</Emp_Dept>
         <Emp_DOJ>12-mar-07 03:30</Emp_DOJ>
    </Employee_details>
    XLS File:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
         <xsl:template match="/Employee">
              <ROWSET>
              <xsl:for-each select="Employee_details">
                   <ROW>
                        <EMP_CD>
                             <xsl:value-of select="Emp_cd"/>
                        </EMP_CD>
                        <EMP_DESGN>
                             <xsl:value-of select="Emp_Desgn"/>
                        </EMP_DESGN>
                        <EMP_SALARY>
                             <xsl:value-of select="Emp_Salary"/>
                        </EMP_SALARY>
                        <EMP_DEPT>
                             <xsl:value-of select="Emp_Dept"/>
                        </EMP_DEPT>
                        <EMP_DOJ>
                             <xsl:value-of select="Emp_DOJ"/>
                        </EMP_DOJ>
                   </ROW>
              </xsl:for-each>
              </ROWSET>
         </xsl:template>
    </xsl:stylesheet>
    i am sucessfully inserting date into table in format of dd-Mon-YYYY. but whenever i am trying to inserting the date in format dd-Mon-YYYY hh:mi its giving error like parsing xml file
    i tried to change the date format in XSL like
    <EMP_DOJ>
    <xsl:value-of select="xs:dateTime(Emp_DOJ,''dd-Mon-YYYY hh:mi'')"/>
    </EMP_DOJ>
    but its not working as well,
    whenever we have to insert the datetime value in table we have to use
    to_date(emp_jod,'dd-Mon-YYYY hh:mi') but how it implement in XSL

    Does this help?
    SQL> CREATE TABLE emp_test (
      2   emp_cd     VARCHAR2(10),
      3   emp_desgn  VARCHAR2(30),
      4   emp_salary NUMBER,
      5   emp_dept   VARCHAR2(3),
      6   emp_doj    DATE
      7  );
    Table created
    SQL> DECLARE
      2 
      3   xml_data xmltype :=
      4   xmltype('<Employee_details>
      5  <Emp_cd>E002</Emp_cd>
      6  <Emp_name>Puneet</Emp_name>
      7  <Emp_DOB>12-dec-90</Emp_DOB>
      8  <Emp_Height>6.1</Emp_Height>
      9  <Emp_address>Aundh</Emp_address>
    10  <Emp_Desgn>TL</Emp_Desgn>
    11  <Emp_Salary>370000</Emp_Salary>
    12  <Emp_Dept>EDP</Emp_Dept>
    13  <Emp_DOJ>12-mar-07 03:30</Emp_DOJ>
    14  </Employee_details>');
    15 
    16   xsl_data xmltype :=
    17   xmltype('<?xml version="1.0"?>
    18  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    19  <xsl:template match="/">
    20  <ROWSET>
    21  <xsl:for-each select="Employee_details">
    22  <ROW>
    23  <EMP_CD><xsl:value-of select="Emp_cd"/></EMP_CD>
    24  <EMP_DESGN><xsl:value-of select="Emp_Desgn"/></EMP_DESGN>
    25  <EMP_SALARY><xsl:value-of select="Emp_Salary"/></EMP_SALARY>
    26  <EMP_DEPT><xsl:value-of select="Emp_Dept"/></EMP_DEPT>
    27  <EMP_DOJ><xsl:value-of select="Emp_DOJ"/></EMP_DOJ>
    28  </ROW>
    29  </xsl:for-each>
    30  </ROWSET>
    31  </xsl:template>
    32  </xsl:stylesheet>');
    33 
    34   v_context DBMS_XMLStore.ctxType;
    35   v_rows    NUMBER;
    36 
    37  BEGIN
    38 
    39   -- change session nls to handle implicit conversion from date string :
    40   execute immediate 'alter session set nls_date_format = ''dd-mon-rr hh24:mi''';
    41 
    42   v_context := DBMS_XMLStore.newContext('EMP_TEST');
    43   v_rows := DBMS_XMLStore.insertXML(v_context, xml_data.transform(xsl_data));
    44   DBMS_XMLStore.closeContext(v_context);
    45 
    46  END;
    47  /
    PL/SQL procedure successfully completed
    SQL> select * from emp_test;
    EMP_CD     EMP_DESGN                      EMP_SALARY EMP EMP_DOJ
    E002       TL                                 370000 EDP 12/03/2007 03:30:00If it's important for you, you may store the previous nls setting and reset it after loading.
    Erm... wait... It won't work if you try to load "emp_DOB" in the same time.
    I guess you'll have to ensure that all date strings come with the same format.
    You can do that in the XSL :
    <EMP_DOB><xsl:value-of select="concat(Emp_DOB,'' 00:00'')"/></EMP_DOB>Edited by: odie_63 on 30 juil. 2010 11:52
    Edited by: odie_63 on 30 juil. 2010 12:00

  • xsl:text not preserving whitespace

    When I try to use <xsl:text> to put spaces into the output of a transform, it does'nt work. Leading/trailing spaces gets stripped and a single space by itself gets dropped altogether.
    This is using the PL/SQL XSLT on an XMLType in 9.0.2.
    If I run the same transform on the same data but using XALAN XSLT it works fine.

    Was that supposed to read:
    <xsl:text>& amp;#xa0;</xsl:text>?
    (I added whitespace so you could see the ampersand, but that's not a non-breaking space, that's an actual printable character.
    I later found a solution that worked in this thread:
    Cannot get to print NEWLINE in XMLTransform using XSLT
    Posted: May 2, 2007 10:16 AM
    Cannot get to print NEWLINE in XMLTransform using XSLT
    Thanks,
    Eric

  • How to call a SQL function from an XSL expression

    Hi
    In R12, in Payroll Deposit adivce/Check writer, We need to sort the earnings tag <AC_Earnings> in to two different categories as regular and other earnings. In the DB and form level of element defintiion we have a DFF which differentiates between the two kinds of earnings. But the seeded XML that is gerneated by the check writer does not have this field.
    The seeded template displays all the earnings in one column. How can we achieve this in the template without modifying the seeded XML.
    The one approach i have is to write a function and based on the return value sort the data. For this I need to know :
    1) How to call a SQL function from an XSL expression that is allowed in BI template.
    If anyone ahs faced similar requirements please share your approach.
    Thanks
    Srimathi

    Thank u..
    but i'd seen that link wen i searched in google..
    Is it possible without using any 3rd party JARs and all?
    and more importantly plz tell me what should be preferred way to call a javascript function?
    Do it using addLoadEvent() or Windows.Load etc
    OR
    Call it thru Xsl? (I donno how to do dis)
    Thanks in Advance..
    Edited by: ranjjose on Jun 3, 2008 8:21 AM

  • Using XSL-XML template to convert name value pairs into XML elements

    Hi,
    I have a xml document in the format:
    <?xml version=”1.0”?>
    <body title="Mr" firstName="Joesph" middeNames="George Harry" lastname="Smith" countrycode="GBP"/>
    I need to convert this using a XSL-XML template in BI publisher to return XML in the following format, while doing some conversion, e.g. converting countrycode from GBP to UK:
    <?xml version=”1.0”?>
    <body>
    <title>Mr</title>
    <firstName>Joseph</firstName>
    <middleNames>George Harry</middleNames>
    <lastname>Smith</lastname>
    <countrycode>UK</countrycode>
    </body>
    Would appreciate if anyone could point me in the correct direction.

    Hi Sweta,
    Why MTB??? Message Transformation bean is used to change the format of the message... If you are planning to call any XSLT or java mapping through that then you can give it a try..
    >>how to get the last and first 3 special characters in the output text using MTB?
    Put them in message mapping itself and write it in File
    Regards
    Suraj

  • Xsl:import and xsl:call-template errors for xslt in mediator (ORAMED-03601)

    Hello,
    I decided for performance issues with bpel execution to use a mediator instead.
    In my requester i have a mediator that justs recieves an xml message, uses an xsl transformation (version 2) on that message and then sends it to the EBS.
    The xsl file that's works correctly when used in a bpel process has both <xsl:import..../>and <xsl:call_template.../> tags.
    When i tried and used the same xsl in the mediator i get an ORAMED-03601 error:
    ORAMED-03601:[Invalid transformer configuration]Unable to create transformer. It could be because of transformation file or configuration issues. Reason : "xsl/Xform_PriceListListABMReqMsg_to_PriceListEBMReqMsg.xsl"Possible Fix:Check log file for any exceptions and contact Oracle Support Services for further help
    It works correctly again if i comment/remove all the imports and call-template and incorporate them in the xsl file itself.
    Do anyone know if there are some limitations using xsl in a mediator instead of a bpel?

    Hi,
    I have a problem with call-template. I have passed
    sed some parameter with call-template tag and used
    that parameter in the conditional check tag <xsl:if>
    i am getting the error. Can any body tell how to use
    this? I actuall want to dynamically pass the tag name
    as the parameter and check the attribute value of the
    tag passed in the if condition and then i want to
    person some action. How can i do it?
    Here is the call-template code:
    <xsl:call-template name="selected-unselected">
    <xsl:with-param
    ram name="currentTag">motor-carrier</xsl:with-param>
    </xsl:call-template>
    Here is the template definition:
    <xsl:template name="selected-unselected">
    <xsl:param
    m name="currentTag">Quick-Quote</xsl:param>
         <xsl:if test="./{$currentTag}/@selected='true'">
              <xsl:text>checked</xsl:text>
         </xsl:if>
         <xsl:if test="./{$currentTag}/@selected='false'">
              <xsl:text>Unchecked</xsl:text>
         </xsl:if>
    </xsl:template>
    Here is the sample xml code:
    <motor-carrier selected="true"/>
    <motor-truck selected="false"/>
    <sched-mobile-equip selected="false"/>
    Here instead of writing the condition check for every
    tag i want to write it once and dynamically pass the
    tag name as parameter to the template. If the
    attribute of the tag has value true then one message
    should be displayed otherwise a different message
    should be displayed.try this:
    <xsl:template name="selected-unselected">
         <xsl:paramm name="currentTag">Quick-Quote</xsl:param>
         <xsl:if test="./*[name()=$currentTag]/@selected='true'">
              <xsl:text>checked</xsl:text>
         </xsl:if>
         <xsl:if test="./*[name()=$currentTag]/@selected='false'">
              <xsl:text>Unchecked</xsl:text>
         </xsl:if>
    </xsl:template>

Maybe you are looking for

  • [bug locked] How do I edit a pdf file?

    I have a paper document that I need to update once a year.  It is rather long.  I cannot find the word file used to create this document.  I have scanned this document at work but it is in pdf form so I currently cannot edit it. Do I need to buy a ce

  • Can I bypass not being able to run PowerPC applications on my mac?

    Is it possible to bypass the "You cannot open the open because PowerPC applications are no longer supported"? I can't find anything and I need to get past it to instal a game. My macbook pro w/out retina runs the latest version of mavericks by the wa

  • Drag and drop from/to JTable

    Hi, I am trying to implement drag and drop between two JTables. I have two questions about this and I hope you can help me. 1. I would like to prevent the user from droping an Object in the same JTable as the object came from in the first place. How

  • RFC Sender EOIO, is it possible?

    Hi ! We have a RFC-XI-FTP scenario. We need to build files in the FTP server using the contents received by the RFC sender from R/3. The problem is that we need to ensure that the files are rebuilt exactly on the FTP server side. We are NOT allowed t

  • New Camera RAW to DNG but DNG not recognised

    I recently purchased a Sony Cybershot RX100M3. The RAW files are Sony's ARW2. I have Photoshop CS4 and Bridge. Naturally they won't recognise the new RAW files. I converted then to DNG using Adobe DNG converter. However CS4 and Bridge would not recog