Row to Column XSL Transform in BLS

I have 11.5, sr3.
I was going to use the XSLTransformation action to swap rows and columns of a data set using /Illuminator/stylesheets/RowToColumnTransform.xsl. I cannot get anything but the following as an output:
<?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2007-12-12T13:27:29" EndDate="2007-12-03T08:09:17" StartDate="2007-12-03T08:09:17" Version="11.5.3"><Rowset><Columns/><Row/></Rowset></Rowsets>
There are no errors, I just don't get the result. The input data set is as follows:
<?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2007-12-12T13:27:29" EndDate="2007-12-03T08:09:17" StartDate="2007-12-03T08:09:17" Version="11.5.3"><Rowset><Columns><Column Description="" MaxRange="1" MinRange="0" Name="User_ID" SQLDataType="1" SourceColumn="User_ID"/><Column Description="" MaxRange="1" MinRange="0" Name="User_Name" SQLDataType="1" SourceColumn="User_Name"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_Number" SQLDataType="4" SourceColumn="Sample_Number"/><Column Description="User Name" MaxRange="1" MinRange="0" Name="Login_By" SQLDataType="1" SourceColumn="Login_By"/><Column Description="Examination Type" MaxRange="1" MinRange="0" Name="Examination" SQLDataType="1" SourceColumn="Examination"/><Column Description="" MaxRange="1" MinRange="0" Name="Examination_Title" SQLDataType="1" SourceColumn="Examination_Title"/><Column Description="" MaxRange="1" MinRange="0" Name="Examination_Desc" SQLDataType="1" SourceColumn="Examination_Desc"/><Column Description="" MaxRange="1" MinRange="0" Name="Test_Number" SQLDataType="4" SourceColumn="Test_Number"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_Time" SQLDataType="93" SourceColumn="Sample_Time"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_Status" SQLDataType="1" SourceColumn="Sample_Status"/><Column Description="" MaxRange="1" MinRange="0" Name="Authorize" SQLDataType="1" SourceColumn="Authorize"/><Column Description="" MaxRange="1" MinRange="0" Name="Total_Defects" SQLDataType="4" SourceColumn="Total_Defects"/><Column Description="" MaxRange="1" MinRange="0" Name="Carton_Code_Date" SQLDataType="1" SourceColumn="Carton_Code_Date"/><Column Description="" MaxRange="1" MinRange="0" Name="Package_Code_Date" SQLDataType="1" SourceColumn="Package_Code_Date"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_1_Container" SQLDataType="1" SourceColumn="Sample_1_Container"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_2_Container" SQLDataType="1" SourceColumn="Sample_2_Container"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_1_Container_Get" SQLDataType="1" SourceColumn="Sample_1_Container_Get"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_2_Container_Get" SQLDataType="1" SourceColumn="Sample_2_Container_Get"/><Column Description="" MaxRange="1" MinRange="0" Name="Machine_Scanned" SQLDataType="1" SourceColumn="Machine_Scanned"/><Column Description="" MaxRange="1" MinRange="0" Name="Machine_Shift_Flag" SQLDataType="4" SourceColumn="Machine_Shift_Flag"/><Column Description="" MaxRange="1" MinRange="0" Name="Maker_Name" SQLDataType="1" SourceColumn="Maker_Name"/><Column Description="" MaxRange="1" MinRange="0" Name="Packer_Name" SQLDataType="1" SourceColumn="Packer_Name"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_Size" SQLDataType="4" SourceColumn="Sample_Size"/><Column Description="SAP Product Code of the associated Cigarette Audit if Linked" MaxRange="1" MinRange="0" Name="Associated_Cig_Audit_SAP_Code" SQLDataType="1" SourceColumn="Associated_Cig_Audit_SAP_Code"/><Column Description="SAP Product Code of the associated Pack Audit if Linked" MaxRange="1" MinRange="0" Name="Associated_Pack_Audit_SAP_Code" SQLDataType="1" SourceColumn="Associated_Pack_Audit_SAP_Code"/><Column Description="Sample Number of the associated CIg Audit if Linked" MaxRange="1" MinRange="0" Name="Associated_Cig_Audit_Sample_Number" SQLDataType="1" SourceColumn="Associated_Cig_Audit_Sample_Number"/><Column Description="Sample Number of the associated Pack Audit if Linked" MaxRange="1" MinRange="0" Name="Associated_Pack_Audit_Sample_Number" SQLDataType="1" SourceColumn="Associated_Pack_Audit_Sample_Number"/><Column Description="" MaxRange="1" MinRange="0" Name="Machine_SAP_Code" SQLDataType="1" SourceColumn="Machine_SAP_Code"/><Column Description="" MaxRange="1" MinRange="0" Name="Machine_SAP_Desc" SQLDataType="1" SourceColumn="Machine_SAP_Desc"/><Column Description="" MaxRange="1" MinRange="0" Name="Maker_SAP_Code" SQLDataType="1" SourceColumn="Maker_SAP_Code"/><Column Description="" MaxRange="1" MinRange="0" Name="Maker_SAP_Desc" SQLDataType="1" SourceColumn="Maker_SAP_Desc"/><Column Description="" MaxRange="1" MinRange="0" Name="Packer_SAP_Code" SQLDataType="1" SourceColumn="Packer_SAP_Code"/><Column Description="" MaxRange="1" MinRange="0" Name="Packer_SAP_Desc" SQLDataType="1" SourceColumn="Packer_SAP_Desc"/><Column Description="" MaxRange="1" MinRange="0" Name="Action" SQLDataType="1" SourceColumn="Action"/></Columns><Row><Sample_Number>46</Sample_Number><Examination>MKNG_PQC_PACK</Examination><Examination_Title>PQC Pack Audit</Examination_Title><Examination_Desc>Making &amp; Packing PQC Pack Audit Sample Template</Examination_Desc><User_ID>clmf90</User_ID><User_Name></User_Name><Login_By>SYSTEM</Login_By><Test_Number>63</Test_Number><Sample_Time>2007-12-12T13:46:52</Sample_Time><Sample_Status>Complete</Sample_Status><Authorize>No</Authorize><Total_Defects>1</Total_Defects><Carton_Code_Date>-</Carton_Code_Date><Package_Code_Date>7T28D205 11:30</Package_Code_Date><Sample_1_Container>01-01</Sample_1_Container><Sample_2_Container>-</Sample_2_Container><Sample_1_Container_Get>01-01</Sample_1_Container_Get><Sample_2_Container_Get>-</Sample_2_Container_Get><Machine_Scanned>U-MAKER-205</Machine_Scanned><Maker_Name>0205</Maker_Name><Machine_Shift_Flag>1</Machine_Shift_Flag><Packer_Name>0205</Packer_Name><Sample_Size>2</Sample_Size><Associated_Cig_Audit_SAP_Code>2001155</Associated_Cig_Audit_SAP_Code><Associated_Pack_Audit_SAP_Code>-</Associated_Pack_Audit_SAP_Code><Associated_Cig_Audit_Sample_Number>MKNG-PQC-CIG-20071128-0004</Associated_Cig_Audit_Sample_Number><Associated_Pack_Audit_Sample_Number>---</Associated_Pack_Audit_Sample_Number><Machine_SAP_Code></Machine_SAP_Code><Machine_SAP_Desc>MAVERICK LT MENT 100</Machine_SAP_Desc><Maker_SAP_Code>2001155</Maker_SAP_Code><Maker_SAP_Desc>MAVERICK LT MENT 100</Maker_SAP_Desc><Packer_SAP_Desc>MAVERICK LT MENT 100</Packer_SAP_Desc><Packer_SAP_Code></Packer_SAP_Code></Row></Rowset></Rowsets>
What am I missing?

