1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Generating case-insensitive types from xsd file

Discussion in 'SQL PL/SQL' started by bizon, Jul 24, 2014.

  1. bizon

    bizon Guest

    I want to create types from xsd file using dbms_xmlschema.registerSchema.
    The problem is all generated types are case-sensitive so I need to fill them using double quotes.
    Example:
    Code (Text):
    someobject."id" := 10;
    someobject."someText" := 'lorem ipsum';
    Is there any way to generate case-insensitive types so no need to use double quotes ?
    Code (Text):
    someobject.id := 10;
    someobject.SOMETEXT := 'lorem ipsum';
    (I need it for manage autocomplete in PLSQL Developer)
     
  2. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
    Hi.
    May be helped....
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb06stt.htm

    For example :
    Code (SQL):


    DECLARE
      doc VARCHAR2(3000) :=
        '<schema xmlns="http://www.w3.org/2001/XMLSchema"
                 targetNamespace="http://www.oracle.com/emp.xsd"
                 xmlns:emp="http://www.oracle.com/emp.xsd"
                 xmlns:xdb="http://xmlns.oracle.com/xdb">
           <complexType name="EmpType" xdb:SQLType="EMP_T">
             <sequence>
               <element name="Name" type="string"/>
               <element name="Age" type="decimal"/>
               <element name="Addr" xdb:SQLInline="false"
                        maxOccurs="unbounded" xdb:defaultTable="ADDR_TAB">
                 <complexType xdb:SQLType="ADDR_T">
                   <sequence>
                     <element name="Street" type="string"/>
                     <element name="City" type="string"/>
                   </sequence>
                 </complexType>
               </element>
             </sequence>
           </complexType>
           <element name="Employee" type="emp:EmpType"
                    xdb:defaultTable="EMP_TAB"/>
         </schema>'
    ;
    BEGIN
      DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL        => 'emp.xsd',
        SCHEMADOC        => doc,
        ENABLE_HIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE);
    END;
    /