1 2 Previous Next 17 Replies Latest reply on Apr 28, 2013 10:13 AM by odie_63 Go to original post
      • 15. Re: Escaped ampersand still causes LPX-00242 in xmltype.transform
        user640107 wrote:
        ...so I'm not clear & causes getstringval() to fail but not getclobval() . Any ideas welcome.
        If you've read the whole thread top-down, you should already know that no one may be clear about it, simply because this behaviour is not documented.

        Indeed, it seems to work only when getClobval() is used.

        A CBO trace shows the following :
        Method                                          is rewritten to                                                   error
        --------------------------------------------    ----------------------------------------------------------------  -----
        XMLTransform().getClobVal()                     XMLTRANSFORMBLOB()                                                    N
        XMLTransform().getBlobVal(csid)                 XMLTYPE.GETBLOBVAL(XMLTRANSFORM(), csid)                              Y
        XMLTransform().getStringVal()                   XMLTYPE.GETSTRINGVAL(XMLTRANSFORM())                                  Y
        XMLSerialize(content XMLTransform() as clob)    id.                                                                   Y
        XMLCast(XMLTransform() as clob)                 SYS_XQEXLOBVAL(XMLTRANSFORM())                                        Y
        XMLCast(XMLTransform() as varchar2)             CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLTRANSFORM())) as varchar2)      Y
        As you can see, only the XMLTransform().getClobVal() construct gets rewritten to a single function returning (despite its name) a CLOB instance.
        That's why, I guess, it's the only one combination that works when using the text output method.
        • 16. Re: Escaped ampersand still causes LPX-00242 in xmltype.transform
          so in summary the scenarios of failure as I understand them are the following:

          1. xmltype.transform(<stylesheet>).getClobVal ()) fails but xmltransform(<xmldoc>,<stylesheet>).getClobVal() succeeds

          2. xmltransform(<xmldoc>,<stylesheet>)*.getStringVal()* fails but xmltransform(<xmldoc>,<stylesheet>)*.getClobVal()* succeeds
          • 17. Re: Escaped ampersand still causes LPX-00242 in xmltype.transform
            user640107 wrote:
            1. xmltype.transform (<stylesheet>).getClobVal ()) fails but xmltransform (<xmldoc>,<stylesheet>).getClobVal() succeeds
            works too, as shown in {message:id=9860411}

            It also gets rewritten to XMLTRANSFORMBLOB so directly returns a CLOB without intermediate conversion, contrary to the other constructs.
            1 2 Previous Next