Sparks,
Any reason you are not using the VerticalGrid Applet?
Did you specify any of the parameters required by the XSL, such as ColumnID and ValueID?
The XSL appears to only translate a single row node to a column....
Try using this XSL:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="xalan java">
     <xsl:output encoding="UTF-8" method="xml" media-type="text/xml"/>
     <xsl:template match="/">
          <Rowsets DateCreated="{Rowsets/@DateCreated}" Version="{Rowsets/@Version}" StartDate="{Rowsets/@StartDate}" EndDate="{Rowsets/@EndDate}">
               <xsl:for-each select="Rowsets">
                    <xsl:copy-of select="FatalError"/>
                    <xsl:copy-of select="Messages"/>
                    <xsl:copy-of select="HyperLinks"/>
                    <xsl:if test="count(/Rowsets/FatalError) = '0'">
                         <Rowset>
                              <Columns>
                                   <Column Name="Name" SourceColumn="Name" Description="Name" SQLDataType="1" MinRange="0.0" MaxRange="1.0"/>
                                   <Column Name="Value" SourceColumn="Value" Description="Value" SQLDataType="1" MinRange="0.0" MaxRange="1.0"/>
                              </Columns>
                              <xsl:for-each select="/Rowsets/Rowset/Row/*[name()]">
                                   <Row>
                                        <xsl:element name="Name">
                                             <xsl:value-of select="name(.)"/>
                                        </xsl:element>
                                        <xsl:element name="Value">
                                             <xsl:value-of select="."/>
                                        </xsl:element>
                                   </Row>
                              </xsl:for-each>
                         </Rowset>
                    </xsl:if>
               </xsl:for-each>
          </Rowsets>
     </xsl:template>
</xsl:stylesheet>
Sam

