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.

Similar Messages

  • XMLTYPE.transform works differently in SQL and PL/SL

    Hi, when I use XMLTYPE.transform in SQL, it's working fine - try this:
    SELECT XMLTYPE.createXml('<data/>').transform(XMLTYPE.createXml('<?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes" />
    <xsl:template match="/">
    <HTML>
    <BODY>
    <TABLE>
    <TR><TD><INPUT readOnly="readOnly" size="19" maxLength="30" type="text" value="test..."/></TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    </xsl:template>
    </xsl:stylesheet>')).getClobVal() FROM DUAL;
    But when i tried to do tha same in PL/SQL, i obtain error - try this:
    DECLARE
    lClob CLOB;
    lXsl XMLTYPE;
    lXml XMLTYPE;
    BEGIN
    lXml := XMLTYPE.createXml('<data/>');
    lXsl := XMLTYPE.createXml('<?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes" />
    <xsl:template match="/">
    <HTML>
    <BODY>
    <TABLE>
    <TR><TD><INPUT readOnly="readOnly" size="19" maxLength="30" type="text" value="test..."/></TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    </xsl:template>
    </xsl:stylesheet>');
    lClob := lXml.transform(lXsl).getClobVal();
    END;
    Error is:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00210: expected '=' instead of '>'
    Error at line 7
    ORA-06512: at "SYS.XMLTYPE", line 138
    ORA-06512: at line 20
    Oracle version is 11.2.0.2.0.
    Knows anybody where is the problem?
    Thanks, R. Kazimir

    Hi,
    Actually it does not work for both.
    Remove .getClobVal() method and see what happens :
    SQL>  SELECT XMLTYPE.createXml('<data/>')
      2  .transform(XMLTYPE.createXml('<?xml version="1.0" encoding="UTF-8"?>
      3  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      4  <xsl:output method="html" />
      5  <xsl:template match="/">
      6  <HTML>
      7  <BODY>
      8  <TABLE>
      9  <TR><TD><INPUT readOnly="readOnly" size="19" maxLength="30" type="text" value="test..."/></TD><
    /TR>
    10  </TABLE>
    11  </BODY>
    12  </HTML>
    13  </xsl:template>
    14  </xsl:stylesheet>'))
    15  FROM dual;
    ERROR:
    ORA-31011: Echec d'analyse XML
    ORA-19202: Une erreur s'est produite lors du traitement la fonction XML (
    LPX-00210: '=' attendu plutôt que '>'
    Error at line 1
    )Besides, using getClobVal() in the SQL version produces an invalid output :
    <HTML>
    <BODY>
      <TABLE>
       <TR>
        <TD>
         <INPUT readOnly>
         </INPUT>
        </TD>
       </TR>
      </TABLE>
    </BODY>
    </HTML>The readOnly attribute is not well-formed.
    Even stranger : change the just the case of the attribute value, e.g. "readOnly" to "readonly", and it works!
    I'm not sure what's happening here. Most likely a combination of bugs regarding html output method.
    As a workaround, you can use output method "xml" instead. Works in any cases.
    On a side note, in your version, getter methods like getClobVal() are deprecated. Oracle now recommends using XMLSerialize function.
    The same goes with XSL transformation, where one should use XMLTransform instead of transform() method.

  • What is the different between Oracle Process Manuf and Oracle Discrete Manufatur in oracle?

    Dear What is the different between Oracle Process Manufacturing and Oracle Descret Manufacturing in Oracle?

    Hi Elad,
       Depending on the requirement and the availability we go with implementing a particular database.
    For xi point of view there is no difference between oracle and SQL database. However you need to intall the drivers of SQL.
    Even there is no difference in the communication channel configuration.
    Reward points if found helpful.
    Thanks & Regards,
    Bharath.

  • Differance between Oracle 9i RAC and 10g RAC

    Hello,
    I am almost new to RAC. I have worked on Oracle 9i RAC since longtime back. Now I am trying to find what is difference between Oracle 9i and 10g RAC structure ? Before it was CM and now it's clusterware. But what it makes different ? Any good explanation or web link.
    thanks
    ~Keyur
    null

    The main difference is 10g RAC is almost completely platform independent, and 9i RAC isn't.
    This means it has changed tremendously.
    As 9i is desupported I wouldn't spend any time in 9i RAC if you have yet to learn it.
    Sybrand Bakker
    Senior Oracle DBA

  • The different between Oracle 8i, 9i and 10g

    Hi, I am new at oracle. Could anybody tell be what is the different feature between these Database Version?

    Hi,
    Could anybody tell be what is the different feature between these Database Version? It's a long list, but I have compiled it here:
    http://www.dba-oracle.com/oracle_tips_enhancements_New_features_release.htm
    Hope this helps. . .
    Don Burleson
    Oracle Press author

  • JTable 's tableChanged() works differently in jdk1.2.2 and jdk1.3

    While updating the contents of the jtable I am using the following
    table.tableChanged(new TableModelEvent(model));
    table.repaint();
    In jdk1.2.2, this updates the contents and repaints the table without clearing the row selection
    But the same in jdk1.3 updates and repaints the table but clears the row selection.
    How can I overcome with problem.
    I also tried model.fireTableStructurChanged();
    along with this but it works in jdk1.2.2 and not in jdk1.3.
    Any suggestion is greatly appreciated.
    Thanks

    They have fixed a bug. If you are replacing the whole table, then the row selection for the old table doesn't mean anything for the new table. In fact, that row might not even exist any more.

  • Does UMX Work with both Oracle Apps 11i and Oracle Portal

    Hi,
    I am looking for some information related to UMX, Please share...
    Has some one setup UMX in your 11i instance.. How comfortable it is after installation
    I am looking to setup UMX for an Apps11i instance...
    I am also sharing this Apps11i Database with Portal and Discoverer installation.
    It is my initial understanding that the UMX is tightly coupled with Apps11i, Can I also integrate or use UMX with Discoverer/Portal.
    Well, my basic purpose of exploring UMX is to get the Automatic Password Reset. If you are aware of anyother Password reset feature (which is not custom built using FND_USER Package & Procedure, coz..upgrade/maintenance issue), Please let me know.
    With kind regards,
    JRF.

    Refer Metalink Note 258281.1, 290525.1 for Configuring UMX with Oracle Apps
    also refer the following link
    http://www.oracle.com/technology/products/applications/security/index.html
    (white paper on UMX)

  • Solaris 10 and Hitachi LUN mapping with Oracle 10g RAC and ASM?

    Hi all,
    I am working on an Oracle 10g RAC and ASM installation with Sun E6900 servers attached to a Hitachi SAN for shared storage with Sun Solaris 10 as the server OS. We are using Oracle 10g Release 2 (10.2.0.3) RAC clusterware
    for the clustering software and raw devices for shared storage and Veritas VxFs 4.1 filesystem.
    My question is this:
    How do I map the raw devices and LUNs on the Hitachi SAN to Solaris 10 OS and Oracle 10g RAC ASM?
    I am aware that with an Oracle 10g RAC and ASM instance, one needs to configure the ASM instance initialization parameter file to set the asm_diskstring setting to recognize the LUNs that are presented to the host.
    I know that Sun Solaris 10 uses /dev/rdsk/CwTxDySz naming convention at the OS level for disks. However, how would I map this to Oracle 10g ASM settings?
    I cannot find this critical piece of information ANYWHERE!!!!
    Thanks for your help!

    You don't seem to state categorically that you are using Solaris Cluster, so I'll assume it since this is mainly a forum about Solaris Cluster (and IMHO, Solaris Cluster with Clusterware is better than Clusterware on its own).
    Clusterware has to see the same device names from all cluster nodes. This is why Solaris Cluster (SC) is a positive benefit over Clusterware because SC provides an automatically managed, consistent name space. Clusterware on its own forces you to manage either the symbolic links (or worse mknods) to create a consistent namespace!
    So, given the SC consistent namespace you simple add the raw devices into the ASM configuration, i.e. /dev/did/rdsk/dXsY. If you are using Solaris Volume Manager, you would use /dev/md/<setname>/rdsk/dXXX and if you were using CVM/VxVM you would use /dev/vx/rdsk/<dg_name>/<dev_name>.
    Of course, if you genuinely are using Clusterware on its own, then you have somewhat of a management issue! ... time to think about installing SC?
    Tim
    ---

  • [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()  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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Escaped ampersand still causes LPX-00242 in xmltype.transform

    Running Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    Collecting input from web form, and fetching via SQLX functions to then transform into html and plain text documents. If the "&" is inputted... the SQLX functions does escape it to "&amp;"... but the LPX-00242 error is still raised when sending to xmltype.transform.
    A simple test case:
    set define off;
    declare
    l_xsl xmltype;
    l_xml xmltype;
    begin
    l_xsl := xmltype('<?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="text"/>
    <xsl:template match="/">
    Hello <xsl:value-of select="//name"/>
    </xsl:template>
    </xsl:stylesheet>');
    l_xml := xmltype('<test><name>Jane&amp;John Doe</name></test>');
    dbms_output.put_line(l_xml.transform
                                        (l_xsl
                                        ).getclobval ());
    end;the above code raises this exception:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00241: entity reference is not well formed
    Error at line 3
    ORA-06512: at "SYS.XMLTYPE", line 138
    ORA-06512: at line 20If I rerun the above block... but change the xml string to <test><name>Jane &amp;amp; John Doe</name></test>
    I now get the following exception:
    Error at line 2
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00242: invalid use of ampersand ('&') character (use &amp;)
    Error at line 3
    ORA-06512: at "SYS.XMLTYPE", line 138
    ORA-06512: at line 20If I change the xml string to <test><name>Jane &amp;amp;amp; John Doe</name></test>.. no exceptions and displays the following:
    Hello Jane &amp;amp; John Doe
    any reason why the SQLX function escaping is not sufficient and I need to double-escape it? The working version is not ideal, since I now have to decode the entity reference back to it's character, otherwise the entity reference code is displayed in the content.
    Edited by: pl_sequel on Sep 7, 2011 2:12 PM

    Hi tsuji,
    Interesting discussion, really, but I fail to see how the way we're generating the XMLType instance in the first place is important for any subsequent transformation.
    You said :
    That part is well noticed. And that precisely poses problem.and,
    [6.2] But the working (at least for this sample) of the latter but not the former using xmltype() precisely pose the problem of either xmltype().transform() implementation contains bug [...]Could you explain again what you think works and what doesn't?
    I may be missing something but all these appear to work correctly :
    SQL> var xsldoc varchar2(4000)
    SQL> begin
      2   :xsldoc := '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      3  <xsl:output method="text"/>
      4  <xsl:template match="/">Hello <xsl:value-of select="//name"/>
      5  </xsl:template>
      6  </xsl:stylesheet>';
      7  end;
      8  /
    PL/SQL procedure successfully completed
    SQL> set define off
    SQL> select xmltransform(
      2           xmlelement("test", xmlelement("name", 'Jane&John Doe'))
      3         , :xsldoc
      4         ).getclobval() as result
      5  from dual
      6  ;
    RESULT
    Hello Jane&John Doe
    SQL> select xmltransform(
      2           xmltype('<test><name>Jane&amp;John Doe</name></test>')
      3         , :xsldoc
      4         ).getclobval() as result
      5  from dual
      6  ;
    RESULT
    Hello Jane&John Doe
    SQL> select xmltype(
      2           '<test><name>Jane&amp;John Doe</name></test>'
      3         ).transform(xmltype(:xsldoc)).getclobval() as result
      4  from dual
      5  ;
    RESULT
    Hello Jane&John Doe
    SQL> select xmlelement("test",
      2           xmlelement("name", 'Jane&John Doe')
      3         ).transform(xmltype(:xsldoc)).getclobval() as result
      4  from dual
      5  ;
    RESULT
    Hello Jane&John Doe
    In any case, you know well there is a something fishy going on, one way of looking at it or another.Yes, I agree. For sure, Oracle XSLT processors are not bug-free.
    For the case we're looking at now, the essence of the XMLType datatype is probably more to blame than the XSLT processor though.
    A little off-topic addendum about the method="html" output :
    SQL> select xmltransform(xmlelement("test",
      2           xmlelement("name", 'Jane&John Doe')
      3         ),'<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      4  <xsl:output method="html" encoding="iso-8859-15" indent="yes"/>
      5  <xsl:template match="/"><html><head/><body><p><xsl:value-of select="//name"/></p></body></html>
      6  </xsl:template>
      7  </xsl:stylesheet>').getclobval()
      8  as result
      9  from dual;
    RESULT
    <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html" charset="iso-8859-15">
      </meta>
    </head>
    <body>
      <p>Jane&#38;John Doe</p>
    </body>
    </html>
    Not perfect but the method seems supported too.
    Edited by: odie_63 on 11 sept. 2011 20:43

  • SQL Script working differently with 8i and 9i

    Hi
    I am facing strange problem with my simple SQL script called from a shell script. It bahaves differently with ORACLE 8.1.7.4 and 9.2.0.1. The machine is same.
    sqlplus -s / @Tech.sql WKC625 11 11 '11 22' ""
    This is working with 9i but it does't work with ORACLE 8.
    Actually what happens is that the argument in single quotes (') is taken as 2 separate argument.
    The Tech.sql is :
    spool add
    insert into TECH values ('&1','&2','&3','&4','&5','');
    commit;
    quit
    I tried putting double quotes also. Is something got changes between ORACLE 8 and 9i.
    Please help
    Surendra

    Are you sure it works in 9?
    If you are using UNIX, then the O/S will strip the quotes while processing the arguments. You need to use 2 single quotes around 11 22, just as you have around the empty string at the end.
    I believe that Windows does the same, but I do not use windows.
    John

  • REGEXP_LIKE query's working differently.

    Hi,
    Version :Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    i didn't understand why below query's working differently.
    First one:
                     select 'TRUE' from dual where REGEXP_LIKE( 'a', '[:alnum:]');
    'TRUE'
    TRUE  
           Second one:
                      select 'TRUE' from dual where REGEXP_LIKE( 't', '[:alnum:]');
    no rows selected
           Please clarify.

    Check this...
    WITH xx AS (
        SELECT 'a' AS lvl FROM DUAL union all
        SELECT 'l' AS lvl FROM DUAL union all
        SELECT 'n' AS lvl FROM DUAL union all
        SELECT 'u' AS lvl FROM DUAL union all
        SELECT 'm' AS lvl FROM DUAL union all
        SELECT 'r' AS lvl FROM DUAL union all
        SELECT 's' AS lvl FROM DUAL union all
        SELECT 't' AS lvl FROM DUAL union all
        SELECT 'w' AS lvl FROM DUAL
    select 'TRUE',x.lvl from xx x where REGEXP_LIKE(x.lvl, '[:alnum:]');Any other character than {a,l,n,u,m}, will return FALSE.
    HTH
    Ranit B.

  • Error inserting CLOB data into xmltype table on Solaris 8 Oracle 9.2.0.1.0

    Hi all,
    I have a table t of type xmltype.
    I have a function getData which parses an XML file and returns the CLOB data.
    I have a statement as
    "insert into t values(xmltype(getData('abc.xml')));"
    I get the following error
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [17177], [0x0], [], [], [], [], [],
    ORA-31011: XML parsing failed
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    ORA-06512: at "ADAPT.AP_CREATE_INSP_LOAD", line 57
    ORA-06512: at line 1
    At line 57 I have the above mentioned "insert into..." statement.
    Can anybody tell me what can be the problem.
    Interestingly enough, the same things work on same Oracle version on Windows 2k, Windows 2k3, another Solaris 8 machine.
    Please help asap as I am in fire fighting mode.
    Thanks & Regards,
    Aniruddha Deshpande

    Hi Aniruddha
    I think you need to post to a db forum rather than XMLP.
    Tim

  • Xmltype.transform and xsl:output method="html"

    hi, 9.2.0.4 winxp,
    i wonder whether xmltype.transform regards any output instructions in the stylesheet. i requested any of xml, html and text and always got the same result?
    any ideas or hints to more info?
    regards peter

    Sorry for jumping in on this thread, but I have a question regarding you reply. I have an XSL stylesheet that preforms XML to HTML conversion. Everything works correctly with the exception of those HTML tags that are not weel formed. Using your example if I have something like:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <input type="text" name="{NAME}" size="{DISPLAY_LENGTH}" maxlength="{LENGTH}"></input>
    </xsl:stylesheet>
    It would render HTML in the format of
    <HTML>
    <input type="text" name="in1" size="10" maxlength="20"/>
    </HTML>
    While IE can handle this Netscape can not. Is there anyway to generate completely cross browser complient HTML with XSL?
    Thanks!

Maybe you are looking for