XMLTYPE.Transform()  issue with namespace-alias

I have an XSLT that uses the namespace-alias. When i use the XMLTYPE.Transform() funtion in oracle it disregards the alias and outputs the stylesheet prefix rather than outputting result prefix
Eg:
The XSLT has the follwing lines:
xmlns:wxsl="http://www.w3schools.com/w3style.xsl"
xmlns:wxmlns="http://temp.xmlns"
<xsl:namespace-alias stylesheet-prefix="wxsl" result-prefix="xsl"/>
<xsl:namespace-alias stylesheet-prefix="wxmlns" result-prefix="xmlns"/>
<wxsl:element name="my:myFields">
</wxsl:element>
The would output the following XML:
<wxsl:element name="my:myFields">
</wxsl:element>
Its just doen't uses the result prefix.
Is this a bug in oracle XMLTYPE.Transform function ?

Please provide a small working example of an XML and XSLT that demonstrates what you have described. Also include your version of Oracle (4 digits i.e. 10.2.0.4). It is easier when others don't have to guess at what you have coded. As a general posting note, see the FAQ in the upper right for how to use the tag to wrap code/SQL/etc to retain formatting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • MBAM 2.5 SPN Issue with DNS alias and reporting

    We have one server with administration and monitoring website and self-service portal setup on it. We have another server with the Databases and the reports running on it. When I initially set it up I set it up with a SPN that matched the host name. At this
    point reporting worked.
    We found that HTTP SPN that matches host/FQDN name ibreaks WINRM to the server (powershell remoting).  See this: https://connect.microsoft.com/PowerShell/feedback/details/751307/psremoting-breaks-because-it-used-spn-name-with-class-http-instead-of-using-wsman
    To fix that we created a DNS alias, mbam.ourdomain.com, and created http SPN's for that account mapped to our MBAM ID
    When we did this we initially got stuck even logging on with single sign-on. we made a change to the endpoint address in the web.config and pointed it to the alias -- this resolved that issue.
    However now when trying to open any one of the reports we get the resource can not be found http 404 error.
    Is this fixable by changing something in a config file somewhere or do I need rebuild the servers and reinstall?

    Yes, We set both of those. We also set the delegation for the apppooluser to "trust this user for delegation to any service".<o:p></o:p>
    Today we uninstalled and reinstalled/configured IIS, the Administration and Monitoring website, and the self-service portal.<o:p></o:p>
     We no longer get an error when clicking on one of the 3 reports. Instead it does nothing. If I choose to open it in another tab or window it
    opens an about:blank page.<o:p></o:p>

  • Free Transform issue with CS4

    So as I've been using CS4 of Photoshop, when I select something with the Lasso tool and use Free Transform to move it around, it automatically creates a copy of whatever I selected to move while the original thing is still in place. This happens randomly. Sometimes it does; sometimes it doesn't. Da hell, bro?

    Lasso - Right Click - Free Transform
    It didn't do it this time. I swear it's random

  • Issue with Column Alias Name in a SELECT statement

    I am trying to run sql query(IN ORACLE) to get the data from a remote database(TERADATA). The query is
    select (table1.exp_date - table1.setup_date) AS day_diff,
    CASE
    WHEN day_diff = '0'
    THEN 'YES'
    WHEN day_diff > '0'
    THEN 'NO'
    ELSE 'Unknown'
    END AS alias_type
    from table1@remote_database_name;
    The query is running fine when I run it in TERADATA environment directly without the remote database link since it is not necessary. If I run the above query in Oracle I am getting an error ORA-00904: invalid identifier.(this error is pointing to day_diff alias name)
    Can anyone help me with this?
    Thanks

    The Column alias can be used in the ORDER BY clause, but not other clauses,like WHERE clause, in the query.
    Use..
    select (table1.exp_date - table1.setup_date) AS day_diff,
    CASE
    WHEN (table1.exp_date - table1.setup_date) = '0'
    THEN 'YES'
    WHEN (table1.exp_date - table1.setup_date) > '0'
    THEN 'NO'
    ELSE 'Unknown'
    END AS alias_type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Transformation issue with EDI 841 xsd generated by document editor

    Hi,
    I was trying to create a B2B Outbound interface with Doc Standard as EDI X12. When our custom payload for item is being mapped to the xsd of doc type 841 (generated using standard ecs with Oracle Doc Editor), the xengine is behaving a little weird. It's generating a file in the output directory for sure, but it's not having all the data I mapped. For Example, I wanted to have a datafile as below:
    ST~841~000000001
    SPI~00~~~~~~04~MF
    AMT~LI~0
    HL~1~~I~0
    SPI~ZZ
    LIN~~PN~ABC
    MSG~ABC
    PID~F~~~~ABC
    REF~ZZ~BaseUOMCode~EA~ZZ>EACH
    SE~38~000000001
    For which I mapped in xslt quite a few elements and corresponding payload that is coming in the console application message is as below:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <Transaction-841 xmlns:ns10="urn:oracle:b2b:X12/V4010/841" Standard="X12"
                     xmlns="urn:oracle:b2b:X12/V4010/841">
      <ns10:Segment-ISA>
        <ns10:Element-I12/>
      </ns10:Segment-ISA>
      <ns10:Segment-GS>
        <ns10:Element-28/>
      </ns10:Segment-GS>
      <ns10:Segment-ST>
        <ns10:Element-143>841</ns10:Element-143>
        <ns10:Element-329>1</ns10:Element-329>
      </ns10:Segment-ST>
      <ns10:Loop-HL>
        <ns10:Segment-HL>
          <ns10:Element-628>1</ns10:Element-628>
          <ns10:Element-735>I</ns10:Element-735>
          <ns10:Element-736>0</ns10:Element-736>
        </ns10:Segment-HL>
        <ns10:Loop-SPI>
          <ns10:Segment-SPI>
            <ns10:Element-786>ZZ</ns10:Element-786>
          </ns10:Segment-SPI>
          <ns10:Segment-LIN>
            <ns10:Element-235>PN</ns10:Element-235>
            <ns10:Element-234>ABC</ns10:Element-234>
          </ns10:Segment-LIN>
          <ns10:Segment-MSG>
            <ns10:Element-933>ABC</ns10:Element-933>
          </ns10:Segment-MSG>
        </ns10:Loop-SPI>
        <ns10:Loop-PID>
          <ns10:Segment-PID>
            <ns10:Element-349>F</ns10:Element-349>
            <ns10:Element-352>ABC</ns10:Element-352>
          </ns10:Segment-PID>
        </ns10:Loop-PID>
        <ns10:Loop-REF>
          <ns10:Segment-REF>
            <ns10:Element-128>ZZ</ns10:Element-128>
            <ns10:Element-127>BaseUOMCode</ns10:Element-127>
            <ns10:Element-352>Ea</ns10:Element-352>
            <ns10:Composite-C040>
              <ns10:Element-128>ZZ</ns10:Element-128>
              <ns10:Element-127>Each</ns10:Element-127>
            </ns10:Composite-C040>
          </ns10:Segment-REF>
        </ns10:Loop-REF>
      </ns10:Loop-HL>
      <ns10:Segment-SE>
        <ns10:Element-96>38</ns10:Element-96>
        <ns10:Element-329>1</ns10:Element-329>
      </ns10:Segment-SE>
      <ns10:Segment-GE>
        <ns10:Element-28/>
      </ns10:Segment-GE>
      <ns10:Segment-IEA>
        <ns10:Element-I12/>
      </ns10:Segment-IEA>
    </Transaction-841>
    However when the file is getting generated, the content misses the LIN Segment and below REF segment. It comes as below:
    ISA~00~          ~00~          ~ZZ~079763140      ~ZZ~V1             ~140901~1118~U~00401~100000012~1~T~>
    GS~GS~079763140~V1~20140901~1118~1012~X~004010
    ST~841~000000001
    SPI~00~~~~~~04~MF
    AMT~LI~0
    HL~1~~I~0
    SE~38~000000001
    GE~1~1012
    IEA~1~100000012
    Below are missing:
    SPI~ZZ
    LIN~~PN~ABC
    MSG~ABC
    PID~F~~~~ABC
    REF~ZZ~BaseUOMCode~EA~ZZ>EACH
    We are on 11G. What could go wrong here? Any help is appreciated.
    Regards,
    Subhadeep

    The problem is resolved after re-upload of ecs and xsd. There was a version mismatch and keeping validation off was generating half cooked file. Thanks for reading.
    Regards,
    Subhadeep

  • OSB 11g - Issue with namespace prefix

    Hi,
    I have a requirement that , whenever I call my target system through business service, always the prefix for a namespace should be 's'.
    I added namespace as -
    s : http://www.starstandards.org/STAR
    When I create request message before calling the Business service, the prefix is -
    star:http://www.starstandards.org/STAR
    In OSB 11g, can we control prefix for a namespace?
    Thanks in Advance

    Disable "Use Chunked Streaming Mode" property in business service configuration and test again. By default, this setting remains enabled.
    Regards,
    Anuj

  • Xsl transformation from version1 to version2, problem with namespaces

    Guys!
    In my current project we need to have an interface in Oracle ESB which is build on lets say a wsdl version1 and an interface build on wsdl version2.
    In esb i need to define a transformation which will transform the request on version1 to version2. Because the xsd for the operation is really huge (+1000 items) i made some templates in xsl to do most of the work, works great..only i'm having a few issues now.
    To re-order items from source to target i do the next in a template
    <nameGroep>
    <xsl:copy-of select="andhere the xpath from source"/>
    <xsl:copy-of select="andhere the xpath from source"/>
    <xsl:copy-of select="andhere the xpath from source"/>
    </nameGroep>The only problem from the xsl:copy-of is, it also copies the namespace along. So if my target document uses an other namespace, it fails.
    To correct this i hoped i could make use of <xsl:namespace-alias> but this doesn't work on a literal/text tag (hope i explain this correct).
    Other option is, for every element do something like
    [code[
    <elementname>
    <xsl:value-of select=""/>
    </elementname>
    but this will create the <elementname> always in the target whether or not it's in the source. You could do a check to see if it's in the source, but this isn't a solution because then i need to check for every 1000+ item in the source document, so..we skip this idea.
    So i reach a point where im still searching for a good solution and hoped you guys could help me a bit with it.
    If the problem isn't explain well please say so, and i will add extra info.

    Guys!
    In my current project we need to have an interface in Oracle ESB which is build on lets say a wsdl version1 and an interface build on wsdl version2.
    In esb i need to define a transformation which will transform the request on version1 to version2. Because the xsd for the operation is really huge (+1000 items) i made some templates in xsl to do most of the work, works great..only i'm having a few issues now.
    To re-order items from source to target i do the next in a template
    <nameGroep>
    <xsl:copy-of select="andhere the xpath from source"/>
    <xsl:copy-of select="andhere the xpath from source"/>
    <xsl:copy-of select="andhere the xpath from source"/>
    </nameGroep>The only problem from the xsl:copy-of is, it also copies the namespace along. So if my target document uses an other namespace, it fails.
    To correct this i hoped i could make use of <xsl:namespace-alias> but this doesn't work on a literal/text tag (hope i explain this correct).
    Other option is, for every element do something like
    [code[
    <elementname>
    <xsl:value-of select=""/>
    </elementname>
    but this will create the <elementname> always in the target whether or not it's in the source. You could do a check to see if it's in the source, but this isn't a solution because then i need to check for every 1000+ item in the source document, so..we skip this idea.
    So i reach a point where im still searching for a good solution and hoped you guys could help me a bit with it.
    If the problem isn't explain well please say so, and i will add extra info.

  • Message Mapping Issue with data without namespace

    Hi,
    I have a common xsd imported which has its own target namespace into my SWC namespace. Based on this xsd I have generated a Message Interface and webservice and given the wsdl to third party system for invoking my webservice.
    The problem is I have done the message mapping based on xsd which has namespace but whereas the third party system which is consuming my webservice is sending the xml data without any namespace and because of which my mapping is failing (target structure is not getting generated as expected). I have tested the mapping with namespace and without namespace from IR already. I have explained this below with example.
    I cannot change the xsd as it is a common and even cannot ask the end system to change the data format they are sending as they are sending the same data to some other systems also, which are not complaining.
    How to resolve this issue in XI?
    Actual xml data generated from my imported xsd (with namespace)
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Root xmlns:ns0="http://employee/types">
       <ns0:EmployeeDetails>
          <ns0:EmployeeId>12</ns0:EmployeeId>
            <ns0:EmployeeName>XYZ</ns0:EmployeeName>
    </ns0:EmployeeDetails>
    </ns0:Root>
    Actual Data coming from third party system (without namespace)
    <?xml version="1.0" encoding="UTF-8"?>
    <Root>
       <EmployeeDetails>
          <EmployeeId>12</EmployeeId>
            <EmployeeName>XYZ</EmployeeName>
    </EmployeeDetails>
    </Root>
    Thanks
    Amit

    Just  wild guess:)
    I am not 100% sure but i guess XSLT mapping does not checks the incoming payload against the sender message type.Within XSLT mapping you can add/remove namespace as you would like,use this XSLT mapping before your actual message mapping in interface mapping.
    I am saying this coz recently i was able to generate XSLT mapping(in altova Map Transform) without even specifying any sender or receiver Message type and it worked just fine.
    Thanx
    Aamir

  • J2SE adapter PI 7.1 issue with XML to flat conversion and namespace length

    Dear reader,
    We are facing an issue with J2SE Adapter PI7.1 for a number of flows.
    The flow requirements:
    [1] Namespace length for interfaces is up to 100 characters
    [2] The XML message must be converted to Flat on the adapter channel
    Our PI system is at patch level 7 and we implement J2SE adapter on patch level 7 as well.
    We found that the J2SE adapter on patch level 7 does not support long namespaces [1] (as it should since this is an PI 7.1 j2SE adapter) but no issues where found with the XML to flat conversion [2].
    Experimenting with J2SE adapter on patch level 6 we found the long namespaces [1] are supported however an issue is found with the XML to flat conversion [2] as stated in SAP note 1335527.
    An SAP Customer Message is raised on this issue however your input is highly appricated!
    With Kind Regards,
    Harald Kastelijn
    Edited by: Harald Kastelijn on Mar 6, 2010 9:17 AM
    Edited by: Harald Kastelijn on Mar 6, 2010 9:19 AM

    We found that the J2SE adapter on patch level 7 does not support long namespaces [1] (as it should since this is an PI 7.1
    j2SE adapter) but no issues where found with the XML to flat conversion [2]
    I think the restriction of namespace length still remains in design time (IR).....the same however has been extended in configuration and runtime...this SAP note has some information: https://service.sap.com/sap/support/notes/870809

  • [9i] poor performance with XMLType.transform

    Hello,
    I've got a problem with the Oracle function XMLType.transform.
    When I try to apply a XSL to a big XML, it is very very slow, and it evens consumes all the CPU, and other users are not able to work until the processing is complete...
    So I was wondering if my XSL was corrupted, but it does not seem so, because when i apply it with Internet Explorer (by just double-clicking on the .xml), it is immediately applied. I've also even tried with oraxsl, and the processing is quick and good.
    So, i tried to use XDB, but it does not work, maybe I should upgrade to a newer version of XDB?
    Please find the ZIP file here :
    http://perso.modulonet.fr/~tleoutre/Oracle/samples.zip
    Please find in this file :
    1) The XSL file k_xsl.xsl
    2) The "big" XML file big_xml.xml
    Here you can try to apply the XSL on the XML with Internet Explorer : processing is very quick...
    3) The batch file transform.bat
    Here you can launch it, it calls oraxsl, and produces a result very quickly...
    4) The SQL file test_xsl_with_xmltype_transform.sql.
    You can try to launch it... First, it applies the same XSL with a little XML, and it's OK... And then, it applies the XSL to the same big XML as in point 1), and then, it takes a lot of time and CPU...
    5) The SQL file test_xsl_with_xdb_1.sql ...
    On my server, it fails... So I tried to change the XSL in the next point :
    6) The SQL file test_xsl_with_xdb_2.sql with a "cleaned" XSL...
    And then, it fails with exactly the same problem as in :
    TransformerConfigurationException  (Unknown expression at EOF: *|/.)
    Any help would be greatly appreciated!
    Thank you!
    P.S. : Sorry for my bad english, I'm a French man :-)

    This is what I see...
    Your tests are measuring the wrong thing. You are measuring the time to create the sample documents, which is being done very innefficiently, as well
    as the time take to do the transform.
    Below is the correct way to get mesasurements for each task..
    Here's what I see on a PIV 2.4Ghz with 10.2.0.2.0 and 2GB of RAM
    Fragments SourceSize  TargetSize createSource       Parse     Transform
            50      28014      104550  00:00:00.04 00:00:00.04   00:00:00.12
           100      55964      209100  00:00:00.03 00:00:00.05   00:00:00.23
           500     279564     1045500  00:00:00.16 00:00:00.23   00:00:01.76
          1000     559064     2091000  00:00:00.28 00:00:00.28   00:00:06.04
          2000    1118064     4182000  00:00:00.34 00:00:00.42   00:00:24.43
          5000    2795064    10455000  00:00:00.87 00:00:02.02   00:03:19.02I think this clearly shows the pattern.
    Of course what this testing really shows is that you've clearly missed the point of performing XSLT transformation inside the database.
    The idea behind database based transformation is to optimize XSLT processing by
    (1), not having to parse the XML and build a DOM tree before commencing the XSLT processing. In this example this is not possible since the
    XML is being created from a CLOB based XMLType, not a schema based XMLType.
    (2) Leveraging the Lazily Loaded Virtual DOM when doing sparse transformation ( A Sparse transformation is one where there are large parts of the
    source document that are not required to create the target document. Again in this case the XSL requires you to walk all the nodes to generate the
    required output.
    If is necessary to process all of the nodes in the source document to generate the entire output it probably makes more sense to use a midtier XSL engine.
    Here's the code I used to generate the numbers in the above example
    BTW in terms of BIG XML we've successully processed 12G documents with Schema Based Storage...So nothing you have hear comes any where our defintion of big.- 1 with Oracle 10g Express on Linux
    Also, please remember that 9.2.0.1.0 is not a supported release for any XML DB related features.
    SQL*Plus: Release 10.2.0.2.0 - Production on Fri Feb 10 07:44:59 2006
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    SQL> spool createDocument.log
    SQL> --
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> create or replace directory &1 as '&3'
      2  /
    old   1: create or replace directory &1 as '&3'
    new   1: create or replace directory SCOTT as '/home/mdrake/bugs/xslTest'
    Directory created.
    SQL> drop table source_data_table
      2  /
    Table dropped.
    SQL> create table source_data_table
      2  (
      3    fragCount number,
      4    xml_text  clob,
      5    xml       xmlType,
      6    result    clob
      7  )
      8  /
    Table created.
    SQL> create or replace procedure createDocument(fragmentCount number)
      2  as
      3    fragmentText clob :=
      4  '<AFL LIGNUM="1999">
      5    <mat>20000001683</mat>
      6    <name>DOE</name>
      7    <firstname>JOHN</firstname>
      8    <name2>JACK</name2>
      9    <SEX>MALE</SEX>
    10    <birthday>1970-05-06</birthday>
    11    <salary>5236</salary>
    12    <code1>5</code1>
    13    <code2>6</code2>
    14    <code3>7</code3>
    15    <date>2006-05-06</date>
    16    <dsp>8.665</dsp>
    17    <dsp_2000>455.45</dsp_2000>
    18    <darr04>5.3</darr04>
    19    <darvap04>6</darvap04>
    20    <rcrr>8</rcrr>
    21    <rcrvap>9</rcrvap>
    22    <rcrvav>10</rcrvav>
    23    <rinet>11.231</rinet>
    24    <rmrr>12</rmrr>
    25    <rmrvap>14</rmrvap>
    26    <ro>15</ro>
    27    <rr>189</rr>
    28    <date2>2004-05-09</date2>
    29  </AFL>';
    30
    31    xmlText CLOB;
    32
    33  begin
    34    dbms_lob.createTemporary(xmlText,true,DBMS_LOB.CALL);
    35    dbms_lob.write(xmlText,5,1,'<PRE>');
    36    for i in 1..fragmentCount loop
    37       dbms_lob.append(xmlText,fragmentText);
    38    end loop;
    39    dbms_lob.append(xmlText,xmlType('<STA><COD>TER</COD><MSG>Op?ation R?ssie</MSG></STA>').getClobVal());
    40    dbms_lob.append(xmlText,'</PRE>');
    41    insert into source_data_table (fragCount,xml_text) values (fragmentCount, xmlText);
    42    commit;
    43    dbms_lob.freeTemporary(xmlText);
    44  end;
    45  /
    Procedure created.
    SQL> show errors
    No errors.
    SQL> --
    SQL> set timing on
    SQL> --
    SQL> call createDocument(50)
      2  /
    Call completed.
    Elapsed: 00:00:00.04
    SQL> call createDocument(100)
      2  /
    Call completed.
    Elapsed: 00:00:00.03
    SQL> call createDocument(500)
      2  /
    Call completed.
    Elapsed: 00:00:00.16
    SQL> call createDocument(1000)
      2  /
    Call completed.
    Elapsed: 00:00:00.28
    SQL> call createDocument(2000)
      2  /
    Call completed.
    Elapsed: 00:00:00.34
    SQL> call createDocument(5000)
      2  /
    Call completed.
    Elapsed: 00:00:00.87
    SQL> select fragCount dbms_lob.getLength(xmlText)
      2    from sample_data_table
      3  /
    select fragCount dbms_lob.getLength(xmlText)
    ERROR at line 1:
    ORA-00923: FROM keyword not found where expected
    Elapsed: 00:00:00.00
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.2.0 - Production on Fri Feb 10 07:45:01 2006
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    SQL> spool testcase_&3..log
    SQL> --
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> set timing on
    SQL> --
    SQL> update source_data_table
      2     set xml = xmltype(xml_text)
      3   where fragCount = &3
      4  /
    old   3:  where fragCount = &3
    new   3:  where fragCount = 50
    1 row updated.
    Elapsed: 00:00:00.04
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.01
    SQL> update source_data_table
      2     set result = xmltransform(xml,xmltype(bfilename(USER,'&4'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
      3   where fragCount = &3
      4  /
    old   2:    set result = xmltransform(xml,xmltype(bfilename(USER,'&4'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
    new   2:    set result = xmltransform(xml,xmltype(bfilename(USER,'k_xsl.xsl'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
    old   3:  where fragCount = &3
    new   3:  where fragCount = 50
    1 row updated.
    Elapsed: 00:00:00.12
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.01
    SQL> select fragCount, dbms_lob.getLength(xml_text),dbms_lob.getLength(result)
      2    from source_data_table
      3  /
    FRAGCOUNT DBMS_LOB.GETLENGTH(XML_TEXT) DBMS_LOB.GETLENGTH(RESULT)
            50                        28014                     104550
           100                        55964
           500                       279564
          1000                       559064
          2000                      1118064
          5000                      2795064
    6 rows selected.
    Elapsed: 00:00:00.01
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.2.0 - Production on Fri Feb 10 07:45:02 2006
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    SQL> spool testcase_&3..log
    SQL> --
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> set timing on
    SQL> --
    SQL> update source_data_table
      2     set xml = xmltype(xml_text)
      3   where fragCount = &3
      4  /
    old   3:  where fragCount = &3
    new   3:  where fragCount = 100
    1 row updated.
    Elapsed: 00:00:00.05
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.01
    SQL> update source_data_table
      2     set result = xmltransform(xml,xmltype(bfilename(USER,'&4'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
      3   where fragCount = &3
      4  /
    old   2:    set result = xmltransform(xml,xmltype(bfilename(USER,'&4'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
    new   2:    set result = xmltransform(xml,xmltype(bfilename(USER,'k_xsl.xsl'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
    old   3:  where fragCount = &3
    new   3:  where fragCount = 100
    1 row updated.
    Elapsed: 00:00:00.23
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.03
    SQL> select fragCount, dbms_lob.getLength(xml_text),dbms_lob.getLength(result)
      2    from source_data_table
      3  /
    FRAGCOUNT DBMS_LOB.GETLENGTH(XML_TEXT) DBMS_LOB.GETLENGTH(RESULT)
            50                        28014                     104550
           100                        55964                     209100
           500                       279564
          1000                       559064
          2000                      1118064
          5000                      2795064
    6 rows selected.
    Elapsed: 00:00:00.01
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.2.0 - Production on Fri Feb 10 07:45:02 2006
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    SQL> spool testcase_&3..log
    SQL> --
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> set timing on
    SQL> --
    SQL> update source_data_table
      2     set xml = xmltype(xml_text)
      3   where fragCount = &3
      4  /
    old   3:  where fragCount = &3
    new   3:  where fragCount = 500
    1 row updated.
    Elapsed: 00:00:00.12
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.03
    SQL> update source_data_table
      2     set result = xmltransform(xml,xmltype(bfilename(USER,'&4'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
      3   where fragCount = &3
      4  /
    old   2:    set result = xmltransform(xml,xmltype(bfilename(USER,'&4'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
    new   2:    set result = xmltransform(xml,xmltype(bfilename(USER,'k_xsl.xsl'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
    old   3:  where fragCount = &3
    new   3:  where fragCount = 500
    1 row updated.
    Elapsed: 00:00:01.76
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.00
    SQL> select fragCount, dbms_lob.getLength(xml_text),dbms_lob.getLength(result)
      2    from source_data_table
      3  /
    FRAGCOUNT DBMS_LOB.GETLENGTH(XML_TEXT) DBMS_LOB.GETLENGTH(RESULT)
            50                        28014                     104550
           100                        55964                     209100
           500                       279564                    1045500
          1000                       559064
          2000                      1118064
          5000                      2795064
    6 rows selected.
    Elapsed: 00:00:00.00
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.2.0 - Production on Fri Feb 10 07:45:04 2006
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    SQL> spool testcase_&3..log
    SQL> --
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> set timing on
    SQL> --
    SQL> update source_data_table
      2     set xml = xmltype(xml_text)
      3   where fragCount = &3
      4  /
    old   3:  where fragCount = &3
    new   3:  where fragCount = 1000
    1 row updated.
    Elapsed: 00:00:00.28
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.01
    SQL> update source_data_table
      2     set result = xmltransform(xml,xmltype(bfilename(USER,'&4'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
      3   where fragCount = &3
      4  /
    old   2:    set result = xmltransform(xml,xmltype(bfilename(USER,'&4'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
    new   2:    set result = xmltransform(xml,xmltype(bfilename(USER,'k_xsl.xsl'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
    old   3:  where fragCount = &3
    new   3:  where fragCount = 1000
    1 row updated.
    Elapsed: 00:00:06.04
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.00
    SQL> select fragCount, dbms_lob.getLength(xml_text),dbms_lob.getLength(result)
      2    from source_data_table
      3  /
    FRAGCOUNT DBMS_LOB.GETLENGTH(XML_TEXT) DBMS_LOB.GETLENGTH(RESULT)
            50                        28014                     104550
           100                        55964                     209100
           500                       279564                    1045500
          1000                       559064                    2091000
          2000                      1118064
          5000                      2795064
    6 rows selected.
    Elapsed: 00:00:00.00
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.2.0 - Production on Fri Feb 10 07:45:11 2006
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    SQL> spool testcase_&3..log
    SQL> --
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> set timing on
    SQL> --
    SQL> update source_data_table
      2     set xml = xmltype(xml_text)
      3   where fragCount = &3
      4  /
    old   3:  where fragCount = &3
    new   3:  where fragCount = 2000
    1 row updated.
    Elapsed: 00:00:00.42
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.02
    SQL> update source_data_table
      2     set result = xmltransform(xml,xmltype(bfilename(USER,'&4'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
      3   where fragCount = &3
      4  /
    old   2:    set result = xmltransform(xml,xmltype(bfilename(USER,'&4'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
    new   2:    set result = xmltransform(xml,xmltype(bfilename(USER,'k_xsl.xsl'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
    old   3:  where fragCount = &3
    new   3:  where fragCount = 2000
    1 row updated.
    Elapsed: 00:00:24.43
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.03
    SQL> select fragCount, dbms_lob.getLength(xml_text),dbms_lob.getLength(result)
      2    from source_data_table
      3  /
    FRAGCOUNT DBMS_LOB.GETLENGTH(XML_TEXT) DBMS_LOB.GETLENGTH(RESULT)
            50                        28014                     104550
           100                        55964                     209100
           500                       279564                    1045500
          1000                       559064                    2091000
          2000                      1118064                    4182000
          5000                      2795064
    6 rows selected.
    Elapsed: 00:00:00.00
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.2.0 - Production on Fri Feb 10 07:45:36 2006
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    SQL> spool testcase_&3..log
    SQL> --
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> set timing on
    SQL> --
    SQL> update source_data_table
      2     set xml = xmltype(xml_text)
      3   where fragCount = &3
      4  /
    old   3:  where fragCount = &3
    new   3:  where fragCount = 5000
    1 row updated.
    Elapsed: 00:00:02.02
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.05
    SQL> update source_data_table
      2     set result = xmltransform(xml,xmltype(bfilename(USER,'&4'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
      3   where fragCount = &3
      4  /
    old   2:    set result = xmltransform(xml,xmltype(bfilename(USER,'&4'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
    new   2:    set result = xmltransform(xml,xmltype(bfilename(USER,'k_xsl.xsl'),nls_charset_id('WE8ISO8859P1'))).getClobVal()
    old   3:  where fragCount = &3
    new   3:  where fragCount = 5000
    1 row updated.
    Elapsed: 00:03:19.02
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.01
    SQL> select fragCount, dbms_lob.getLength(xml_text),dbms_lob.getLength(result)
      2    from source_data_table
      3  /
    FRAGCOUNT DBMS_LOB.GETLENGTH(XML_TEXT) DBMS_LOB.GETLENGTH(RESULT)
            50                        28014                     104550
           100                        55964                     209100
           500                       279564                    1045500
          1000                       559064                    2091000
          2000                      1118064                    4182000
          5000                      2795064                   10455000
    6 rows selected.
    Elapsed: 00:00:00.04
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    bash-2.05b$

  • Xmltype.transform() with stylesheet that includes another stylesheet

    I' trying to use xmltype.transform() with a stylesheet that includes/imports another stylesheet. But this results in a 'ORA-03113: End of communication channel'. Is xsl:include or xsl:import supported?
    This is the first stylesheet:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:import href="company2.xsl"/>
         <xsl:template match="/">
              <xsl:apply-templates select="company"/>
         </xsl:template>
    </xsl:stylesheet>
    And this the second stylesheet:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="company">
              Company: <xsl:value-of select="."/>
         </xsl:template>
    </xsl:stylesheet>
    Both stylesheets are stored in the Oracle XDB Repository in folder '/public/test'.
    The following script results in an error:
    declare
    l_xsl xmltype;
    l_xml xmltype;
    l_xml2 xmltype;
    begin
    l_xsl := xdburitype('/public/test/company.xsl').getxml();
    l_xml := xmltype('<company>Oracle</company>');
    l_xml2 := l_xml.transform(l_xsl);
    end;
    I tried the following values for the href attribute of xsl:include:
    company2.xsl
    /public/test/company2.xsl
    http://<host>:<port>/public/test/company2/xsl
    I also tried to use xsl:import instead of xsl:include with the above attribute values for href. In all cases I get the ORA-03113.
    Thanks for any help, hints or tips.
    Erwin Groenendal

    Did you look in the database alert log or in the database log area to see if any trace file was generated by your error? The listener.log may have more information too.
    Also, you can trace your session to see what is happening.
    alter session set sql_trace = true;
    run sql
    alter session set sql_trace = false;
    or
    alter session set events '10046 trace name context forever, level 12';
    or TURN on TRACING for any SESSION
    execute sys.dbms_system.set_sql_trace_in_session -
    (sid => &sid, serial# => &serial#, sql_trace => true);
    run sql
    execute sys.dbms_system.set_sql_trace_in_session -
    (sid => &sid, serial# => &serial#, sql_trace => false);
    HTH
    M.

  • Issue with Alias and Union of CTEs

    I have a query that works in SQL Server but I'm having issues with it in PL/SQL.  I keep running into the error saying "invalid identifier" when I try to reference PlantNumber or Plant_No or any other piece of the CTE or subquery.  Is this not possible with Oracle?
    Here's a shortened version of my query:
    WITH RemoveData AS
       SELECT a.PLANT_NO,a.ALLOC_WHDV_VOL,a.KW_CTR_REDELIVERED_HV, a.MTR_NO, a.MTR_SFX, a.TRNX_ID, a.REC_STATUS_CD,
    MAX(a.ACCT_DT) ACCT_DT
       FROM GasStmt a
       WHERE a.REC_STATUS_CD = 'RR'
       GROUP BY a.PLANT_NO,a.ALLOC_WHDV_VOL,a.KW_CTR_REDELIVERED_HV, a.MTR_NO, a.MTR_SFX, a.TRNX_ID, a.REC_STATUS_CD
       HAVING COUNT(a.REC_STATUS_CD) > 2
      RemoveData2 AS
       SELECT plant_no "PlantNumber"
       ,SUM(-a.ALLOC_WHDV_VOL) "PlantStandardGrossWellheadMcf"
       ,SUM(KW_CTR_REDELIVERED_HV) "KeepWholeResidueMMBtu"
       FROM RemoveData a
       GROUP BY plant_no
      OriginalData AS
       SELECT a.PLANT_NO "PlantNumber"
       ,SUM(a.ALLOC_WHDV_VOL) "PlantStandardGrossWellheadMcf"
       ,SUM(CASE WHEN a.REC_STATUS_CD = 'RR' THEN -a.KW_CTR_REDELIVERED_HV ELSE a.KW_CTR_REDELIVERED_HV END) "KeepWholeResidueMMBtu"
       FROM GasStmt a
       LEFT OUTER JOIN (SELECT MTR_NO, MTR_SFX, TRNX_ID, REC_STATUS_CD, MAX(ACCT_DT) ACCT_DT
       FROM GasStmt
       WHERE REC_STATUS_CD = 'RR'
       GROUP BY MTR_NO, MTR_SFX, TRNX_ID, REC_STATUS_CD
       HAVING COUNT(TRNX_ID) > 1) b
       ON a.MTR_NO = b.MTR_NO
       AND a.TRNX_ID = b.TRNX_ID
       AND a.Rec_Status_Cd = b.REC_STATUS_CD
       AND a.Acct_Dt = b.ACCT_DT
       WHERE a.ACCT_DT > '1/1/2010'
       AND b.MTR_NO IS NULL
       GROUP BY a.PLANT_NO
    UnionCTE AS (  
    SELECT *
    FROM RemoveData2
    UNION
    SELECT *
    FROM OriginalData
    SELECT PlantNumber, SUM(PlantStandardGrossWellheadMcf) AS PlantStandardGrossWellheadMcf,SUM(KeepWholeResidueMMBtu) AS KeepWholeResidueMMBtu
    FROM UnionCTE
    GROUP BY PlantNumber
    It's the bottom select from UnionCTE that's causing the issue.  Any tips would be appreciated!

    I can't check it at the moment, but here's some code I forgot to post.  Thanks for your response, I'll let you know if it works for me.
    CREATE TABLE STG.GasStmt
    (PLANT_NO varchar(100),
    ALLOC_WHDV_VOL numeric(29, 5),
    KW_CTR_REDELIVERED_HV numeric(29, 5),
    MTR_NO varchar(100),
    MTR_SFX varchar(100),
    TRNX_ID bigint,
    REC_STATUS_CD varchar(100),
    ACCT_DT DateTime)
    insert into STG.GasStmt
    select '043','0','50','36563','','83062200','OR','12/1/2011' union all
    select '002','0','100','36563','','83062222','OR','12/1/2011' union all
    select '002','0','-.99','36563','','-83062299','RR','12/1/2011' union all
    select '002','0','-.99','36563','','-83062299','RR','2/1/2013' union all
    select '002','0','-.99','36563','','-83062299','RR','4/1/2013' union all
    select '002','0','-.99','36563','','83062299','OR','2/1/2011' union all
    select '002','0','-.99','36563','','-86768195','RR','12/1/2011' union all
    select '002','0','-.99','36563','','-86768195','RR','2/1/2013' union all
    select '002','0','-.99','36563','','-86768195','RR','4/1/2013' union all
    select '002','0','-.99','36563','','86768195','OR','3/1/2011' union all
    select '002','0','-.99','36563','','-90467786','RR','1/1/2012' union all
    select '002','0','-.99','36563','','-90467786','RR','2/1/2013' union all
    select '002','0','-.99','36563','','-90467786','RR','4/1/2013' union all
    select '002','0','-.99','36563','','90467786','OR','4/1/2011' union all
    select '002','0','-.99','36563','','-77671301','RR','2/1/2013' union all
    select '002','0','-.99','36563','','-77671301','RR','4/1/2013' union all
    select '002','0','-.99','36563','','77671301','OR','1/1/2011' union all
    select '002','0','-.99','36563','','-68420423','RR','2/1/2013' union all
    select '002','0','-.99','36563','','68420423','OR','4/1/2013' union all
    select '002','0','-.99','36563','','-188808446','RR','3/1/2013' union all
    select '002','0','-.99','36563','','188808446','OR','1/1/2013' union all
    select '002','1205.15','0','36563','A','138365544','OR','2/1/2012'

  • XMLTYPE Transform works differently in Oracle 10.1 and 11.2

    We are migrating our applications from Oracle 10.1g to 11.2g. We have a number of PL/SQL routines that transform incoming/outgoing XML using the XMLType Transform method. The XSLTs that we use do not seem to work in 11.2. For example, the code below is a simplification of what we're doing. This sample code uses hard-coded input and xslt to illustrate the point. The same code has very different outputs when run in 10.1 and 11.2. In 10.1, the transformation works. It also works using files in an xml tool. In 11.2, none of the input XML is transformed. The only output is the extra <sd:StandardBusinessDocument... that is hard-coded into the xslt as a wrapper.
    E.g.
    {code}
    declare
    out_sbd xmltype := xmltype('<OT_SBD_HEADER>
        <HEADER_VERSION>1.0</HEADER_VERSION>
        <SENDERS>
            <OT_SENDER_RECEIVER>
                <IDENTIFIER>COGSD</IDENTIFIER>
                <IDENTIFIER_AUTHORITY>urn:olgr.qld.gov.au:cogs</IDENTIFIER_AUTHORITY>
            </OT_SENDER_RECEIVER>
        </SENDERS>
        <RECEIVERS>
            <OT_SENDER_RECEIVER>
                <IDENTIFIER>PORTAL</IDENTIFIER>
                <IDENTIFIER_AUTHORITY>urn:olgr.qld.gov.au:portal</IDENTIFIER_AUTHORITY>
            </OT_SENDER_RECEIVER>
        </RECEIVERS>
        <DOCUMENT_INDENTIFICATION>
            <STANDARD>urn:olgr.qld.gov.au</STANDARD>
            <TYPE_VERSION>1.1</TYPE_VERSION>
            <INSTANCE_IDENTIFIER>c11ab0c6-22e7-4132-88f8-f81e88cde75c</INSTANCE_IDENTIFIER>
            <TYPE>licenceInformation</TYPE>
            <CREATION_DATE>2012-05-30T13:55:41.167125+10:00</CREATION_DATE>
        </DOCUMENT_INDENTIFICATION>
        <BUSINESS_SCOPE>
            <OT_SBD_HEADER_SCOPE>
                <SCOPE_TYPE>get</SCOPE_TYPE>
                <SCOPE_INSTANCE_IDENTIFIER>GET_GAMING_STATISTICS_DATA</SCOPE_INSTANCE_IDENTIFIER>
            </OT_SBD_HEADER_SCOPE>
        </BUSINESS_SCOPE>
    </OT_SBD_HEADER>');
    transformed_out_sbd xmltype;
    sbd_header_out_xslt xmltype := xmltype('<?xml version="1.0" encoding="ISO-8859-1"?>
    <!--
    This file was generated by Altova MapForce 2011r2sp1
    YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
    OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.
    Refer to the Altova MapForce Documentation for further details.
    http://www.altova.com/mapforce
    -->
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
      <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
      <xsl:template match="/">
        <sd:StandardBusinessDocument xsi:schemaLocation="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader sbd.xsd" xmlns:sd="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <xsl:for-each select="*[local-name()=&apos;OT_SBD_HEADER&apos; and namespace-uri()=&apos;&apos;]">
            <xsl:variable name="var1_DOCUMENTINDENTIFICATION" select="*[local-name()=&apos;DOCUMENT_INDENTIFICATION&apos; and namespace-uri()=&apos;&apos;]"/>
            <xsl:variable name="var2_MANIFEST" select="*[local-name()=&apos;MANIFEST&apos; and namespace-uri()=&apos;&apos;]"/>
            <xsl:variable name="var3_resultof_cast" select="string($var1_DOCUMENTINDENTIFICATION/*[local-name()=&apos;MULTIPLE_TYPE&apos; and namespace-uri()=&apos;&apos;])"/>
            <StandardBusinessDocumentHeader>
              <HeaderVersion>
                <xsl:value-of select="string(HEADER_VERSION)"/>
              </HeaderVersion>
              <xsl:for-each select="SENDERS">
                <xsl:variable name="var4_OTSENDERRECEIVER" select="OT_SENDER_RECEIVER"/>
                <Sender>
                  <Identifier>
                    <xsl:attribute name="Authority">
                      <xsl:value-of select="string($var4_OTSENDERRECEIVER/IDENTIFIER_AUTHORITY)"/>
                    </xsl:attribute>
                    <xsl:value-of select="string($var4_OTSENDERRECEIVER/IDENTIFIER)"/>
                  </Identifier>
                </Sender>
              </xsl:for-each>
              <xsl:for-each select="RECEIVERS">
                <xsl:variable name="var5_OTSENDERRECEIVER" select="OT_SENDER_RECEIVER"/>
                <Receiver>
                  <Identifier>
                    <xsl:attribute name="Authority">
                      <xsl:value-of select="string($var5_OTSENDERRECEIVER/IDENTIFIER_AUTHORITY)"/>
                    </xsl:attribute>
                    <xsl:value-of select="string($var5_OTSENDERRECEIVER/IDENTIFIER)"/>
                  </Identifier>
                </Receiver>
              </xsl:for-each>
              <DocumentIdentification>
                <Standard>
                  <xsl:value-of select="string($var1_DOCUMENTINDENTIFICATION/STANDARD)"/>
                </Standard>
                <TypeVersion>
                  <xsl:value-of select="string($var1_DOCUMENTINDENTIFICATION/TYPE_VERSION)"/>
                </TypeVersion>
                <InstanceIdentifier>
                  <xsl:value-of select="string($var1_DOCUMENTINDENTIFICATION/INSTANCE_IDENTIFIER)"/>
                </InstanceIdentifier>
                <Type>
                  <xsl:value-of select="string($var1_DOCUMENTINDENTIFICATION/TYPE)"/>
                </Type>
                <MultipleType>
                  <xsl:value-of select="string(((normalize-space($var3_resultof_cast) = &apos;true&apos;) or (normalize-space($var3_resultof_cast) = &apos;1&apos;)))"/>
                </MultipleType>
                <CreationDateAndTime>
                  <xsl:value-of select="string($var1_DOCUMENTINDENTIFICATION/CREATION_DATE)"/>
                </CreationDateAndTime>
              </DocumentIdentification>
              <Manifest>
                <NumberOfItems>
                  <xsl:value-of select="string((string($var2_MANIFEST/NUMBER_OF_ITEMS)))"/>
                </NumberOfItems>
                <xsl:for-each select="$var2_MANIFEST/MANIFEST_ITEMS">
                  <xsl:variable name="var6_OTMANIFESTITEM" select="OT_MANIFEST_ITEM"/>
                  <ManifestItem>
                    <MimeTypeQualifierCode>
                      <xsl:value-of select="string($var6_OTMANIFESTITEM/MIME_TYPE)"/>
                    </MimeTypeQualifierCode>
                    <UniformResourceIdentifier>
                      <xsl:value-of select="string($var6_OTMANIFESTITEM/RESOURCE_IDENTIFIER)"/>
                    </UniformResourceIdentifier>
                    <Description>
                      <xsl:value-of select="string($var6_OTMANIFESTITEM/DESCRIPTION)"/>
                    </Description>
                  </ManifestItem>
                </xsl:for-each>
              </Manifest>
              <xsl:for-each select="BUSINESS_SCOPE">
                <xsl:variable name="var7_OTSBDHEADERSCOPE" select="OT_SBD_HEADER_SCOPE"/>
                <BusinessScope>
                  <Scope>
                    <Type>
                      <xsl:value-of select="string($var7_OTSBDHEADERSCOPE/SCOPE_TYPE)"/>
                    </Type>
                    <InstanceIdentifier>
                      <xsl:value-of select="string($var7_OTSBDHEADERSCOPE/SCOPE_INSTANCE_IDENTIFIER)"/>
                    </InstanceIdentifier>
                    <Identifier>
                      <xsl:value-of select="string($var7_OTSBDHEADERSCOPE/SCOPE_IDENTIFIER)"/>
                    </Identifier>
                  </Scope>
                </BusinessScope>
              </xsl:for-each>
            </StandardBusinessDocumentHeader>
          </xsl:for-each>
        </sd:StandardBusinessDocument>
      </xsl:template>
    </xsl:stylesheet>
    BEGIN
    transformed_out_sbd := out_sbd.transform (sbd_header_out_xslt); -- transform out_sbd using the xslt hard-coded above
    INSERT INTO z_clob_log (id, clob_name, clob_desc, clob_doc)  --- log the output to a clob column in a table
    SELECT (select nvl(max(id),0)+1 from _clob_log),
                   to_char(sysdate,'yyyymmdd hh24:mi:ss')||' - TRANSFORMED OUT_SBD',
                   transformed_out_sbd.getClobVal
    FROM dual;
    COMMIT;
    END;
    {code}
    In 10.1, the output is as expected, the same as doing the transformation using files in an xml tool.
    {code}
    <sd:StandardBusinessDocument xsi:schemaLocation="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader sbd.xsd" xmlns:sd="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <StandardBusinessDocumentHeader>
        <HeaderVersion>1.0</HeaderVersion>
        <Sender>
          <Identifier Authority="urn:olgr.qld.gov.au:cogs">COGSD</Identifier>
        </Sender>
        <Receiver>
          <Identifier Authority="urn:olgr.qld.gov.au:portal">PORTAL</Identifier>
        </Receiver>
        <DocumentIdentification>
          <Standard>urn:olgr.qld.gov.au</Standard>
          <TypeVersion>1.1</TypeVersion>
          <InstanceIdentifier>c11ab0c6-22e7-4132-88f8-f81e88cde75c</InstanceIdentifier>
          <Type>licenceInformation</Type>
          <MultipleType>false</MultipleType>
          <CreationDateAndTime>2012-05-30T13:55:41.167125+10:00</CreationDateAndTime>
        </DocumentIdentification>
        <Manifest>
          <NumberOfItems/>
        </Manifest>
        <BusinessScope>
          <Scope>
            <Type>get</Type>
            <InstanceIdentifier>GET_GAMING_STATISTICS_DATA</InstanceIdentifier>
            <Identifier/>
          </Scope>
        </BusinessScope>
      </StandardBusinessDocumentHeader>
    </sd:StandardBusinessDocument>
    {code}
    In 11.2, none of the original xml document is included in the output, only the <sd: StandardBusinessDocument ..../>
    {code}
    <sd:StandardBusinessDocument xsi:schemaLocation="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader sbd.xsd" xmlns:sd="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
    {code}
    The same occurs using the SQL XMLTransform function, e.g. applying the following with the above xml and xslt, except it outputs a separate closing tag </sd:Standard...>
    select xmltransform(out_sbd, sbd_header_out_xslt) into transformed_out_sbd from dual;
    Q: Any ideas? Are there any changes in 11g 11.2 that require major changes to xslt?
    We have a lot of rewriting to do if we cannot get this to work!

    Hi Eduardo,
    Report this as a bug to Oracle Support.
    The problem lies in the namespace-uri() function : the comparison with an empty string is not resolved correctly so no node is ever selected in the first xsl:for-each.
    If you need a workaround, there are a few you can test :
    1) If input documents actually are in no namespace (such as in your sample), remove every namespace-uri() occurrences from the stylesheet.
    2) The other way around, you can give your input document a dummy namespace and now reference it in the stylesheet. The namespace-uri() test will work in this case.
    3) Replace occurrences of namespace-uri() with a slightly more elaborate test that'll handle empty namespace specifically, for example :
    <xsl:variable name="nsuri"></xsl:variable>
    ( namespace-uri()=$nsuri or (not($nsuri) and not(namespace-uri())) )
    Since you're working with generated stylesheets, I understand that none of the above options are really satisfactory.
    If I had to workaround the issue, I'd probably go with the 2nd option which involves a smaller amount of refactoring.

  • Error at AS2 adapter level...There is no certificate with such alias

    Hi All,
    Iam sending the 856 message through AS2 adapter to partner and i got the below error at the adapter level.
    Unable to forward message to JCA adapter. Reason: Fatal exception: com.sap.aii.af.ra.cci.XIRecoverableException: SEEBURGER AS2: AS2 Adapter failure # java.lang.Exception: AS2 message composition failed: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: java.security.PrivilegedActionException: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: There is no certificate with such alias, SEEBURGER AS2: AS2 Adapter failure # java.lang.Exception: AS2 message composition failed: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: java.security.PrivilegedActionException: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: Th
    Exception caught by adapter framework: Fatal exception: com.sap.aii.af.ra.cci.XIRecoverableException: SEEBURGER AS2: AS2 Adapter failure # java.lang.Exception: AS2 message composition failed: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: java.security.PrivilegedActionException: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: There is no certificate with such alias, SEEBURGER AS2: AS2 Adapter failure # java.lang.Exception: AS2 message composition failed: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: java.security.PrivilegedActionException: com.seeburger.ksm.cryptoapi.exception.CryptoApiException: Th
    The certificate has already been uploaded and the AS2ID is defined as one of the identifiers of the party.
    Anyone has any idea what might be wrong? Did i miss anything?
    Waiting for your answers.
    Regards
    Lex

    I am having the same issue.  
    I receive the com.seeburger.ksm.cryptoapi.exception.CryptoApiException: java.security.PrivilegedActionException
    message plus the "unable to find alias name TRUSTED\".
    It appears that after the outbound message is transformed to XML iin XI then sent to Seeburger's BIC for EDI format translation, then sent to AS2 for encryption/transmission, the AS2 adapter cannot find the key store that holds the certificates I am using.
    Am I missing some configuration that points the to the keystore I need ?
    Thanks for any and all responses.
    Andy

  • How BPEL find namespace alias to use in .bpel and payload-body.jsp?

    Hi,
    We are having many issues about the namespace alias for XML schema while designing BPEL proces and the payload-body.jsp. Could you please suggest us how to control the namespace alias for both cases?
    Thank you very much,
    Nidjarin

    I made a lot of further tests, and I can say the problem is related only to the database adapter polling mechanism.
    If I create an asynchronous process, with any kind of database activity (for example select) I can set the title normally.
    If I create a process which start with database table polling, then I cannot use the java embedding.
    try this:
    - create BPEL empty project
    - drop a database adapter service and follow the wizard:
    - select a connection (I tried both oracle or sqlserver connection)
    - select "poll for new or changed record"
    - select any table empty or with few record inside (1 or 2)
    - press next 4 times
    - chose delete record after read (press next)
    - chose order by "no ordering" in polling options (press next 2 times)
    - now drop a receive activity on the process, and connect with the polling partner link
    - drop a java embedding and write any valid java statement
    - deploy; if the table is empty, write a recod in the table
    - the process is instantiated, but the it fails in the --> receive <-- activity with "invalid namespace" error

Maybe you are looking for

  • SQL Connection stays idle/sleeping

    Post Author: gotProblems CA Forum: Data Connectivity and SQL We have an ASP.Net 1.1 web application that keeps eating up database connections in SQL Server 2000 when it calls a Crystal Reports 9 report and does an export.  The background is as follow

  • Questions in MDG

    Hi I have few questions. Please find them below. 1) What is the use of Active area while created a data model . For example it is partner for BP. 2) what is qualifying, Leading and referencing relationship. 3) what is the role of business objects in

  • What comes in the box with the Airport Express?

    I'm looking to buy and Airport Express for my husband but I really can't find a helpful sales person willing to put up with all of my questions. For starters, what comes with the Airport Express? One salesperson told be that I need to buy cables and

  • All servicerequests containing specific iobjects

    Hello, i have an internal table of iobject-ids. And i want to know all service requests in a specific timeframe created for this iobjects. I loop at the moment over my internal table and for each iobject_id i call: query = CL_CRM_BOL_DQUERY_SERVICE=>

  • Installing the CC version fresh on windows 8...

    Hey guys, Just a heads up, for anyone trying to run the adobe manger on windows 8. Well, that part of the story as it involves Time Warner and their motorola modem. If you try running the manager via wifi, it will disconnect the modem. Why I don't kn