Similar Messages

  • Javax.xml.transform.TransformerException durin XSL Transformation in Java

    Hi,
    Below is my piece of code where i access a web service that returns a xml as a string. I apply a xsl tranformation on it and try to store the result as a string. I get this error message
    javax.xml.transform.TransformerException: Result object passed to ''{0}'' is invalid.
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(Unknown Source)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
         at NewService.main(NewService.java:52)My Code:
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.StringReader;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.rmi.RemoteException;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.ServiceException;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.stream.StreamSource;
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    public class NewService {
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              String endPoint = "http://localhost:8080/SampleDynamicWebProj/services/SampleClient";
              Service service = new Service();
              Call callOne;
              try {
                   callOne = (Call) service.createCall();
                   callOne.setTargetEndpointAddress(new URL(endPoint));
                   callOne.setOperationName(new QName("http://DefaultNamespace",
                             "getXMLString"));
                   String concated = (String) callOne.invoke(new Object[] { "s" });
                   InputStream xsltFile = new FileInputStream("xslpackage/empTran.xsl");
                   Source xmlSource = new StreamSource(new StringReader(concated));
                 Source xsltSource = new StreamSource(xsltFile);
                 TransformerFactory transFact =
                    TransformerFactory.newInstance();
                 Transformer trans = transFact.newTransformer(xsltSource);
                 Result result = new StreamResult();
                 trans.transform(xmlSource, result);
                 System.out.println(result.toString());
              } catch (ServiceException e) {
                   e.printStackTrace();
              } catch (MalformedURLException e) {
                   e.printStackTrace();
              } catch (RemoteException e) {
                   e.printStackTrace();
              } catch (FileNotFoundException e) {
                   e.printStackTrace();
              } catch (TransformerConfigurationException e) {
                   e.printStackTrace();
              } catch (TransformerException e) {
                   e.printStackTrace();
    }I get the transformed XML into a Result object, but when i do a toString() oon it, i get the above exception.
    any help wil be appreciated,
    Dilip

    Oh well, yes it was a typo in address tag...ok agreed that its a bad example, check this out then,
    i have a XML data that i convert to a html format using xsl transformation, now this converted html has to be shown in a html page(i use the out.write option).
    so my initial xml looks like this ::
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Results>
        <ColumnCount>6</ColumnCount>
        <Columns>
            <column>UID</column>
            <column>UserName</column>
            <column>Password</column>
            <column>LastName</column>
            <column>FirstName</column>
            <column>EmailAddress</column>
        </Columns>
        <Rows>
            <Row>
                <value>1</value>
                <value>userone</value>
                <value>password-1</value>
                <value>Anant</value>
                <value>Dilip</value>
                <value>[email protected]</value>
            </Row>
            <Row>
                <value>2</value>
                <value>usertwo</value>
                <value>password-2</value>
                <value>Palli</value>
                <value>Gilli</value>
                <value>[email protected]</value>
            </Row>
        </Rows>I apply XSL transformation on this to get a HTML which i will be writing into my output screen hoping that the user will see it in a tabular format!
    <[!CDATA["
    <?xml version="1.0" encoding="UTF-8"?>
    <table border="1">
    <tr bgcolor="#9acd32">
    <th align="left">UID</th>
    <th align="left">UserName</th>
    <th align="left">Password</th>
    <th align="left">LastName</th>
    <th align="left">FirstName</th>
    <th align="left">EmailAddress</th>
    </tr>
    <tr>
    <td>1</td>
    <td>userone</td>
    <td>password-1</td>
    <td>Anant</td>
    <td>Dilip</td>
    <td>[email protected]</td>
    </tr>
    <tr>
    <td>2</td>
    <td>usertwo</td>
    <td>password-2</td>
    <td>Palli</td>
    <td>Gilli</td>
    <td>[email protected]</td>
    </tr>
    </table>
    "]]>The entire data is passed to a XML parser . I want the transformed xml data (which will be inside a <status></status> tag to be untouched by this parser. As you see i have put the transformed xml in a CDATA tag, but this aint helping me...
    need urgent help,
    Dilip

  • Error: "... is not a table ..." XML not correctly interpreted after XSL-transformation. Table row quantity problem.

    Hey guys, this is one of my xml-elements:
    Jaspreet Sohi 12 18 Juliane Lenz 11 17 Sophie Charlotte Stender 10 15 Rosbeh Hamidzadeh Khayyat 12 17 Lion Stoldt 12 17 Mats Lucas Meincke 6 8 Bero Luke Vincent Ernst 6 8 Cedric Roth 6 8 Soner Cantay 6 8 The following XSL Transformation I use once for transforming all "m" tags and once in order to transform all "j" tags. Please imagine the CSL-code below to be duplicated exactly. Only the "jungs"-table-Tag is replaced by "mädchen" and all underscores _j are replace by _m. As well all "select="j[@..." parts are replaced by "select="m[@...". 1 2 3 The code is very easygoing I think and not difficult to understand. As I said, I use it twice - for both transformations. The very, extremely weird thing, my problem, is that one transformation works perfectly in InDesign and a table is created for all "kategorie"-tags (all is set within a for-each loop). But the second script does not work! I simply do not get this I can't understand it. I've tried more than anything. InDesign sais (in German, so translated based on assumption) "jungs is an invalid table element or is displayed in wrong order". The second strange thing is that I can replace my "aid:trows" attribute by any number, e.g. "10" and immediately the script works fine (as there are never more than 6 "j" tags in my XML so that never the table has more than 6 rows"). But it does not want to work correctly with the actual number, my variable "rows_j". These are my variables: They are all defined before the tables for m and j are created. So finally, why (the heck) is one table created and interpreted perfectly whereas the second - immediately following the first in the XSL.script as an EXACT copy of the first - results in an error? As i've already said, I've tried really everything. For example the script works also when one of the parts "" is randomly deleted from the script. Removing one of these parts directly makes the script working. Just one of my attempts to understand the thing but this has only shown that none of these parts "cell to end-for-each" includes an error. I'm really desperate and looking forward to being rescued by one of you geniuses :)

    Hah, No worries. The forum software is, well, different.
    What would be better, though, would be a sample ID file, any XSLT/XLT files you use, and a bit of data exactly as you have it (pre-transform state). ZIP it up, upload to say dropbox.com and feel free to send me a private message for the download link.
    Too many times there is something different between samples pasted into a post and the real thing that it is sometimes less useful time-wise. I'll keep it private, of course. Then we can communicate via PMs or email until we can (hopefully) arrive together at a solution, then post what that solution is in the forum to benefit others.
    Thank you, Mike

  • Map CdC op transform SEQUENCE and ROW oper column properties

    I am using Map_cdc_op transform, for sequence column and row operation column properties, what fields should i choose?
    My source table has the following columns:
    RMID - primary key int
    RMName - varchar
    created_date datetime
    Last_updated datetime
    target table also has above 4 columns plus one rmLogID column with int data type. which is key column in target.
    does map_cdc_op transform also take care of the surrogate key column id in target? which is "rmlogid".
    thank you very much for the helpful info.

    Suneer I am using SQL serverdatabase, this table is dragged to workspace as source:
    RMID - primary key int
    RMName - varchar
    created_date datetime
    Last_updated datetime
    My task is to capture data changes from this table to target table, for that i a using Map_op_CDC transform, now under the properties SEQUENCE and ROW oper column what fields should i pic.I never used this transform before.
    RMid is the primary key in source, rest teh of teh fields are changeable. i track created_dt and last_updated dates for that row.
    Thanks a lot for the helpful info.

  • Transformation of Rows to Column in HANA

    Hi All,
    I have a requirement of converting rows to columns.
    For Ex -
    I have date in my view as below -
    My requirement is I want to convert the above in columnar structure as -
    Please suggest how can I achieve the same.
    Regards,
    Nakul Kothari
    +9987039379

    Hi Nakul,
    There have the points you need to reach your goal, see what would be in SQL:
    select
      status_start_date,
      sum(s1) as s_Initiated,
      sum(s2) as s_cleared,
      sum(s3) as s_scf_associated,
      sum(s4) as s_scf_supervisor
    from (
    select status_start_date,count(*) as s1,0 as s2,0 as s3,0 as s4 from _sys_bic."Spend/AT_GES_CLAIMS_FLAG_DTLS"
    where status_start_date between '2014-01-24' and '2014-01-30' and status='Initiated'
    group by status_start_date
    union all
    select status_start_date,0 as s1,count(*) as s2,0 as s3,0 as s4 from _sys_bic."Spend/AT_GES_CLAIMS_FLAG_DTLS"
    where status_start_date between '2014-01-24' and '2014-01-30' and status='Cleared'
    group by status_start_date
    union all
    select status_start_date,0 as s1,0 as s2,count(*) as s3,0 as s4 from _sys_bic."Spend/AT_GES_CLAIMS_FLAG_DTLS"
    where status_start_date between '2014-01-24' and '2014-01-30' and status='Seek Clarification from Associate'
    group by status_start_date
    union all
    select status_start_date,0 as s1,0 as s2,0 as s3,count(*) as s4 from _sys_bic."Spend/AT_GES_CLAIMS_FLAG_DTLS"
    where status_start_date between '2014-01-24' and '2014-01-30' and status='Seek Clarification from Supervisor'
    group by status_start_date
    group by status_start_date
    Regards, Fernando Da Rós

  • XSL Transformation Action Parameters

    Does anyone know how, or even if it's possible, to pass parameters to an XSLT stylesheet using the XSL Transformation action in a Business Logic Transaction?

    Som,
    The parameter I was referring to is not an action parameter, but a parameter in the XSLT itself. E.G. the following extracts a column from an xMII document and creates a new doc with that one column. But I want to name the column at run time, so I can use the same XSLT in various places.
    [code]
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:param name="ColumnToExtract" select="ProductAshDry"></xsl:param> <xsl:template match="/">
        <Rowsets DateCreated="2007-05-31T10:58:25" EndDate="2007-05-31T10:58:25" StartDate="2007-05-31T10:58:25" Version="11.5.2">
          <Rowset>
            <Columns>
              <Column Description="Item" MaxRange="0" MinRange="0" Name="Data" SQLDataType="1" SourceColumn="Data"/>
            </Columns>
            <xsl:for-each select="/Rowsets/Rowset/Row">
              <Row>
                <Data>
                  <xsl:value-of select="$ColumnToExtract"/>
                </Data>
              </Row>
            </xsl:for-each>
          </Rowset>
        </Rowsets>
      </xsl:template>
    </xsl:stylesheet>
    [/code]
    ColumnToExtract is a parameter for the XSLT, which can be set at runtime with various other transform engines. I just can't see a way to set it using the xMII XSL Transformation action.
    Regards,
    Bill

  • XSL Transformation to Oracle Canonical Format

    XSL Transformation to Oracle Canonical Format
    Posted: Aug 6, 2007 9:31 AM Reply
    I am having issues with transforming XML into Oracle Canonical Format. Can someone, please tell me what am doing wrong?
    The source XML:
    <transform>
    <key old="driver" new="3" transform1="specified">
    <value old="-1" new="-1" description="NA" />
    <value old="0" new="0" description="no" />
    <value old="1" new="1" description="yes" />
    </key>
    </transform>
    I must transform it with XSL into Oracle Canonical format:
    <ROWSET>
    <ROW>
    <column_name_1 />
    <column_name_2 />
    <column_name_3 />
    </ROW>
    <ROW>
    <column_name_1 />
    <column_name_2 />
    <column_name_3 />
    </ROW>
    </ROWSET>
    So, I came up with this stylesheet.
    <?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <ROWSET table = "table4xml">
    <ROW num ="1">
    <KEY_OLD>
    <xsl:value-of select="@old" />
    </KEY_OLD>
    <KEY_NEW>
    <xsl:value-of select="@new" />
    </KEY_NEW> <TRANSFORM1>
    <xsl:value-of select="@transform1" />
    </TRANSFORM1>
    <VALUEOLD>
    <xsl:value-of select="@valueold" />
    </VALUEOLD>
    <VALUENEW>
    <xsl:value-of select="@valuenew" />
    </VALUENEW>
    <DESCRIPTION>
    <xsl:value-of select="@description" />
    </DESCRIPTION>
    </ROW>
    </ROWSET>
    </xsl:template>
    </xsl:stylesheet>
    Table TABLE4XML
    KEY
    KEY_OLD
    KEY_NEW
    TRANSFORM1
    VALUEOLD
    VALUENEW
    DESCRIPTION
    I must have made a mistake within the XSL code, because the PL/SQL procedure that am using inserts a row of NULLs into the table.
    Am I correct that the given XML file should look in canonical format as this??
    <ROWSET>
    <ROW>
    <key>
    <old>driver</old>
    <new>3</new>
    <transform1>specified</transform1>
    <value>
    <old>-1</old>
    <new>-1</new>
    <description>NA</description>
    </value>
    </key>
    </ROW>
    </ROWSET>

    There is a misunderstanding in your question. Oracle canonical format has a root node named <rowset> and its children have the name of <row>. And its grandchildren have the name of <column>. This is all of canonical family, no other grand-grand-children :)
    Also here is an example for null values in canonical format. They are not presented in XML.
    SQL> set serveroutput on
    SQL> select null "col1", 'data' "col2" from dual;
    c col2
    data
    SQL> DECLARE
    2 ctx dbms_xmlgen.ctxHandle;
    3 xml CLOB;
    4 BEGIN
    5 ctx := dbms_xmlgen.newContext('select null "col1", ''data'' "col2" from dual');
    6 dbms_output.put_line(ctx);
    7
    8 xml := dbms_xmlgen.getXML(ctx);
    9 dbms_output.put_line(xml);
    10
    11 dbms_xmlgen.closeContext(ctx);
    12 END;
    13 /
    8
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <col2>data</col2>
    </ROW>
    </ROWSET>
    PL/SQL procedure successfully completed.
    Best Regards
    Erturk

  • How to get xsql page-param on xsl transform?

    On the xsql file a page-param is set. If param does not exist then have do insert new record into master table, then requery for the value to set-page-param.
    How do call the page-param on xsl transform file used in xsql:insert-request?
    <xsql:set-page-param bind-params="cwMedRecNo" name="org_client_id">
    select client_id from org_client
    where chart_number = ?
    and active_ind = 'Y'
    and provider_organization_id = 71
    </xsql:set-page-param>
    <xsql:if-param name="org_client_id" exists="no">
    <!-- Client_Id doesn't exist, get next sequence number value-->
    <xsql:set-page-param name="org_client_id">
    select client_id_s.nextval from dual
    </xsql:set-page-param>
    <!--insert patient into org_client table-->
    <xsql:dml bind-params="org_client_id cwMedRecNo" commit="yes">
    insert into client (organization_id, client_id, chart_number, active_ind, last_updated_date, administered_ind)
    values
    (000, ?, ?, 'Y', sysdate, 'Y')
    </xsql:dml>
    </xsql:if-param>
    <xsql:set-page-param name="s_org_client_id" value="{@org_client_id}" />
    <xsql:insert-request
    table="immunization"
    columns="client_id organization_id site_id vaccination_date last_updated_date entered_by_org_id vaccine_id source_id contraindication_code refused_code elsewhere_code active_record HISTORICAL_IND"
    transform="dme_data_entry_immunization.xsl"
    commit-batch-size = "1" />
    In the dme_data_entry_immunization.xsl file. The element client_id comes back null.
    <rowset xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
    <xsl:for-each select="/request/parameters/*">
    <row>
    <xsl:element name="client_id"><xsl:value-of select="//s_org_client_id"/></xsl:element>
    <xsl:element name="vaccine_group_code">
    <xsl:choose>
    <xsl:when test="item_no = 145">PNEU</xsl:when>
    <xsl:when test="item_no = 144">FLU</xsl:when>
    <xsl:otherwise></xsl:otherwise>
    </xsl:choose>
    </xsl:element>
    </row>
    </rowset>

    Hi J
    Have you added the <<Page()>> and <<PageCount()>> functions on the reports?
    FR does not (or certainly did not) add page numbers to the reports in books unless you manually add them. I always used to add a text box in the footer of the report and insert functions like this. It has been a while since I did it (I haven't on 11.1.2.1 for example) but I think that if you do this the page number corresponds to the page within the book and not the page of the report (if a multi-page report). It may not take account of a TOC page though.
    Hope this helps
    Stuart

  • XSL Transformation error source

    I am using MII 12.0 and I am getting the following error in the log file:
    javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sap.engine.services.servlets_jsp.server.exceptions.WebIOException: An attempt to write after the stream had been closed.
    The problem is that I am not using and XSL transforms that I know of. What BLS action might generate this error other than the obvious XSL Transformation Action?
    Thanks.
    ...Sparks

    I found this thread:
    [Re: IDOC error|Re: IDOC error]
    Is your system set up to receive any idocs?
    Edited by: Christian Libich on Feb 8, 2010 10:00 PM

  • XSL Transformation won't run in Web Start

    Hello,
    I am using the javax.xml.transform.Transformer implementation built into Java 1.5.x to transform an XML document into HTML using an XSLT transformation source. This code works perfectly if I run the app outside of Java Web Start. However, if I run the app in web start, the output is partial. More specifically, the XML and the XSLT load just fine in web start (I've confirmed this), but the end result of the Transformation is a properly formatted HTML document with only part of the data -- a bunch of data is missing.
    I have some loops in the XSLT that print out rows in an HTML table with the data I want to see. These loops don't seem to run when I'm in web start, but the rest of the transformation does run.
    I've confirmed this is not working on both Mac OS and Windows, version 1.5.0_06 and 1.5.0_09. So I don't think it is a bug on any particular platform. I am totally stumped by this. The XSL transformation process is doing something different in web start than it does when run from the command line (either different jars are in play, or system properties are different, etc).
    Has anyone else experienced this?
    Thank You,
    Eric

    One thing I'd like to mention...
    My XML document has no namespace defined, and neither does my XSLT transform document. I am just referencing plain old string element names that simply match between the XML and XSLT. This all works fine when the Transform is run from a java app that is started on the command line. Things break down when the app is run via Java Web Start. Could the namespace issue be the problem, however? I don't see how that could be as the code works from a 'normal' java app, but maybe I'm missing something.

  • Using a bpmn variable in xsl transformation

    Hi,
    I am creating a BPMN process in which the first call is to a find service.
    Passing the values directly to the service call fails as it says the parameter "value[]" is required(and it is nested again and again in the schema).
    To pass the data to the service I created an xsl transformation, which allows us to select what goes in the payload and what not (Adding a choose node).
    But the xsl transformation needs the source schema and the target schema. Since this is the first service call so I don't have a schema based object which is already populated.
    So I created a custom object of the type of the request object of the service I want to use and used it as the source and the service call arguments as the target.
    And before the service call I used a script activity to pass the value which came to me from the payload of the bpm process to the dummy object i created which will then be used in transformation.
    But the bpm process gets suspended on the script task which tries to pass the variable to the xsl transformation.
    Please guide me, how to resolve this problem.

    To paraphrase your question: Can the value stored in a property of the ActiveDocument object be used as part of the string to define a computed column in a Result?
    Yes

  • Conditional Formating of rows and columns in template(cross tab)

    Hi,
    I am developing a cross tab report in which I have row header as the year like 2008,2007,2006....column header as months jan,feb,mar...and the data area contains the respective data...I need to format the background color of the rows and columns which are below the date of the report(report is ran for a particular month like mar-08)..I was able to format the background color of all the rows that fall below(ex:08) the year of the report(using <?if@row:row_name<'$first'?> <xsl::attribute name="background-color" xdofo:ctx="incontext">#C0D27F</xsl::attribute><?end if?>)..
    and I need to format the 3(till march) columns in the yr 2008
    Thanks...

    Hello..
    Thanks for the reply...
    I have report date as mm|yyyy...below is a sample data of the cross tab..
    <Q1>
    <REPORT_DATE>04|2005</REPORT_DATE>
    </Q1>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>JAN</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2004</BEGIN_DATE>
    <NET_ROR>1.32</NET_ROR>
    <ACTUAL_DATE>01/01/2004</ACTUAL_DATE>
    <FUND_FACT_YTD>7.942192987387475647074276803933198866</FUND_FACT_YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>JAN</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2005</BEGIN_DATE>
    <NET_ROR>-.21</NET_ROR>
    <ACTUAL_DATE>01/01/2005</ACTUAL_DATE>
    <FUND_FACT_YTD>5.739540457478967975310388578877768035</FUND_FACT_YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>FEB</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2004</BEGIN_DATE>
    <NET_ROR>.59</NET_ROR>
    <ACTUAL_DATE>02/01/2004</ACTUAL_DATE>
    <YTD>7.942192987387475647074276803933198866</YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>FEB</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2005</BEGIN_DATE>
    <NET_ROR>1</NET_ROR>
    <ACTUAL_DATE>02/01/2005</ACTUAL_DATE>
    <YTD>5.739540457478967975310388578877768035</YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>MAR</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2004</BEGIN_DATE>
    <NET_ROR>0</NET_ROR>
    <ACTUAL_DATE>03/01/2004</ACTUAL_DATE>
    <YTD>7.942192987387475647074276803933198866</YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>MAR</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2005</BEGIN_DATE>
    <NET_ROR>-.2</NET_ROR>
    <ACTUAL_DATE>03/01/2005</ACTUAL_DATE>
    <YTD>5.739540457478967975310388578877768035</YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>APR</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2004</BEGIN_DATE>
    <NET_ROR>-.07</NET_ROR>
    <ACTUAL_DATE>04/01/2004</ACTUAL_DATE>
    <FUND_FACT_YTD>7.942192987387475647074276803933198866</FUND_FACT_YTD>
    </Q4>
    <Q4>
    <CLASS_ID>1</CLASS_ID>
    <MONTH_BEGIN_DATE>APR</MONTH_BEGIN_DATE>
    <BEGIN_DATE>2005</BEGIN_DATE>
    <NET_ROR>-.87</NET_ROR>
    <ACTUAL_DATE>04/01/2005</ACTUAL_DATE>
    <YTD>5.739540457478967975310388578877768035</YTD>
    </Q4>
    MONTH_BEGIN_DATE goes as the column header, BEGIN_DATE goes as the row header and NET_ROR is the data area..I need to get the background color of each cell of NET_ROR below the report date as one color...
    Thanks ..

  • DBUri and xsl transform  hanging

    Hi All,
    I'm using the DBUriServlet (oradb) to access XML data stored in Oracle. If I query the data without transforming it, E.g. http://&lt;machine&gt;:&lt;port&gt;/oradb/TABLE_NAME/...etc...?contenttype=text/xml&rowsettag=&lt;row-tag&gt;
    Everything works fine and returns the XML in seconds.
    I've got and Xpath index setup that seems to be working, according to execution plan.
    However, if I try and transform this data using xsl, by feeding in "transform" on the query-string I never receive the results in the browser. E.g
    http://.../oradb/..?transform=/public/xsl/trans.xsl&contenttype=text/html&rowsettag=test
    The data set is trivial, 20 xml files (10-30kB); the XSL is pretty ugly but other transformers handle it OK. I've tried it with msxsl and xalan, and have no problems; however, running it through the DBUriServlet as above, causes the Oracle process to eat huge amounts of memory (very low CPU usage) and never hang.
    Anyone seen this behaviour? Any ideas what to look at? Also, is anyone out there using this Servlet to access the data in a production environment? Or is the servlet only meant for demos/evaluations?
    Env = 9.2.0.3 on Solaris 64 or Windows 2000.
    Thanks for your help, I'm stumped and the clock stopped ticking on this project months ago! ;)
    John

    Thanks for the reply.
    If I try
    select xdburitype('path to xsl').transform(xdburitype('path to xml')) from dual;
    I get ORA-00904: "SYS"."XDBURITYPE"."TRANSFORM": invalid identifier. From the docs I think transform is a function of xmltype. Please correct me if I'm wrong.
    However, I tried the following:
    SELECT XMLTransform( xdbUriType(path to xml).getXML( ), xdbUriType(path to xsl).getXML( ) ).getClobVal( ) FROM DUAL;
    I get the first 4 lines of the HTML output. Irrespective of whay I set serveroutput or linessize to.
    One thing to mention, if I use DBUri and via xpath limit the resultset of the query to be a single XML file returned, the transform works fine.
    I appreciate your helps.
    Cheers,
    John

  • Multiple XSL Transformations in ASP

    Dreamweaver will permit multiple inserts of XSL
    Transformations in PHP but when attempting the same in ASP -after
    inserting and testing the first, the option: Insert >
    Application Object > XSL Transformation is greyed out.
    If I try pasting in the transformation code I get a server
    error. Separately both XSL transformations work fine.
    I need to import two RSS feeds - does anyone have a clue what
    I'm doing wrong or know why this is not permitted in ASP?

    Yes.
    You can post the XSL transformations one after another.
    Take a look at my code for inserting data into 5 different tables:
    <?xml version="1.0"?>
    <database connection="dvddb" xmlns:xsql="urn:oracle-xsql">
    <xsql:include-request-params/>
    <xsql:set-stylesheet-param name="maxdvdid">
    SELECT tbl_dvd_sequence.NEXTVAL
    FROM TBL_DVD
    </xsql:set-stylesheet-param>
    <xsql:insert-request table="TBL_DVD" transform="/dvd/xsl/admin/tbldvdtransform.xsl"/>
    <xsql:insert-request table="LNK_DVD_FEATURE" transform="/dvd/xsl/admin/lnkdvdfeaturetransform.xsl"/>
    <xsql:insert-request table="LNK_DVD_STARS" transform="/dvd/xsl/admin/lnkdvdstartransform.xsl"/>
    <xsql:insert-request table="LNK_DVD_GENRE" transform="/dvd/xsl/admin/lnkdvdgenretransform.xsl"/>
    <xsql:insert-request table="LNK_DVD_DIRECTOR" transform="/dvd/xsl/admin/lnkdvddirectortransform.xsl"/>
    </database>
    <?xml-stylesheet type="text/xsl" href="/dvd/xsl/admin/createeditdeleteuserdvdconfirm.xsl"?>What I've done here is pull out the ID value from the main table that I'm updating. For these purposes lets just say the value is 10. I then use that variable in each of the XSL files to update each particular table.
    The ID is a foreign key for the other 4 tables, so they all update with the correct ID. If I submit one record or 100 records, they will all share the same unique row ID in the database.
    Hope that helps.
    Malik Graves-Pryor

  • CPO XSL Transform for CPSC Form data with Grid

    Does anyone have an XSL Transform worked out that conveniently parses the CPSC Form output from Service Link when it has a grid in it?
    For example the data from CPSC Service Link might look like:
    <root>
       <Common>
          <Action ClassID="">Some Action</Action>
          <RequisitionID>123</RequisitionID>
       </Common>
       <Attributes/>
       <FormData>
          <Dictionary.Field>Some Data</Dictionary.Field>
          <DictionaryWithGrid-1.Field1>somevalue</DictionaryWithGrid-1.Field1>
          <DictionaryWithGrid-1.Field2>someothervalue</DictionaryWithGrid-1.Field2>
          <DictionaryWithGrid-1.Field3>yetanothervalue</DictionaryWithGrid-1.Field3>
          <DictionaryWithGrid-2.Field1>somevalue2</DictionaryWithGrid-2.Field1>
          <DictionaryWithGrid-2.Field2>someothervalue2</DictionaryWithGrid-2.Field2>
          <DictionaryWithGrid-2.Field3>yetanothervalue2</DictionaryWithGrid-2.Field3>
       </FormData>
    </root>
    So the desired output would be
    <Row>
       <Field1>somevalue</Field1>
       <Field2>someothervalue</Field2>
       <Field3>yetanothervalue</Field3>
    </Row>
    <Row>
       <Field1>somevalue2</Field1>
       <Field2>someothervalue2</Field2>
       <Field3>yetanothervalue2</Field3>
    </Row>
    I'm having difficulty getting the right XSL select when the tag is something like 'DictionaryWithGrid-#.Field'.
    Thanks!

    That worked great, Svetlana!  Thank you very much for the help.
    I made some slight mods to make it even more portable and intuitive for XSL/XML beginners.
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          xmlns:msxsl="urn:schemas-microsoft-com:xslt">
    <!-- Replace CHANGEME below with the name of the CPSC Form Dictionary to transform -->
    <xsl:variable name="Dictionary">CHANGEME</xsl:variable>
    <xsl:template match="root">
      <Table>
          <xsl:call-template name="ProcessOne">
            <xsl:with-param name="pos" select="1" />
          </xsl:call-template>
      </Table>
    </xsl:template>
      <xsl:template name="ProcessOne">
        <xsl:param name="pos" />
        <xsl:variable name="RowName" select="concat($Dictionary, '-', $pos)" />
        <xsl:if test="FormData/*[starts-with(name(), $RowName)] != ''">
          <Row>
            <xsl:for-each select="FormData/*[starts-with(name(), $RowName)]">
              <xsl:if test="starts-with(name(.), $RowName)">
                <xsl:variable name="FieldName" select="substring-after(name(.), '.')"/>
                <xsl:element name="{$FieldName}">
                  <xsl:value-of select="."/>
                </xsl:element>
              </xsl:if>
            </xsl:for-each>
          </Row>
          <xsl:call-template name="ProcessOne">
            <xsl:with-param name="pos" select="number($pos+1)" />
          </xsl:call-template>
        </xsl:if>
      </xsl:template>
    </xsl:stylesheet>

Maybe you are looking for

  • Inbound interface was found more than once

    Hi All, Currently I'm working on a scenario wherein an invoice file is generated and created on FTP server, PI system picks up invoice (xml file) and sends to customer via EDI 810. The scenario failed in sxmb_moni and below is the error message. <SAP

  • Business Intelligence Installation Error

    I am having an issue creating a package within BIDS.  So, far my PC has the following installed. 1.  Microsoft Server SQL 2008 R2      a.  Management Studio      b.  SQL Server Business Intelligence Development Tools 2.  Microsoft Visual Studio 2008

  • Original posting date after releasing in ea05

    Hello all, When you release an outsorted print document in Transaction EA05, a dialog box appears in which you enter the posting parameters that are required for the release process. the number of the original print document, posting date, and docume

  • Change "ACCEPT_LANGUAGE" header in Safari

    Hi folks, I just have a small problem with Safari. I live in Germany and want to see e.g. the Apple site from Germany. My MacOS language is Dutch. Is it possible that Safari does not send "NL_nl" but "DE_de" to the websites? I know that there is such

  • Shift Cmd 4 + Space not working (AGAIN)

    Hi, I used to be able to take a screenshot of the active window by pressing Shift Cmd 4 and then space and click, but I dont know why it's not running anymore. Whenever I click Shift Cmd 4 and then space, the grey area covers the whole screen and whe