2 Replies Latest reply: Aug 30, 2012 1:29 PM by 933216 RSS

    Disable XML Validation  (with default table defined in schema)

    933216
      Hi,
      Is there a way to disable validations when an XML is put into a XMLType table?

      I have registered my XML as,
      vsql := 'BEGIN
      DBMS_XMLSCHEMA.registerSchema(
      SCHEMAURL => ''ETV_EPG.xsd'',
      SCHEMADOC => bfilename(''MYDIR'',''MY_XSD.xsd''),
      OWNER => ''EPGMANAGER'',
      CSID => nls_charset_id(''AL32UTF8'')
      );
      END;';

      And my XSD has the following,
      <xs:element name="Data" type="ProgramGuide" xdb:defaultTable="MY_TAB" />
      which causes any XML file (which adheres to MY_XSD) which I FTP to Oracle be ingested to MY_TAB.

      However my XSD has several Key and Keyref elements which causes a lot of validations to take place and slows down the ingest. I want to skip those validations as I am confident that the XML conforms to the schema.

      Thanks in advance,
      Vishal
        • 1. Re: Disable XML Validation  (with default table defined in schema)
          user503699
          user5837642 wrote:
          Hi,
          Is there a way to disable validations when an XML is put into a XMLType table?

          I have registered my XML as,
          vsql := 'BEGIN
          DBMS_XMLSCHEMA.registerSchema(
          SCHEMAURL => ''ETV_EPG.xsd'',
          SCHEMADOC => bfilename(''MYDIR'',''MY_XSD.xsd''),
          OWNER => ''EPGMANAGER'',
          CSID => nls_charset_id(''AL32UTF8'')
          );
          END;';

          And my XSD has the following,
          <xs:element name="Data" type="ProgramGuide" xdb:defaultTable="MY_TAB" />
          which causes any XML file (which adheres to MY_XSD) which I FTP to Oracle be ingested to MY_TAB.

          However my XSD has several Key and Keyref elements which causes a lot of validations to take place and slows down the ingest. I want to skip those validations as I am confident that the XML conforms to the schema.
          Are you using Binary storage or Object relational storage? You may want to have a look at this section of the documentation to see if it helps. In particular, you may want to test if using setSchemaValidated() makes any difference.
          • 2. Re: Disable XML Validation  (with default table defined in schema)
            933216
            Thanks and sorry for the late reply.
            I am using O-R type storage and not binary XML.
            Will look at the link you suggested.
            Thanks