Different output XMLTRANSFORM and XMLTYPE.TRANSFORM

Hi,
we upgrade from 10gR2 to 11gR2 and still have problems with XML transformation. Under unknown circumstances the XMLTRANSFORM function
fails with "LPX-00660: Not a well-formed document or external entity" when the count of Page elements is greater then one.
It seems, this bug isnt fixed in 11gR2...
SET SCAN OFF
DECLARE
  xml     XMLTYPE := XMLTYPE('<?xml version="1.0" encoding="iso-8859-1"?>
<FILE>
  <DOCUMENT>
    <PAGE>
      <b101f>Hello</b101f>
      <b101>World</b101>
      <f101/>
      <REGARDS/>
    </PAGE>
  </DOCUMENT>
  <DOCUMENT>
    <PAGE>
      <list_layout xpos="10" lsign="+"/>
      <le>May</le>
      <le>the</le>
      <le stil="f">force</le>
      <le>be</le>
      <le>with</le>
      <le>you</le>
      <f101/>
      <REGARDS/>
    </PAGE>
  </DOCUMENT>
</FILE>
  xsl     XMLTYPE := XMLTYPE('<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" omit-xml-declaration="yes"/>
  <xsl:template match="node()|@*">
    <xsl:copy>
      <xsl:apply-templates select="node()|@*"/>
    </xsl:copy>
  </xsl:template>
  <xsl:template match="FILE">
    <FILE>
      <xsl:apply-templates/>
    </FILE>
  </xsl:template>
  <xsl:template match="DOCUMENT">
    <DOCUMENT>
      <xsl:apply-templates/>
    </DOCUMENT>
  </xsl:template>
  <xsl:template match="PAGE">
    <PAGE>
      <CONTENT>
        <xsl:apply-templates/>
      </CONTENT>
    </PAGE>
  </xsl:template>
  <xsl:template match="REGARDS">
    <xsl:text disable-output-escaping="yes">&#38;lt;lt;b101&#38;lt;gt;Best regards&#38;lt;lt;/b101&#38;lt;gt;</xsl:text>
  </xsl:template>
</xsl:stylesheet>
  buf   VARCHAR2(32767 CHAR);
BEGIN
  DBMS_OUTPUT.PUT_LINE(xml.transform(xsl).getClobVal());
  SELECT  xmltransform(xml, xsl).getStringVal()
  INTO    buf
  FROM    dual;
  DBMS_OUTPUT.PUT_LINE(buf);
END;
/Oracle Docu: http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb08tra.htm
XMLType instance can be transformed in the following ways:
Using Oracle SQL function XMLtransform or XMLType method transform() in the database.
Using Oracle XML Developer's Kit transformation options in the middle tier, such as XSLT Processor for Java.
You can alternatively use XMLType method transform() as an alternative to Oracle SQL function XMLtransform. It has the same functionality.
Output:
<FILE>
<DOCUMENT>
<PAGE>
<CONTENT>
<b101f>Hello</b101f>
<b101>World</b101>
<f101/>&#38;lt;lt;b101&#38;lt;gt;Best regards&#38;lt;lt;/b101&#38;lt;gt;</CONTENT>
</PAGE>
</DOCUMENT>
<DOCUMENT>
<PAGE>
<CONTENT>
<list_layout xpos="10" lsign="+"/>
<le>May</le>
<le>the</le>
<le stil="f">force</le>
<le>be</le>
<le>with</le>
<le>you</le>
<f101/>&#38;lt;lt;b101&#38;lt;gt;Best regards&#38;lt;lt;/b101&#38;lt;gt;</CONTENT>
</PAGE>
</DOCUMENT>
</FILE>
<FILE><DOCUMENT><PAGE><CONTENT><b101f>Hello</b101f><b101>World</b101><f101></f101><b101>Best regards</b101></CONTENT></PAGE></DOCUMENT><DOCUMENT><PAGE><CONTENT><list_layout xpos="10" lsign="+"></list_layout><le>May</le><le>the</le><le stil="f">force</le><le>be</le><le>with</le><le>you</le><f101></f101><b101>Best regards</b101></CONTENT></PAGE></DOCUMENT></FILE>

Hi,
we upgrade from 10gR2 to 11gR2 and still have problems with XML transformation. Under unknown circumstances the XMLTRANSFORM function
fails with "LPX-00660: Not a well-formed document or external entity" when the count of Page elements is greater then one.
It seems, this bug isnt fixed in 11gR2...
SET SCAN OFF
DECLARE
  xml     XMLTYPE := XMLTYPE('<?xml version="1.0" encoding="iso-8859-1"?>
<FILE>
  <DOCUMENT>
    <PAGE>
      <b101f>Hello</b101f>
      <b101>World</b101>
      <f101/>
      <REGARDS/>
    </PAGE>
  </DOCUMENT>
  <DOCUMENT>
    <PAGE>
      <list_layout xpos="10" lsign="+"/>
      <le>May</le>
      <le>the</le>
      <le stil="f">force</le>
      <le>be</le>
      <le>with</le>
      <le>you</le>
      <f101/>
      <REGARDS/>
    </PAGE>
  </DOCUMENT>
</FILE>
  xsl     XMLTYPE := XMLTYPE('<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" omit-xml-declaration="yes"/>
  <xsl:template match="node()|@*">
    <xsl:copy>
      <xsl:apply-templates select="node()|@*"/>
    </xsl:copy>
  </xsl:template>
  <xsl:template match="FILE">
    <FILE>
      <xsl:apply-templates/>
    </FILE>
  </xsl:template>
  <xsl:template match="DOCUMENT">
    <DOCUMENT>
      <xsl:apply-templates/>
    </DOCUMENT>
  </xsl:template>
  <xsl:template match="PAGE">
    <PAGE>
      <CONTENT>
        <xsl:apply-templates/>
      </CONTENT>
    </PAGE>
  </xsl:template>
  <xsl:template match="REGARDS">
    <xsl:text disable-output-escaping="yes">&#38;lt;lt;b101&#38;lt;gt;Best regards&#38;lt;lt;/b101&#38;lt;gt;</xsl:text>
  </xsl:template>
</xsl:stylesheet>
  buf   VARCHAR2(32767 CHAR);
BEGIN
  DBMS_OUTPUT.PUT_LINE(xml.transform(xsl).getClobVal());
  SELECT  xmltransform(xml, xsl).getStringVal()
  INTO    buf
  FROM    dual;
  DBMS_OUTPUT.PUT_LINE(buf);
END;
/Oracle Docu: http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb08tra.htm
XMLType instance can be transformed in the following ways:
Using Oracle SQL function XMLtransform or XMLType method transform() in the database.
Using Oracle XML Developer's Kit transformation options in the middle tier, such as XSLT Processor for Java.
You can alternatively use XMLType method transform() as an alternative to Oracle SQL function XMLtransform. It has the same functionality.
Output:
<FILE>
<DOCUMENT>
<PAGE>
<CONTENT>
<b101f>Hello</b101f>
<b101>World</b101>
<f101/>&#38;lt;lt;b101&#38;lt;gt;Best regards&#38;lt;lt;/b101&#38;lt;gt;</CONTENT>
</PAGE>
</DOCUMENT>
<DOCUMENT>
<PAGE>
<CONTENT>
<list_layout xpos="10" lsign="+"/>
<le>May</le>
<le>the</le>
<le stil="f">force</le>
<le>be</le>
<le>with</le>
<le>you</le>
<f101/>&#38;lt;lt;b101&#38;lt;gt;Best regards&#38;lt;lt;/b101&#38;lt;gt;</CONTENT>
</PAGE>
</DOCUMENT>
</FILE>
<FILE><DOCUMENT><PAGE><CONTENT><b101f>Hello</b101f><b101>World</b101><f101></f101><b101>Best regards</b101></CONTENT></PAGE></DOCUMENT><DOCUMENT><PAGE><CONTENT><list_layout xpos="10" lsign="+"></list_layout><le>May</le><le>the</le><le stil="f">force</le><le>be</le><le>with</le><le>you</le><f101></f101><b101>Best regards</b101></CONTENT></PAGE></DOCUMENT></FILE>

Similar Messages

  • 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.

  • 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.

  • 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!

  • Different Output of the template from Template Builder and Oracle Apps.

    Hi,
    I have created a template with a page layout of 11" X 17" this template has around 18 columns.
    When i load the XML data and run it from XML Template builder 5.6.2 the output is fine but when I run it through oracle applications i get different output basically the output from oracle applications comes in 7 pages (First page has half page output , 2 nd page has 3/4th page output.....) where as from XML template builder the output comes in 6 Full pages.
    Wher am i going wrong.
    Thanks in Advance.

    The output is in PDF format.

  • Output differs from Printpreview and Spool ?

    Hello All,
    Let me tell u my actual problem.
    1. When I see the output of the PO in the Print Preview it's coming perfectly.
    But when I see the output of the same PO in the Spool it's not the same.
    2. For this reason I want to Debug the PO in both the cases i.e Print Preview case and Spool Case.
    3. When I'm trying to debug in the Print Preview case it's going into the script and I'm able to check the values. But that'S not my Problem .
    My Problem is with the Spool case bcoz I'm getting a different output when compared to that of the Print Preview Output.
    4. SO I want to debug the script whn I choose the Spool Option .
    i.e Path is : ME22N --> GIve a PO --> Click on Messages Tab --> Select any of the Processed Record and Press Repeat output and --> SAVE.
    Before pressing the SAVE Button I pressed /h and started to debug .
    But It's not going into the script at all.Instead it is going to some other standard program and creating a spool request.
    5. My first Qn is : When viewed from the Spool will it go into the script or not ?
    My second Qn is : Hw to debug the script when we are seeing the output from a SPOOL i.e from the Path :
    ME22N --> GIve a PO --> Click on Messages Tab --> Select any of the Processed Record and Press Repeat output and --> SAVE.
    Hope I'm clear now in my Explanation.
    Regards,
    Deepu.K

    It seems to be an issue with the Output Device. For the Spool, try to print on a different printer/ or the default SAP output device (SAPWIN device type).
    If the output comes correctly, then the issue is with the Driver.
    Regards,
    abhishek

  • Query is dispalying different output in BEX and Web

    Hi,
    I am getting the correct output when i am running the standard query 0CQM_PCQMCCSI_Q0001 in the BEX analyzer.I am getting the wrong output if i run the same query through web.
    It is displaying the different key figure and characteristic in the output which is not defined in the query.
    If i copy the same query as Z query and execute it ,it is working fine in both BEX Analyzer and Web.
    Kindly suggest me regarding this.
    Thanks & Regards,
    Sangeetha.A

    Check your dataprovider assignments in your Web Query in your web items check charecteristics assignments

  • Acrobat DC and XI different Output preview; same setting on the same machine

    Hello,
    I've got an question regarding Output preview
    My sample PDF does have different output preview values on Acrobat DC (100% Black) and Acrobat XI (CMYK values)
    Both use the same setting (Euroscale Coated v2), doc has no PDF/X output intent
    Still..... it's strange that on one Mac the PDF does look different....
    What's going wrong?
    Kind regards

    Numerous fixes went into color display on MacOS for Acrobat DC as well as in Output Preview in general. That having been said, I don't recall any changes that would have resulted in the phenomena you are seeing.
    I assume you were clicking on the “black” circle to get you sample color values? And what do you believe should be the correct values? CMYK=(0,0,0,1) or CMYK=(0.8,0.64,0.67,0.75)?
    If you can post a copy of this file, we can examine it to see what is going on.
                  - Dov

  • Cd c:\java gives me different output and javac doesnt work

    Dear friends;
    once I type cd c:\java it gives me different output and after that javac doesn't work
    Like
    javac filename.java
    doesnt compile.
    Any comments, please.
    C:\Program Files>java
    Usage: java [-options] class [args...]
    (to execute a class)
    or java [-options] -jar jarfile [args...]
    (to execute a jar file)
    where options include:
    -client to select the "client" VM
    -server to select the "server" VM
    -hotspot is a synonym for the "client" VM [deprecated]
    The default VM is client.
    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
    A ; separated list of directories, JAR archives,
    and ZIP archives to search for class files.
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -showversion print product version and continue
    -? -help print this help message
    -X print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
    enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
    disable assertions
    -esa | -enablesystemassertions
    enable system assertions
    -dsa | -disablesystemassertions
    disable system assertions
    C:\Program Files>

    That error means that the file does not exist or you got the filename wrong (which means it does not exist)...
    recheck the location of your file and verify that it actually there...
    Step 2, now that we know that the J2SDK1.4.2_03 is installed in C:\j2sdk1.4.2_03\bin...
    We can now set you path... If you have an Windows 2000 or XP then check this link in the forum...
    http://forum.java.sun.com/thread.jsp?forum=54&thread=491703&tstart=0&trange=15
    So what you do is right click on My Computer (icon) which will give you a menu...
    Select Properties at which point you will see the System Properties Dialog window...
    Select the Advanced Tab (called Details in Win2000) Click on the Environment Variables button...
    Which will open the Environment Variable Dialog window... then in the second little window labeled System Variables, select Path and click on the edit button...
    you will now see the Edit System Variable dialog window...
    in Variable Value goto the the end of that line (make sure that nothing is selected/highlighted), type
    ";c:\j2sdk1.4.2_3\bin
    make sure that you include the semicolon...
    click ok to make the change, and via the ok buttons exit System Properties...
    reopen DOS and now you should be able to run Javac.exe anywhere...
    Hope this helps...
    -MaxxDmg...
    -' He who never sleeps...'

  • Can I send Logic drummer separate tracks to different outputs?  When I select the separate drum tracks the output is set and not changeable

    I am using the Producer drummers in Logic where the different drums parts,(snare, overheads, Kick, etc) are broken into separate tracks.  I would like to take some of these tracks (for ex. snare) and route it to a different output bus.   When I try to do this the output is not modifiable.  Anyone find a way around this?

    The question is not to find a way around it, the question is why it behaves that way in your Project.
    A Producer Kit is just a Summing Stack, were all the individual Channel Strips (Subtracks) are routed to the same Bus that the Master Stack Channel Strip uses as its input.
    In the example of the screenshot, the Summing Stack uses Bus 2, but I selected different Outputs for the firstsix Subtracks, even a Surround Output, whatever is available under the Output Selection Button. Only the "Tom High" Channel Strip is still routed via Bus 2 to the Master Stack Channel Strip.
    You can find more in-depth explanations about the Drummer in my graphically enhanced manual "Logic Pro X - How it Works".
    Try to use a different Project and see if you can change the output routing there.
    Hope that helps
    Edgar Rothermich
    http://DingDingMusic.com/Manuals/
    'I may receive some form of compensation, financial or otherwise, from my recommendation or link.'

  • Is it possible to have 2 different output config XML files and index the data into 2 endeca apps using the same indexing component ProductCatalogSimpleIndexingAdmin

    Hi ,
    We have a catalog that defines 2 types of products (they have too many different properties), so wanted to keep them on two different MDEX engines and serve the applications requests. Here DB catalog and front end ATG application is same for both the MDEX instances.
    Is it possible to have 2 different output config XML files and index the data into 2 endeca apps using the same indexing component ProductCatalogSimpleIndexingAdmin?
    Thanks
    Dev

    Hi, also have had some problem some monthes ago - I created separete component ProductCatalogSimpleIndexingAdminSecond. After that one of my colleage gave me some advice:
    The creating separate component like ProductCatalogSimpleIndexingAdmin for the second IOC is possible way for resolving your situation. But I afraid that this way will be required creating mane duplicates for already existed components.
    In my opinion the better way is the following:
    starting from AssemblerApplicationConfiguration and ApplicationConfiguration component. It contains details for connecting between ATG and Endeca. Of course you should configure different components for different Endeca Apps.
    After that:
    Find all components that uses AssemblerApplicationConfiguration and ApplicationConfiguration. Customize these components for using one or another  *Configuration component depending on what index works. (many variants released it: the most simple global custom component with flag.)
    Then customize the existed ProductCatalogSimpleIndexingAdmin. Using one or another IOC  and setting the flag in global custom component when index started. You can add some methods into your custom ProductCatalogSimpleIndexingAdmin like:
    Execute baseline index for both IOC (one by one)
    Execute baseline for IOC 1
    Execute baseline for IOC 2.
    Note: you should be afraid about incremental (partial) index in this configuration. But resolving conflicts in incremental index should be done after full implementation these changes.
    Regards

  • Servlet is giving different output on JBuilder 2005(IDE) and on browser

    Hi all
    I am using JBuilder2005 for devloping servlets.
    While I am executing the code on JBuilder itself..it's working out fine..
    But when I am trying to use browser for calling a servlet...I am getting Different output..
    Can Anyone tell me why is so..and where I have to make changes so that I can do the same from browser also
    Thx
    Vijay

    What do u mean on JBuilder? The browser built-in to JBuilder? What are the different outputs?

  • In Lightroom CC images look different in Library and Develop modules. After output, images do not appear as they do in Develop.

    As above.

    Mac OS X 10.9.5 has a color management bug that can lead to colors appearing different in Develop and Library: Jao's photo blog: Serious color management bug in Mac OS 10.9 "Mavericks" . See also: Jao's photo blog: Further quantification of the Mavericks color management problem and Jao's photo blog: Color management in Safari is broken in Mavericks too. Sorry for all the links to my blog, but this bug really annoys me and it bugs me that it hasn't been fixed all these months that Mavericks has been out. This can lead to color shifts especially in the deep tones. You can sometimes work around it by turning on soft proofing and proofing to adobeRGB or sRGB. Adobe could fix this but they haven't so far. Apple could fix it too, but they haven't until now. They fixed some code that lead to Aperture working correctly but Lightroom still has the problem.

  • [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$

  • 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

Maybe you are looking for

  • Re: BIP Scheduling Error msg

    Hi all, I have scheduled reports in BI Publisher but it is failing with this below errors. why it si giving like that, if any one knows plz help me it is very Urgent. 1 Report oracle.apps.xdo.servlet.scheduler.ProcessingException: oracle.apps.xdo.XDO

  • In Bridge, can't open jpeg in camera raw

    I have CS3 installed on several computers. On one of them, apparently Bridge and/or Raw never updated to the ability to open a jpeg in Raw. I can do this on the other computers. When I suggest running updates, it says none are needed. I'm confused. M

  • Best import settings for re-mastered Beatles CDs?

    I'm getting the Beatles remastered CDs, and am wondering what would be the best import settings in iTunes to really hear the difference. WAVE encoder? Apple lossless? AAC? And would there be a difference in what settings I choose if I were to get e m

  • Widescreen

    I am making a video and I am recording it as 16:9 widescreen on my camera. I imported the video into Final Cut Express with the "anamorphic" capturing option but when I export the video it has the black bars. I want to make sure when it will be true

  • Query to get Weekly Report

    Hello, I wrote a query to get weekly report, which should start from Sunday to Saturday a typical week. for example the week is 04/03/2011 to 04/09/2011 i run the query on or Job on say on anyday of the week of 04/10/2011, 04.11.2011 etc.. here is my