URL based xml schema

Hi,
can the XML schema located at a URL (location on internet) be registered
in the database for validation against XML data. (using 9iR2)
If yes , can you pls give example to do this.
currently i am using the dbms_xmlschema.registerSchema() to register
the XML schema (String/doc based) and using functions to validate the XML data while loading.
thanks,
melvin

Hi Melvin,
You can register the XML Schema located at a URL using 9iR2.
Please find below an example for registering a transaction.xsd Schema located at a URL using XML DB :
DECLARE
doc VARCHAR2(2000) := '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb">
<xs:element name="TRANSACTION">
<xs:complexType xdb:SQLType="XML_TRANSACTION">
<xs:sequence>
<xs:element name="TR_ID" type="xs:int" nillable="false"/>
<xs:element name="ACC_NO_DEBIT" type="xs:float"/>
<xs:element name="ACC_NO_CREDIT" type="xs:float"/>
<xs:element name="TR_AMOUNT" type="xs:float" default="0" nillable="false"/>
<xs:element name="TR_DATE" type="xs:date"/>
<xs:element name="TR_DESCRIPTION" type="xs:string"/>     
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>';
BEGIN
dbms_xmlschema.registerSchema('http://otn.oracle.com/transaction.xsd', doc);
END;
Hope it solves your query.
Thanks
Shefali

Similar Messages

  • XMLType column based on XML Schema: several questions

    Hi,
    I've a table on an oracle db version 10.1.0.4 where I stage the xml files containing orders created on a third party's system using BizTalk.
    Although the storage I opted for is based on an XML Schema, defined by this third-party, I am facing big perfomance issues with files bigger than a few hundreds of kBs.
    For instance, a 32Mb file takes more than 2 hours to be processed.
    Now, after reading other threads in this forum and the documentation, my understanding of the problem is that the whole issue is with the correct indexing of the nested tables.
    Here is my current XML Schema definition:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema
                   xmlns:xs="http://www.w3.org/2001/XMLSchema"
                   xmlns:xdb="http://xmlns.oracle.com/xdb"
                   elementFormDefault="qualified"
                   attributeFormDefault="unqualified"
                   xdb:storeVarrayAsTable="true">
         <xs:include schemaLocation="private/Types.xsd"/>
         <xs:element name="PickData">
              <xs:complexType xdb:maintainDOM="false">
                   <xs:sequence>
                        <xs:element name="ProdRun">
                             <xs:complexType xdb:maintainDOM="false">
                                  <xs:sequence>
                                       <xs:element name="Nr" type="xs:int"/>
                                       <xs:element name="Date" type="string8"/>
                                       <xs:element name="Final" type="xs:int"/>
                                       <xs:element name="PickWave" maxOccurs="unbounded">
                                            <xs:complexType xdb:maintainDOM="false">
                                                 <xs:sequence>
                                                      <xs:element name="Nr" type="string10"/>
                                                      <xs:element name="ProdLine" type="string2"/>
                                                      <xs:element name="TourSeq" type="xs:int"/>
                                                      <xs:element name="Tour" type="string20"/>
                                                      <xs:element name="Customer" maxOccurs="unbounded">
                                                           <xs:complexType xdb:maintainDOM="false">
                                                                <xs:sequence>
                                                                     <xs:element name="Seq" type="string20"/>
                                                                     <xs:element name="Cust" type="string10"/>
                                                                     <xs:element name="Mod" type="string30"/>
                                                                     <xs:element name="Tod" type="string30"/>
                                                                     <xs:element name="InvOrder" maxOccurs="unbounded">
                                                                          <xs:complexType xdb:maintainDOM="false">
                                                                               <xs:sequence>
                                                                                    <xs:element name="Nr" type="string20"/>
                                                                                    <xs:element name="Item" type="string20"/>
                                                                                    <xs:element name="Qty" type="xs:int"/>
                                                                                    <xs:element name="Priority" type="xs:int"/>
                                                                                    <xs:element name="Reordering" type="xs:int"/>
                                                                                    <xs:element name="DelDate" type="string8"/>
                                                                                    <xs:element name="HlOrder" type="string20"/>
                                                                               </xs:sequence>
                                                                          </xs:complexType>
                                                                          <xs:unique name="InvOrderKey">
                                                                               <xs:selector xpath="InvOrder"/>
                                                                               <xs:field xpath="Nr"/>
                                                                          </xs:unique>
                                                                     </xs:element>
                                                                </xs:sequence>
                                                           </xs:complexType>
                                                           <xs:unique name="CustomerKey">
                                                                <xs:selector xpath="Customer"/>
                                                                <xs:field xpath="Seq"/>
                                                           </xs:unique>
                                                      </xs:element>
                                                 </xs:sequence>
                                            </xs:complexType>
                                            <xs:unique name="PickWaveKey">
                                                 <xs:selector xpath="PickWave"/>
                                                 <xs:field xpath="Nr"/>
                                            </xs:unique>
                                       </xs:element>
                                  </xs:sequence>
                             </xs:complexType>
                             <xs:unique name="ProdRunKey">
                                  <xs:selector xpath="ProdRun"/>
                                  <xs:field xpath="Nr"/>
                             </xs:unique>
                        </xs:element>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    Here is the included sub-schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
              <xsd:simpleType name="string2">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="2"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string5">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="5"/>
    </xsd:restriction>
    </xsd:simpleType>
              <xsd:simpleType name="string6">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="6"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string8">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="8"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string10">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="10"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string15">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="15"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string20">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="20"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string30">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="30"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string40">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="40"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string50">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="50"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string250">
                   <xsd:restriction base="xsd:string">
                        <xsd:maxLength value="250"/>
                   </xsd:restriction>
              </xsd:simpleType>
         </xsd:schema>
    The statement for creating my table is
    CREATE TABLE "XML_ORDERS"
    ("ID" NUMBER(7,0) NOT NULL ENABLE,
    "XMLFILE" "SYS"."XMLTYPE" ,
    "INSERTED" DATE DEFAULT sysdate,
    CONSTRAINT "XML_ORDERS_PK" PRIMARY KEY ("ID") USING INDEX ENABLE
    ) XMLTYPE COLUMN XMLFILE STORE AS OBJECT RELATIONAL
    XMLSCHEMA "private/PickData.xsd" ELEMENT "PickData"
    Here is a simple instance document:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <PickData xsi:noNamespaceSchemaLocation="private/PickData.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ProdRun>
    <Nr>5</Nr>
    <Date>15112005</Date>
    <Final>1</Final>
    <PickWave>
    <Nr>IPW0000017</Nr>
    <ProdLine>01</ProdLine>
    <TourSeq>1</TourSeq>
    <Tour>00000043_078</Tour>
    <Customer>
    <Seq>5</Seq>
    <Cust>100000006</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000457</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000742</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000459</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000742</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>6</Seq>
    <Cust>100000013</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000461</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000743</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000463</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000743</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>2</Seq>
    <Cust>100000114</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000465</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000744</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000467</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000744</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>3</Seq>
    <Cust>100000140</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000469</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000745</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000471</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000745</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>7</Seq>
    <Cust>100000143</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000473</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000746</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000475</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000746</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>8</Seq>
    <Cust>100000145</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000477</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000747</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000479</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000747</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>9</Seq>
    <Cust>100000146</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000481</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>0</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000748</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000483</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000748</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>4</Seq>
    <Cust>100000147</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000485</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>0</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000750</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000487</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000750</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>10</Seq>
    <Cust>100000148</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000489</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>0</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000751</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000491</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000751</HlOrder>
    </InvOrder>
    </Customer>
    </PickWave>
    </ProdRun>
    </PickData>
    When I registered the XMLSchema, the following types and tables were automatically created and you can see the hierarchy below:
    (by the way, I could not find any xdb_utilities.printNestedTables mentioned elsewhere)
    XML_ORDERS
    |_PickData381_T
    |___ProdRun382_T
    |_____PickWave388_COLL
    |_______PickWave383_T
    |_________Customer387_COLL
    |___________Customer384_T
    |_____________InvOrder386_COLL
    These objects are then used in the following nested tables:
    TABLE_NAME     TABLE_TYPE_NAME     PARENT_TABLE_NAME     PARENT_TABLE_COLUMN
    SYS_NTaK/5zar5S0WitSsgu6OKPQ==     PickWave388_COLL     PickData389_TAB     "XMLDATA"."ProdRun"."PickWave"
    SYS_NTf6QvwVm8SFKz+K/YYWq+WQ==     Item408_COLL     ProdData409_TAB     "XMLDATA"."Item"
    SYS_NTtu05ilrRQqmuEN4k+07VDA==     Customer402_COLL     OutboundParty403_TAB     "XMLDATA"."Customer"
    SYS_NTK6fhWq5uTJ+vKcgBpNm1Fg==     InvOrder386_COLL     SYS_NTIIzv7bkXQSSS43igtfi5eg==     InvOrder
    SYS_NTIIzv7bkXQSSS43igtfi5eg==     Customer387_COLL     SYS_NTaK/5zar5S0WitSsgu6OKPQ==     Customer
    I enabled sql tracing and I got the following TKPROF output
    INSERT INTO IMP_ORDERS (PICK_INVORDERNR, PICK_ITEM, PICK_QTY, PICK_PRIORITY,
    PICK_REORDERING, PICK_HLORDER, PICK_DELDATE, PICK_CUST, PICK_MOD, PICK_TOD,
    PICK_SEQ, PICK_PICKWAVENR, PICK_PICKWAVEPRODLINE, PICK_PICKWAVETOUR,
    PICK_PICKWAVETOURSEQ, PICK_ORDKEY, PICK_RUNKEY) SELECT INVORDERNR, ITEM,
    QTY, PRIORITY, REORDERING, HLORDER, DELDATE, CUST, MOD, TOD, SEQ,
    PICKWAVENR, PICKWAVEPRODLINE, PICKWAVETOUR, PICKWAVETOURSEQ, ROWNUM AS
    PICK_ORDKEY, PRODRUNID FROM (SELECT /*+ cardinality(g 15)*/
    EXTRACTVALUE(VALUE(G), '/InvOrder/Nr') AS INVORDERNR, EXTRACTVALUE(VALUE(G),
    '/InvOrder/Item') AS ITEM, EXTRACTVALUE(VALUE(G), '/InvOrder/Qty') AS QTY,
    EXTRACTVALUE(VALUE(G), '/InvOrder/Priority') AS PRIORITY,
    EXTRACTVALUE(VALUE(G), '/InvOrder/Reordering') AS REORDERING,
    EXTRACTVALUE(VALUE(G), '/InvOrder/HlOrder') AS HLORDER,
    TO_DATE(EXTRACTVALUE(VALUE(G), '/InvOrder/DelDate'),'DDMMYYYY') AS DELDATE,
    F.CUST, F.MOD, F.TOD, F.SEQ, F.PICKWAVENR, F.PICKWAVEPRODLINE,
    F.PICKWAVETOUR, F.PICKWAVETOURSEQ, F.PRODRUNNR, F.PRODRUNDATE,
    F.PRODRUNFINAL, F.PRODRUNID FROM (SELECT /*+ cardinality(e 60)*/VALUE(E) AS
    CUSTOMERNODE, EXTRACTVALUE(VALUE(E), '/Customer/Cust') AS CUST,
    EXTRACTVALUE(VALUE(E), '/Customer/Mod') AS MOD, EXTRACTVALUE(VALUE(E),
    '/Customer/Tod') AS TOD, TO_NUMBER(EXTRACTVALUE(VALUE(E), '/Customer/Seq'))
    AS SEQ, D.PICKWAVENR, D.PICKWAVEPRODLINE, D.PICKWAVETOUR, D.PICKWAVETOURSEQ,
    D.PRODRUNNR, D.PRODRUNDATE, D.PRODRUNFINAL, D.PRODRUNID FROM (SELECT /*+
    cardinality(c 100)*/VALUE(C) AS PICKWAVENODE, EXTRACTVALUE(VALUE(C),
    '/PickWave/Nr') AS PICKWAVENR, TO_NUMBER(EXTRACTVALUE(VALUE(C),
    '/PickWave/ProdLine')) AS PICKWAVEPRODLINE, EXTRACTVALUE(VALUE(C),
    '/PickWave/Tour') AS PICKWAVETOUR, TO_NUMBER(EXTRACTVALUE(VALUE(C),
    '/PickWave/TourSeq')) AS PICKWAVETOURSEQ, A.PRODRUNNR, A.PRODRUNDATE,
    A.PRODRUNFINAL, A.PRODRUNID FROM (SELECT /*+ cardinality(b 1)*/VALUE(B) AS
    PRODRUNNODE, EXTRACTVALUE(VALUE(B), '/ProdRun/Nr') AS PRODRUNNR,
    TO_DATE(EXTRACTVALUE(VALUE(B), '/ProdRun/Date'),'DDMMYYYY') AS PRODRUNDATE,
    EXTRACTVALUE(VALUE(B), '/ProdRun/Final') AS PRODRUNFINAL, X.ID PRODRUNID
    FROM XML_ORDERS X, TABLE(XMLSEQUENCE(EXTRACT(X.XMLFILE,'/PickData/ProdRun'))
    ) B WHERE X.ID = :B1 ) A, TABLE(XMLSEQUENCE(EXTRACT(A.PRODRUNNODE,
    '/ProdRun/PickWave'))) C ) D, TABLE(XMLSEQUENCE(EXTRACT(D.PICKWAVENODE,
    '/PickWave/Customer'))) E ) F, TABLE(XMLSEQUENCE(EXTRACT(F.CUSTOMERNODE,
    '/Customer/InvOrder'))) G ORDER BY PICKWAVEPRODLINE, PICKWAVETOURSEQ,
    PICKWAVENR, SEQ )
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 4324.09 9994.65 0 57193 0 0
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 4324.09 9994.65 0 57193 0 0
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 68 (recursive depth: 1)
    Rows Row Source Operation
    0 COUNT (cr=0 pr=0 pw=0 time=180 us)
    0 VIEW (cr=0 pr=0 pw=0 time=166 us)
    0 SORT ORDER BY (cr=0 pr=0 pw=0 time=152 us)
    40866 NESTED LOOPS (cr=54973 pr=0 pw=0 time=31065606 us)
    1363 NESTED LOOPS (cr=54937 pr=0 pw=0 time=11037183 us)
    1 NESTED LOOPS (cr=54889 pr=0 pw=0 time=10145883 us)
    1 NESTED LOOPS (cr=54841 pr=0 pw=0 time=9799012 us)
    1 TABLE ACCESS BY INDEX ROWID XML_ORDERS (cr=2 pr=0 pw=0 time=222 us)
    1 INDEX UNIQUE SCAN XML_ORDERS_PK (cr=1 pr=0 pw=0 time=126 us)(object id 58551)
    1 COLLECTION ITERATOR PICKLER FETCH (cr=54839 pr=0 pw=0 time=9798748 us)
    1 COLLECTION ITERATOR PICKLER FETCH (cr=48 pr=0 pw=0 time=346818 us)
    1363 COLLECTION ITERATOR PICKLER FETCH (cr=48 pr=0 pw=0 time=870830 us)
    40866 COLLECTION ITERATOR PICKLER FETCH (cr=36 pr=0 pw=0 time=18739302 us)
    Note that I cancelled this operation before it was over so I imagine that these figures refer to the statistics as of the time when the operation was interrupted.
    So, here are finally my questions.
    In order to create the constraints on the nested tables as shown in other threads, do I need to drop the existing xml_orders table and ancillary object types and recreate them or is there a way to add such constraints using the existing system generated object names?
    Secondly, the xml_orders table may contain severale documents, not just one and his current primary key is the column ID. So, in order to uniquely identify the deepest element in the xml document, I need first to select the relevant document by means of the id column.
    Would it be better to create the indexes containing this id column together with the nested_table_id and array_index?
    Thanks for you help.
    Flavio
    PS: I wrote a 10 lines xsl transformation that I passed on to Saxon together with the 32Mb file. It took less than 1 minute to produce a flat file that was loaded almost instantly by SQL*Loader. So, what I am looking for is a procedure loading this stuff in less than 2 minutes or possibly less.

    Does the following help
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 27 21:44:53 2005
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> spool registerSchema_&4..log
    SQL> set trimspool on
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> declare
      2    result boolean;
      3  begin
      4    result := dbms_xdb.createResource('/home/&1/xsd/&4',
      5                                      bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
      6  end;
      7  /
    old   4:   result := dbms_xdb.createResource('/home/&1/xsd/&4',
    new   4:   result := dbms_xdb.createResource('/home/OTNTEST/xsd/GetaxTypes.xsd',
    old   5:                                    bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
    new   5:                                    bfilename(USER,'GetaxTypes.xsd'),nls_charset_id('AL32UTF8'));
    PL/SQL procedure successfully completed.
    SQL> commit
      2  /
    Commit complete.
    SQL> alter session set events='31098 trace name context forever'
      2  /
    Session altered.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      schemaURL => '&3',
      5      schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
      6      local     => TRUE,
      7      genTypes  => TRUE,
      8      genBean   => FALSE,
      9      genTables => &5
    10    );
    11  end;
    12  /
    old   4:     schemaURL => '&3',
    new   4:     schemaURL => 'private/GetaxTypes.xsd',
    old   5:     schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
    new   5:     schemaDoc => xdbURIType('/home/OTNTEST/xsd/GetaxTypes.xsd').getClob(),
    old   9:     genTables => &5
    new   9:     genTables => TRUE
    PL/SQL procedure successfully completed.
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 27 21:44:55 2005
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> spool registerSchema_&4..log
    SQL> set trimspool on
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> declare
      2    result boolean;
      3  begin
      4    result := dbms_xdb.createResource('/home/&1/xsd/&4',
      5                                      bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
      6  end;
      7  /
    old   4:   result := dbms_xdb.createResource('/home/&1/xsd/&4',
    new   4:   result := dbms_xdb.createResource('/home/OTNTEST/xsd/PickData.xsd',
    old   5:                                    bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
    new   5:                                    bfilename(USER,'PickData.xsd'),nls_charset_id('AL32UTF8'));
    PL/SQL procedure successfully completed.
    SQL> commit
      2  /
    Commit complete.
    SQL> alter session set events='31098 trace name context forever'
      2  /
    Session altered.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      schemaURL => '&3',
      5      schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
      6      local     => TRUE,
      7      genTypes  => TRUE,
      8      genBean   => FALSE,
      9      genTables => &5
    10    );
    11  end;
    12  /
    old   4:     schemaURL => '&3',
    new   4:     schemaURL => 'private/PickData.xsd',
    old   5:     schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
    new   5:     schemaDoc => xdbURIType('/home/OTNTEST/xsd/PickData.xsd').getClob(),
    old   9:     genTables => &5
    new   9:     genTables => TRUE
    PL/SQL procedure successfully completed.
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 27 21:44:58 2005
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> spool createTable.log
    SQL> --
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> CREATE TABLE "XML_ORDERS"
      2     ("ID" NUMBER(7,0) NOT NULL ENABLE,
      3      "XMLFILE" "SYS"."XMLTYPE" ,
      4      "INSERTED" DATE DEFAULT sysdate,
      5       CONSTRAINT "XML_ORDERS_PK" PRIMARY KEY ("ID") USING INDEX ENABLE
      6     ) XMLTYPE COLUMN XMLFILE STORE AS OBJECT RELATIONAL
      7       XMLSCHEMA "private/PickData.xsd"
      8       ELEMENT "PickData"
      9           VARRAY XMLFILE."XMLDATA"."ProdRun"."PickWave" STORE AS TABLE PickWave_TAB
    10             (
    11                ( primary key (nested_table_id, array_index)
    12                ) organization index overflow
    13                VARRAY "Customer" STORE AS TABLE Customer_TAB
    14                  (
    15                    (primary key (nested_table_id, array_index)
    16                    ) organization index overflow
    17                    VARRAY "InvOrder" STORE AS TABLE InvOrder_TAB
    18                      (
    19                        (primary key (nested_table_id, array_index)
    20                        ) organization index overflow
    21                      )
    22                  )
    23            )
    24  /
    Table created.
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 27 21:44:59 2005
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> spool insertFile_&3..log
    SQL> set trimspool on
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> set timing on
    SQL> set long 10000
    SQL> --
    SQL> insert into XML_ORDERS (ID, XMLFILE) values (&4, xmltype(bfilename(USER,'&3'),nls_charset_id('AL32UTF8')))
      2  /
    old   1: insert into XML_ORDERS (ID, XMLFILE) values (&4, xmltype(bfilename(USER,'&3'),nls_charset_id('AL32UTF8')))
    new   1: insert into XML_ORDERS (ID, XMLFILE) values (10, xmltype(bfilename(USER,'testcase.xml'),nls_charset_id('AL32UT
    8')))
    1 row created.
    Elapsed: 00:00:00.11
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.01
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 27 21:44:59 2005
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> spool testcase.log
    SQL> set trimspool on
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> set timing on
    SQL> set long 10000
    SQL> set pages 0 lines 140
    SQL> --
    SQL> -- Testcase code here
    SQL> --
    SQL> set autotrace on explain
    SQL> --
    SQL> create or replace view PROD_RUN_VIEW
      2  (
      3    PRODRUNNODE,
      4    PRODRUNNR,
      5    PRODRUNDATE,
      6    PRODRUNID,
      7    PRODRUNFINAL
      8  )
      9  as
    10  select EXTRACT(XMLFILE,'/PickData/ProdRun'),
    11         EXTRACTVALUE(XMLFILE , '/PickData/ProdRun/Nr'),
    12         TO_DATE(EXTRACTVALUE(XMLFILE, '/PickData/ProdRun/Date'),'DDMMYYYY'),
    13         ID,
    14         EXTRACTVALUE(XMLFILE,'/PickData/ProdRun/Final')
    15    from XML_ORDERS
    16  /
    View created.
    Elapsed: 00:00:00.09
    SQL> create or replace view PICK_WAVE_VIEW
      2  (
      3    PICKWAVENODE,
      4    PICKWAVENR,
      5    PICKWAVEPRODLINE,
      6    PICKWAVETOUR,
      7    PICKWAVETOURSEQ,
      8    PRODRUNNR,
      9    PRODRUNDATE,
    10    PRODRUNID,
    11    PRODRUNFINAL
    12  )
    13  as
    14  select value(PW),
    15         extractValue(value(PW),'/PickWave/Nr'),
    16         TO_NUMBER(EXTRACTVALUE(value(PW),'/PickWave/ProdLine')),
    17         extractValue(value(PW),'/PickWave/Tour'),
    18         TO_NUMBER(extractValue(value(PW),'/PickWave/TourSeq')),
    19         PRODRUNNR,
    20         PRODRUNDATE,
    21         PRODRUNID,
    22         PRODRUNFINAL
    23    FROM PROD_RUN_VIEW, table(xmlsequence(extract(PRODRUNNODE,'/ProdRun/PickWave'))) PW
    24  /
    View created.
    Elapsed: 00:00:00.09
    SQL> create or replace view CUSTOMER_VIEW
      2  (
      3    CUSTOMERNODE,
      4    CUST,
      5    MOD,
      6    TOD,
      7    SEQ,
      8    PICKWAVENR,
      9    PICKWAVEPRODLINE,
    10    PICKWAVETOUR,
    11    PICKWAVETOURSEQ,
    12    PRODRUNNR,
    13    PRODRUNDATE,
    14    PRODRUNFINAL,
    15    PRODRUNID
    16  )
    17  as
    18  select value(CUST),
    19         EXTRACTVALUE(VALUE(CUST), '/Customer/Cust'),
    20         EXTRACTVALUE(VALUE(CUST), '/Customer/Mod'),
    21         EXTRACTVALUE(VALUE(CUST), '/Customer/Tod'),
    22         TO_NUMBER(EXTRACTVALUE(VALUE(CUST), '/Customer/Seq')),
    23         PICKWAVENR,
    24         PICKWAVEPRODLINE,
    25         PICKWAVETOUR,
    26         PICKWAVETOURSEQ,
    27         PRODRUNNR,
    28         PRODRUNDATE,
    29         PRODRUNFINAL,
    30         PRODRUNID
    31    from PICK_WAVE_VIEW, table(xmlsequence(extract(PICKWAVENODE,'/PickWave/Customer'))) CUST
    32  /
    View created.
    Elapsed: 00:00:00.10
    SQL>
    SQL> create or replace view INVOICE_ORDER_VIEW
      2  (
      3    INVORDERNR,
      4    ITEM,
      5    QTY,
      6    PRIORITY,
      7    REORDERING,
      8    HLORDER,
      9    DELDATE,
    10    CUST,
    11    MOD,
    12    TOD,
    13    SEQ,
    14    PICKWAVENR,
    15    PICKWAVEPRODLINE,
    16    PICKWAVETOUR,
    17    PICKWAVETOURSEQ,
    18    PRODRUNNR,
    19    PRODRUNDATE,
    20    PRODRUNFINAL,
    21    PRODRUNID
    22  )
    23  as
    24  SELECT EXTRACTVALUE(VALUE(INV), '/InvOrder/Nr'),
    25         EXTRACTVALUE(VALUE(INV), '/InvOrder/Item'),
    26         EXTRACTVALUE(VALUE(INV), '/InvOrder/Qty'),
    27         EXTRACTVALUE(VALUE(INV), '/InvOrder/Priority'),
    28         EXTRACTVALUE(VALUE(INV), '/InvOrder/Reordering'),
    29         EXTRACTVALUE(VALUE(INV), '/InvOrder/HlOrder'),
    30         TO_DATE(EXTRACTVALUE(VALUE(INV), '/InvOrder/DelDate'),'DDMMYYYY'),
    31         CUST,
    32         MOD,
    33         TOD,
    34         SEQ,
    35         PICKWAVENR,
    36         PICKWAVEPRODLINE,
    37         PICKWAVETOUR,
    38         PICKWAVETOURSEQ,
    39         PRODRUNNR,
    40         PRODRUNDATE,
    41         PRODRUNFINAL,
    42         PRODRUNID
    43   FROM CUSTOMER_VIEW, table(xmlsequence(extract(CUSTOMERNODE,'Customer/InvOrder'))) INV
    44  /
    View created.
    Elapsed: 00:00:00.13
    SQL> select * from INVOICE_ORDER_VIEW
      2  /
    IIO0000461           100000036                    20          1          0 CSO000743            15-NOV-05 100000013
    FO                             DDU                                     6 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000463           100000045                    20          1          0 CSO000743            15-NOV-05 100000013
    FO                             DDU                                     6 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000473           100000036                    20          1          0 CSO000746            15-NOV-05 100000143
    FO                             DDU                                     7 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000475           100000045                    20          1          0 CSO000746            15-NOV-05 100000143
    FO                             DDU                                     7 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000469           100000036                    20          1          0 CSO000745            15-NOV-05 100000140
    FO                             DDU                                     3 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000471           100000045                    20          1          0 CSO000745            15-NOV-05 100000140
    FO                             DDU                                     3 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000489           100000036                    20          0          0 CSO000751            15-NOV-05 100000148
    FO                             DDU                                    10 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000491           100000045                    20          1          0 CSO000751            15-NOV-05 100000148
    FO                             DDU                                    10 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000481           100000036                    20          0          0 CSO000748            15-NOV-05 100000146
    FO                             DDU                                     9 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000483           100000045                    20          1          0 CSO000748            15-NOV-05 100000146
    FO                             DDU                                     9 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000485           100000036                    20          0          0 CSO000750            15-NOV-05 100000147
    FO                             DDU                                     4 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000487           100000045                    20          1          0 CSO000750            15-NOV-05 100000147
    FO                             DDU                                     4 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000457           100000036                    20          1          0 CSO000742            15-NOV-05 100000006
    FO                             DDU                                     5 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000459           100000045                    20          1          0 CSO000742            15-NOV-05 100000006
    FO                             DDU                                     5 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000477           100000036                    20          1          0 CSO000747            15-NOV-05 100000145
    FO                             DDU                                     8 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000479           100000045                    20          1          0 CSO000747            15-NOV-05 100000145
    FO                             DDU                                     8 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000465           100000036                    20          1          0 CSO000744            15-NOV-05 100000114
    FO                             DDU                                     2 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000467           100000045                    20          1          0 CSO000744            15-NOV-05 100000114
    FO                             DDU                                     2 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    18 rows selected.
    Elapsed: 00:00:00.22
    Execution Plan
    Plan hash value: 1730223965
    | Id  | Operation                | Name              | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT         |                   |    18 | 10278 |   877   (0)| 00:00:11 |
    |   1 |  NESTED LOOPS            |                   |    18 | 10278 |   877   (0)| 00:00:11 |
    |   2 |   NESTED LOOPS           |                   |    18 |  8424 |   841   (0)| 00:00:11 |
    |   3 |    MERGE JOIN CARTESIAN  |                   |    18 |  4680 |   805   (0)| 00:00:10 |
    |   4 |     TABLE ACCESS FULL    | XML_ORDERS        |     1 |    67 |     3   (0)| 00:00:01 |
    |   5 |     BUFFER SORT          |                   |    18 |  3474 |   802   (0)| 00:00:10 |
    |   6 |      INDEX FAST FULL SCAN| SYS_IOT_TOP_64187 |    18 |  3474 |   802   (0)| 00:00:10 |
    |*  7 |    INDEX UNIQUE SCAN     | SYS_IOT_TOP_64185 |     1 |   208 |     2   (0)| 00:00:01 |
    |*  8 |     INDEX RANGE SCAN     | SYS_C008783       |     1 |       |     0   (0)| 00:00:01 |
    |*  9 |   INDEX UNIQUE SCAN      | SYS_IOT_TOP_64183 |     1 |   103 |     2   (0)| 00:00:01 |
    |* 10 |    INDEX RANGE SCAN      | SYS_C008785       |     1 |       |     0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       7 - access("NESTED_TABLE_ID"="CUSTOMER_TAB"."SYS_NC0000800009$")
       8 - access("NESTED_TABLE_ID"="CUSTOMER_TAB"."SYS_NC0000800009$")
       9 - access("NESTED_TABLE_ID"="PICKWAVE_TAB"."SYS_NC0000800009$")
           filter("NESTED_TABLE_ID"="XML_ORDERS"."SYS_NC0001000011$")
      10 - access("NESTED_TABLE_ID"="PICKWAVE_TAB"."SYS_NC0000800009$")
    Note
       - dynamic sampling used for this statement
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    C:\oracle\xdb\otn\347125>You were sequencing the ProdRun node, which is a mistake. Only nodes which occur multiple times should be sequenced...

  • Inserting a row in a schema-based xml type column

    i have problems while inserting a row in a schema-based xml type column
    it reports an error(schema and elemnt do not match)
    although they are matching if anyone can try it
    and if it worked plz send me the example

    SQL> DESC XML_TAB;
    Name Null? Type
    XML XMLTYPE
    SQL> INSERT INTO XML_TAB
    2 VALUES
    3 (xmltype('<request>
    4 <filter>(extshortname=bhagat)</filter>
    5 <attributes>dn</attributes>
    6 <context/>
    7 <scope>subtree</scope>
    8 </request>'));
    1 row created.
    If your problem persists,post ur lines of code..
    Good luck!!!
    Bhagat

  • How to handle tables data in XML schema based adobe form

    Hi all,
    I am working on the CRM business partner creation by using Interactive adobe form with following steps:
    1) Uploaded the offline Interactive adobe form  to online interactive adobe form via WebDynpro ABAP;
    2) Capture XML data into corresponding BAPI structures;
    3) Save all the changes to database via BAPI.
    The adobe form contains customer information as well as several table views which are bind with the context created in WebDynpro: Node NEW_BP_NODE cardinality 1:1 with single attributes and table type attributes (1:n): COLOUR_COMP, MEN_COMP etc.
    While converting the xml format data to SAP context format, It is fine to use following routine to find the single attribute and map to the BAPI structure to do the database update.
    NODE = DOCUMENT->FIND_FROM_NAME( NAME = 'XYZu2019).
    XYZ = NODE->GET_VALUE( ).
    Question: how to convert the xml table data to SAP context format in WebDynpro ABAP?
    The XML table data looks like below.
    <?xml version="1.0" encoding="UTF-8" ?>
    <NEW_BP_NODE>
    <COLOUR_COMP>
    <DATA>
    <ZZTFLD0W2AQW />
    <ZZTFLDRZ2AQX>000</ZZTFLDRZ2AQX>
    <ZZTFLDVD2TQW />
    <ZZTFLDQK2HQX />
    <ZZTFLDEL2XQX />
    <ZZTFLDTC2DQX>000</ZZTFLDTC2DQX>
    <ZZTFLDOR2UQX />
    </DATA>
    <DATA>
    <ZZTFLD0W2AQW />
    <ZZTFLDRZ2AQX />
    <ZZTFLDVD2TQW />
    <ZZTFLDQK2HQX />
    <ZZTFLDEL2XQX />
    <ZZTFLDTC2DQX />
    <ZZTFLDOR2UQX />
    </DATA>
    <DATA>
    <ZZTFLD0W2AQW />
    <ZZTFLDRZ2AQX />
    <ZZTFLDVD2TQW />
    <ZZTFLDQK2HQX />
    <ZZTFLDEL2XQX />
    <ZZTFLDTC2DQX />
    <ZZTFLDOR2UQX />
    </DATA>
    </COLOUR_COMP>
    <MEN_COMP>
    <DATA>
    <ZZTFLD4V2V7V />
    <ZZTFLDYD2N7W>000</ZZTFLDYD2N7W>
    <ZZTFLDX32I7W />
    <ZZTFLD2D2W7W />
    <ZZTFLDGD2A7W />
    </DATA>
    <DATA>
    <ZZTFLD4V2V7V />
    <ZZTFLDYD2N7W>000</ZZTFLDYD2N7W>
    <ZZTFLDX32I7W />
    <ZZTFLD2D2W7W />
    <ZZTFLDGD2A7W />
    </DATA>
    </MEN_COMP>
    Thanks in advance for your help.
    Michelle

    Hi,
    Just follow these steps:
    1. Create interactive form UI element in your view.
    2. Now provide Datasource and PDFSOURCE to it in form properties.
    3. Now give a template name prefix with 'Z' or 'Y'.
    4. Double click on it. It will prompt for interface name.
    5. Provide interface name prefixed with 'Z' or 'Y'.
    6. Click on Context button in the Pop up window and provide the node you have selected as DATASOURCE.
    7. Click ok and it will open the form designer.
    8. In this way you can create a XML Schema based Form.
    9. Activate the interface and design the form providing layout type and other details.
    Hope it will help.
    Regards,
    Vaibhav

  • Call XML Schema based Adobe form from ABAP Program

    Hi,
      I have a scenario where an online Interactive form is designed and its working fine. Now i have a requirement to call the same Adobe form from a report for viewing purpose. Since it is XML Schema based Interface, is it possible to call the same form instead of creating a new one with the same template? Because i tried to call the same Adobe form by passing the values and converting those to XML(By Creating Transformation). Then i converted the XML to XSTRING and passed to the Generated Function Module for Input paramter "/1bcdwb/docxml". This resulted in an error "com.adobe.ProcessingException: com.adobe.Processin".
    Please help me out in solving this and check the attachment for code.
    Thanks,
    Raj

    Hi,
    outputparams-NODIALOG   = 'X'.
    outputparams-PREVIEW     = 'X'.
    outputparams-dest = 'LP01'.  "give ur printer name.
    CALL FUNCTION 'FP_JOB_OPEN'
      CHANGING
        ie_outputparams = outputparams
      EXCEPTIONS
        cancel          = 1
        usage_error     = 2
        system_error    = 3
        internal_error  = 4
        OTHERS          = 5.
    and Now call the generated function module
    pass the following in docparams
    docparams-langu = 'E'.
    docparams-country = 'US'.
    and finally close the job.
    It should work.
    Please let me know if u need further details.
    Regards,
    sasi

  • XML Schema based XMLType column leaves file open on error

    Hello,
    I have the following situation on both oracle 10.1.0.2.0 and 10.1.0.4.0:
    insert into xml_products (xmlfile) values(bfilename(file_loc, char_id));
    "xmlfile" is a xmltype column based on a registered xml schema.
    When the file fails xml schema validation, the file remains open and I cannot move it until i close the session.
    Is this a bug or an "intentional feature"?
    Any workarounds?
    Thanks,
    Flavio

    All right Mark,
    thanks for your reply.
    Meanwhile I fixed the problem and posted my workaround here:
    http://oraclequirks.blogspot.com/2005/11/ora-29292-and-xmltype.html
    Bye,
    Flavio

  • Delete schema based xml fails

    I am attempting to delete xml files through the following command:
    delete from
    (select 1 from resource_view
    where UNDER_PATH(res, '/home/user1/forms', 1) = 1
    order by depth(1) desc);
    /home/user1/forms contains over 200,000 schema-based xml documents that I wish to drop. The schema-based documents previously were loaded properly and showed 0kb size. Their contents are accessible from views and can be used in sql statements.
    The command has been running over 24 hours with the server's cpu maxed at 100%. The server is Windows Server 2003 and the database is 9.2.0.4. There are no relevant invalid objects in the database.
    Could the command be failing (or simply taking a really, really long time) because I should not have loaded all the forms into a single folder? I have been able to run the above command on folders with 5 or ten xml documents in them.

    Hi people,
    Our results (YMMV - and if it does then tell us how) made us VERY reluctant to drop structures that weren't empty - period.
    Try it for yourselves but our experience was basically any live dropping of XML schema structures has a fairly good chance of being incomplete or not allowing the same schema to be reconstituted in a lights-out environment... (ie. didn't completely remove types / tables from dictionary so we got "<name> already exists" errors on schema re-registration, requiring an instance restart - but with no guarantees ).
    BTW : DELETE FROM gives MASSIVE amounts of redo ...and takes MASSIVE amounts of time with the hierarchy triggers enabled [I suspect the moderately evil UNDER_PATH operator is hidden in the delete hierarchy trigger] (hence the copy out stuff to be kept - then TRUNCATE option).
    And with schema mapped hierarchy enabled structures - dropping the tables left dangling pointers from the resource entry to the now non-existent schema table structures. These dangling pointers destroyed access to that set of resources (and any resources PAST evaluation of those rows in RESOURCE_VIEW [a previous rant of mine on "exception objects" explains why]. (Until a dbms_xdb.deleteresource( <path>, dbms_xdb.*force) was used on each resource).
    So to update or extend our hierarchy enabled schema our recipe became :
    Disable receiver processes
    Disable hierarchy triggers
    for r in
    ( select *
    from resource_view r
    where r.any_path like || '<app_root>/%'
    order by instr( r.any_path, '.' ) desc
    -- hack to delete files before folders
    loop
    dbms_xdb.deleteresource(
    r.any_path,
    dbms_xdb.delete_resource
    end loop;
    Delete the rows from the xml type tables. (TRUNCATE each table from bottom up).
    Drop the schema with dbms_xmlschema.delete_invalidate;
    Drop all xml related user types and tables (by naming convention in our XML Schema xdb:SQLType* / xdb:SQLName* attributes).
    Register new schema and transform / insert stored XML values into tables again.
    NOTE : In our case we copy those rows / resources we need to keep to other CLOB based structures first and reconstitute them after the schema is back - thankfully our profile allows this.
    Hope this helps,
    Lachlan

  • XML Schema Based Table and ORA-22814

    When I want to insert clob into XML Schema Based Table, ORA-22814 was occured.
    Why?

    the instance document ( I can't insert ):
    <nesne xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.yore.com.tr/tkword.xsd" nesne_id="Resim3d1df48649498"><resim><altyazi></altyazi><httpBaslik>image/jpeg</httpBaslik><icerik><![CDATA[ffd8ffe000104a46494600010201012c012c0000ffed089450686f746f73
    686f7020332e30003842494d03ed000000000010012c200000010002012c
    2000000100023842494d03f300000000000800000000000000003842494d
    040a00000000000100003842494d271000000000000a0001000000000000
    00023842494d03f5000000000048002f66660001006c6666000600000000
    0001002f6666000100a1999a0006000000000001003200000001005a0000
    0006000000000001003500000001002d000000060000000000013842494d
    03f80000000000700000ffffffffffffffffffffffffffffffffffffffff
    ffff03e800000000ffffffffffffffffffffffffffffffffffffffffffff
    03e800000000ffffffffffffffffffffffffffffffffffffffffffff03e8
    00000000ffffffffffffffffffffffffffffffffffffffffffff03e80000
    3842494d0408000000000010000000010000024000000240000000003842
    494d040900000000072400000001000000800000001a0000018000002700
    0000070800180001ffd8ffe000104a46494600010201004800480000fffe
    002746696c65207772697474656e2062792041646f62652050686f746f73
    686f70a820342e3000ffee000e41646f626500648000000001ffdb008400
    0c08080809080c09090c110b0a0b11150f0c0c0f1518131315131318110c
    0c0c0c0c0c110c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c
    0c0c0c0c010d0b0b0d0e0d100e0e10140e0e0e14140e0e0e0e14110c0c0c
    0c0c11110c0c0c0c0c0c110c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c
    0c0c0c0c0c0c0c0c0cffc0001108001a008003012200021101031101ffdd
    00040008ffc4013f00000105010101010101000000000000000300010204
    05060708090a0b0100010501010101010100000000000000010002030405
    060708090a0b1000010401030204020507060805030c3301000211030421
    1231054151611322718132061491a1b14223241552c16233347282d14307
    259253f0e1f163733516a2b283264493546445c2a3743617d255e265f2b3
    84c3d375e3f3462794a485b495c4d4e4f4a5b5c5d5e5f55666768696a6b6
    c6d6e6f637475767778797a7b7c7d7e7f711000202010204040304050607
    070605350100021103213112044151617122130532819114a1b14223c152
    d1f0332462e1728292435315637334f1250616a2b283072635c2d2449354
    a317644555367465e2f2b384c3d375e3f34694a485b495c4d4e4f4a5b5c5
    d5e5f55666768696a6b6c6d6e6f62737475767778797a7b7c7ffda000c03
    010002110311003f00f4bcfcfc6e9f8afcac92456d21a1ac697bdef7115d
    54d3533df6dd6d8e6d7556cfcf5c767ff8cdc0c5cb7e3db938b8af63b6ba
    9db6e5bdbc1fd62ec4f4f12bb5b3b2da716ecff4ecff000eb47ebb3ee6b6
    bf49ce0f662e4be90d241163dd8b82ebeb70fa1753899b94dadff99ebaf3
    2c4fa8b8b93d57129b727d0c4b2d6b32a35731903e8bfdcd6bedb3f41eff
    00e6b7fa9624a7d87a075cafac615796d0cd97177a16d4e73ebb1ac3b5ce
    acdb5e3dd5bdaef6be8be8aecfa7e9fad57e956aae07eadddd54f54a5bd4
    7159d3ada3a55028c3acbb6b40ca7d7fd1dfe8bb1acb36b68f4fd4bbd4af
    fc35dfcd26fac56f56abfc65e1bba3d14e4e67eca20577bcd6cdbeadfb9d
    b9bf9c929ef93af34fae191f5b6f6746afade16262e37ed6c5d8fc7b4bdc
    6cfd286b1cd77e66cf53dca87d69fdb3f5d7ad6559d271b232ba6748dd8d
    837635b556dfb682c7bf25efb8fe92afcdfd03ff009bfb3dbea57eaa4a7d
    6925e4dd37eb3bfa6754c6fad1900d5566b874cfad38db4875399482da73
    4d2ddbb7d5637d4db5d3fe0f329fe91620756b3a8756fab3d7bebb640754
    73cd785d358241af09b731968f6b9dfd25dfa2bbff00423fc164a4a7d821
    285e33fb1fead7fdc6fabdff00b97caffc9adce8d97d27a4fd6de9b6e45f
    8785863a09654faef36636efb5daef4e8cbc93badfcefa6e494fa4a785cf
    e77d67fabd9b83918783d730e9ccc9a9f4e35adbd92cb5ed35d363763b76
    e658efcd5e674745e8f5d4caefaba065dcd116653bab5cd363bf3ae731b7
    57b3d4fea24a7db132f221f581b91f554fd54fab184da3a9e7e55f8cfc7c
    7b9d7b0d2c6b5f959746464bff0098cbfe66bdeff4fd3fb4abff0055b33a
    97d5a7e7fd5acea323028cca2ecae88722c63ded7b58ef5a817e3fe877bb
    6fadedf4bd37ff0083fd69253e9c92f29faacdeb3f55feaee17d67e9bea6
    7f46ca617f59e9c4ee7d458f7d4eea385f47e8b2bfd619ff006f7e87f4b8
    3d07f8bacbc5ceea3f5973b0dfeae364e70b2ab76b9bb9ae0e7fd1b1ac7f
    e724a7ffd0f44eb5d29bd4f14561c2bbab25d53deddecf735d4db4df56e6
    7ad8d914596537d7bffe12af4afae9b6be36dfab7d4a8758d0cc966e1b5c
    c35b72d8e61d1edaf2a9bb1df90dfcca3edf878d77a7fce2f414925385d1
    3a6e6fe86dcfadd5fd95be9d565ce63f2ed6825c1b96fa7d56578f5bff00
    494e3b72f27d4fd1db77a5e9fa2b60e262bb25b98ea6b394c61adb905a3d
    40c2773ab6db1bfd3ddf988a924a4593878798c6b32e8af2195bc58c6dac
    6bc35edfa16343c3b6d8d9fa696261e1e15231f0a8af1a86924554b1b5b0
    13ab8ecac35bee454925352ce8fd22d6e4b6cc1c778cd2d3961d530fac58
    7756ec8f6fe9bd377d0f53e8231c4c538bf6334d671767a5f672d1e9fa60
    6df4bd28f4fd3dbedd88a924a737fe6cfd5bff00ca9c2ffd87abff0049a3
    59d17a35b4d58f6e0633e8c7045153a9616560fd214b0b76d7bbf90ae249
    29a0cfabfd02b7b6cafa66231ec32c7b68ac107f79ae0c51ff009b5f5706
    83a5617fec3d5ff905a2924a6b63f4be998b6b6ec6c3a28b58cf49b65753
    18e15ceef45af6343bd2ddfe0d4b2703072dd5bb2f1aac87504ba975ac6b
    cb09e5d5ef0ed8efeaa3a49291e3e3e3e2d2cc7c5a99451588aeaada18c6
    8f063190d6a6c5c3c3c3acd3874578d517179ae96358ddcefa4fdb586b77
    39152494ff00ffd93842494d04060000000000070000000000010100fffe
    002746696c65207772697474656e2062792041646f62652050686f746f73
    686f70a820342e3000ffee000e41646f626500648000000001ffdb008400
    100b0b0b0c0b100c0c10170f0d0f171b141010141b1f17171717171f110c
    0c0c0c0c0c110c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c
    0c0c0c0c01110f0f11131115121215140e0e0e14140e0e0e0e14110c0c0c
    0c0c11110c0c0c0c0c0c110c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c
    0c0c0c0c0c0c0c0c0cffc0001108008f02b103012200021101031101ffdd
    0004002cffc4013f00000105010101010101000000000000000300010204
    05060708090a0b0100010501010101010100000000000000010002030405
    060708090a0b1000010401030204020507060805030c3301000211030421
    1231054151611322718132061491a1b14223241552c16233347282d14307
    259253f0e1f163733516a2b283264493546445c2a3743617d255e265f2b3
    84c3d375e3f3462794a485b495c4d4e4f4a5b5c5d5e5f55666768696a6b6
    c6d6e6f637475767778797a7b7c7d7e7f711000202010204040304050607
    070605350100021103213112044151617122130532819114a1b14223c152
    d1f0332462e1728292435315637334f1250616a2b283072635c2d2449354
    a317644555367465e2f2b384c3d375e3f34694a485b495c4d4e4f4a5b5c5
    d5e5f55666768696a6b6c6d6e6f62737475767778797a7b7c7ffda000c03
    010002110311003f00efd2492494a4924925292492494a49249252924924
    94a4924925292492494a4924925292492494a4924925292492494a492492
    5292492494a4924925292492494a4924925292492494a492492529249249
    4a4924925292492494a4924925292492494a4924925292492494a4924925
    292492494a4924925292492494a4924925292492494a4924925292492494
    a4924925292492494a4924925292492494a4924925292492494a49249252
    92492494a4924925292492494a49249253ffd0efd2492494a49249252925
    1739ac6973886b5a24b8e8001e2b8ffac5f5f598363f0fa7d7ea64088b5d
    05bee1b9aead8d3fcaf67abffb0e929ea733a861e0b3764da19a176d00b9
    e5a2039eda6a0fb5cc6eefdc5cd750ff0018bd2b1cedc561c83b49266358
    fd1b5bb1b631dfcbfd257e92c6c5faa7f583eb1dcecfeb571c3a6e77a82b
    8f79d1ac6edc6ff03fa16fa7ea647e9ff47fcdaea303ea6fd5be99592ec7
    65ee025d76545874976edb60fb3d7b7fe0ea494f327fc6575175d18f895d
    cc3a359b1cd7c9fa3ee6645fff009ed4c7f8c2ebac6fa97f4a6fa7fbc058
    c1fbff004dfea37f9b73174d6fd6afaab8503edb48998f401b07feca32d4
    31f5ebeaa9207dbb9f1aad1ffa212538189fe337de5b9b8a0493b4d72d0d
    1f9beaee7def77bbf72a5d1749fadfd1faa3bd3aec15dba7b5da4e92edbb
    b659ecff0049e97a48edccfab3d688abd4c4cd7bb5153b63dfedddeef46d
    fd2fb3deb23aa7f8bae8f940bf05cec1bb91b7df5cccff0032f3bdbff5ab
    5253d6275e714657d70faad955636556ecec5b1de9d30e2f638bbe8b2ab7
    fc1bff00e0ef67fc5af461c7824a5d2492494a4924925292492494a49249
    25292492494a4924925292492494a4924925292492494a49249252924924
    94a4924925292492494a4924925292492494a4924925292492494a492492
    5292492494a4924925292492494a4924925292492494a492492529249249
    4a4924925292492494a4924925292492494a4924925292492494a4924925
    292492494a4924925292492494a4924925292492494fffd1efd2492494a4
    925ccfd76fac07a4f4f34d0edb95920b6b20896f1b9db4b5ff00ebff0018
    929c6fae1f58b233f35bd0ba3fe99ce3b1fb60eeb25cc757b2cafdbe86cf
    52bbfd6ff87ff417ad7fab3f53f0fa2d6dcfcd22dea3b773ec7905949d5c
    ff00427f3b6ff3b7bffeb7e9207d45fabc31317f6ce7b77e7e5fe92b7bce
    e2ca9e377a9afd1bf277bdf77bff009af4ff00e1962fd73fad96e7596f4e
    e9d69660d5babc9b5a47e9ddfe8abfcff458e66cfd1ff3ff00f11fce253a
    5f58bfc62538cf762f466b722d6921f94ed6a1ff0085dadfe91ff19fccff
    00e185c167f55ea3d4acf573f21f7ba64071f6b7fe2aa6fe8aaffadb1544
    925292492494a5b5d23eb775ce92e029bcdd40d3ecf7cd8c8036b433ddea
    53b7fe06cad62ab5d33a764f54ceab07140375c6013a35a07b9f63ddfb8c
    624a7d7beae7d62c6fac188ebe9adf4d9510dbab76a0388ddfa2bbe85acf
    fc13fd2555a1752aeee999b7fd62b73af760d34edb3a731a1cc3f99beadc
    edacf7fe97e87abfce7eb5f66fd0abfd27a5e2749c1af0b11bb58c1ee77e
    73df10fbadfdeb1ea9f53fac7d2f13371fa5bc8c8cbcab6ba4d0d83b058e
    6b3d4ca9fe6fdafdfe97f3b6ff00e08929bfd37a863f53c1a73b1a7d1bdb
    b9a1c36b86bb1ec737f90f6ecffcf6ad2c56d9d6f1bac5cfca7e353f57eb
    6015b890c209fceddfbfea7b2cf53f43fe896ca4a5d2492494a49733d67e
    bce0747cf7e05f8f6d8f6004babdb1ee13f9ef6aab47f8c8e979191563d5
    8b7efb9edada5db0005e7d36976db1e929ec12492494a4924925292517bb
    6b1cee768263e0b8e7ff008cce94c7b98ec4c8969234d9c831fe91253d9a
    4b9de81f5cb07aee6bb0f1e8b6a7b6b369759b621a6baf6fb1efff004aba
    2494a49250baeaa8a9d75cf6d75306e7bdc61a00fce739c9299a4b86cdff
    0019d8b5dae660e1baf60d1b6d8ff4e7c7f46d65bec4d85fe33f16cb5acc
    ec2750c275b2b7fa91fbbfa2732a494f74921d1755914b2fa1e2caac01cc
    7b4c8734ead73562fd60fad78dd02daabcac7b6c6dc0963ebdb1eddbbdbf
    a4733f7d253bc92e2c7f8cee91df13207c367fe955d6606763f51c3a7371
    9dba9bda1cdf113f498f8ff095bbd9624a6c249249294924abe766e3f4fc
    4b73329db29a5bb9e7fefadfe5bddec624a6c24b8b3fe33fa476c4c8ff00
    a1ff00a556a740fadd8dd7f22ca31716eadb53773edb36ed13f419fa373f
    def494f4092c8eb1f5a7a2f4696e5dfbaf8918f50df61feb37e855ff005f
    b2a580ff00f19fd3038ecc3bdcdec49603c7ee873d253db24b873fe34307
    58c1b4f84b9bfcaffcc3fd6bfd22ff00c74303fee0dbf1dcd494f7092e18
    7f8d0c3ddae0d9b7c77b6674f2febffaff00368ff8d1c38f6e0593e05edf
    3fe4a4a7b94970c3fc686169bb06de7587b789ff00c8ab5d23fc60e3f54e
    a3460370df53af3b43cbc100c6efddfeba4a7af49657d61ebb5f42c26e65
    949b9a5e19b5a434ea0fef2e77ff001d0e9fff0070aeff0039a929edd255
    3a567b7a974ea33dac35b7219bc309923fb415b494a4924925292492494a
    492547aa75ae9bd22917750bc54d7186b60b9ce3fc8aabdcf494de497179
    1fe33ba531c5b8f8b75a0180e76d6023f7dbee7bd03ff1d0c5ff00b8367f
    9c1253dda4b84ffc7431a7fa0be3fac123fe3431bb60bffce0929eed25c3
    33fc67e16bea61da3c36969ffaa73547ff001d0c6ffb82ff00f3824a7bb4
    9739f56feb851d7b26cc66d0fa5f5b77c98208feb05d1a4a52492a5d5bab
    61747c376666bf6d60801a35739c78aea67e7392537525e7d6ff008d27ef
    228e9c3d39f697dbee23f94d655ecff3d69745ff00189d3f3f2198d9b49c
    2b2c30db0bc3aae3fc25aef49d5eff00ea24a7af49327494a49255b3fa8e
    1f4dc676566da2aa59dcf73fb8c6fe7d9fc8494d94970791fe34686dc5b8
    d80eb29074b1f606388ff8a6d56ffe7d5b9d0beb9f49eb4f18ed2ec6cb3c
    536c7ba3fd0d8df659ff009f7fe0d253d024993a4a5249285af35d4f78d4
    b5a5c3e4252533497083fc68e347bb01f3e560ff00c82dbfab3f5aebfac3
    66432bc7340c70d32e707176e2edbf45addbf41253d0249249294924924a
    7fffd2efd2492494c5ef0c639e786824fcb55e658d5bbeb37d736d77eebb
    1719ce7db311b6b25fb1db7f47e93f23d2c5f67f80ff00b7177bf58333ec
    5d1b2f20004b6b20031acfb5ff004fdbfcdef5ccff008b1c63f63cecf712
    e7dd68aa4ccfe8dbeb39d3fcbfb524a753eba753b31702be99886333aa3b
    d0a88e18cf63722ce3f72cf4bfeb9ea7f835e67d44d7ea1c7a8fead87fa2
    a888fd259ff6a2ff00faf58d7dbff11f67a1759f58f3864756eadd41a61b
    d2a86e1531acdd79b2ab2cfcdd9e9fa9915ffd6d738718517b6a7b41afa7
    502fbc100875f6065adaadd7dffad5d8d8567fc0d0929cc7d0e61dbcbdad
    dcf1d9a0c7b5dbbf3fddff00a2d096a3f15e2aae925deadec3979af1aeda
    7f9ca777d1fccfd3ff00c25b763acf34bcb5af0d2058e8a9b049776f67ef
    6dfa09291a4924929404e8395eb1f52beacb7a361fdab25a3f6864b417f8
    d4c30ffb36bf9dfe9ffe13fe2d72df533a133d3b7eb1f506176160b6cb2a
    a809363ea6ef7d8df536b1ccabfc17fdd9ff008a573a2fd6cea5d77eb760
    b6c271f0c7abb716b71da7f457bf7643bdbf68b7fb1ff175d6929f445e2f
    d25ce7fd6ac47bc973dd9cc2e71e4936b4b9ce5ed0bc5ba3c1fad387b440
    fb75700f61eab5253eb7d67a5e2756e9f661e6178a0c3dc6b30ef61dfedf
    6d9ff5083f57ba974eea3d39aee98d7b31318fd9ab6bc418a9ac0cdbb9f6
    3f67a4eaff009cfd2ffa45a8b2ba7e6759bbaa6763e661371fa7d240c4bc
    3a5d66bb773bf32cf59bfa6ff03f65fe62cf5bf9c494eaa4924929f23faf
    dff8a4bffaacfc8b27a309eb1823feec53ff0056c5adf5fbff0014b91fd5
    67fd4ac7e90f657d570ac790d63322a738930000f61dce724a7dd12544f5
    be8e3fed6d1e1fce37bff6937edde8dff73a8f1fe71bf1f1494df4950fdb
    9d1bfee751ff006e37fbd2fdb9d1a63edd44ff00c637ff0024929b9609ad
    c3c41fc8bc27334cbbc7fc23ff00ea9cbda1fd73a3fa6edb9b4125a63f48
    dd74feb2f16ca70764dce0410e7b88238d49494f53fe2d3fe5fb7ff0abff
    00eaf1d7a8af2eff00169ff2fddff855ff00f578ebd452529705fe31faf6
    c637a2504ee786db9241d36cfe8a8ff39beb7fdb7fe91767d4b3e8e9b837
    66e418ae969747771fccadbfcbb1cbc4b3f3afea399766e49dd75cedce3d
    bf75adfec33d8929ae92d1e83d22ceb3d529c1612d6be5d6bc09dac6fd37
    7fdf107aaf4ebba667dd85708754e21a7f79b3ec7a4a7b5ff16fd71b1674
    5bddef936e2c9e447e9e86ff00576fadff006eae93eb6f461d5fa3db531b
    39158f5283fca6fe6ff6ff009aff00ae2f21c3cbbf072aacbc776dba9707
    b0fc3f35dfc97af6de95d468ea9814e7506596b4123bb5dfe12b747ee392
    53e1af6398e2c782d7b490e6910411f49ae6aedbfc5d75f34643ba3e4bff
    00437fbb164986d9f9f4b3fe3ff9cffadffc22cdfaf5d14f4deaeec8ac7e
    af984d8df27ff87ff3f77abff6e7fa35ce556d94d8cb6a716595b8398e1a
    10e07735c1253efa92cafab9d66beb5d2a9cb047ad1b32183f36c6ff0039
    edfe5ff3b5ff00c1ad5494a5e73fe31baf9b6f1d131cfe8e92d7e491225f
    1baba3f96c631feaff00c67fc5aecfeb0f59a7a2f4cb732c8366aca19fbd
    690ef49bff0047debc5adb6cbad7dd6b8becb0973dce32493f49ce494c17
    a6615167d51fa9f765c4e6581af7070fa36dbb6a6b7e97d0abd9f43fd1fa
    ab94fa95d19bd57acb3d66eec6c61ea5808d1ceff0357fe8dffacaedbfc6
    100dfab2f68d00b6a007cfcd253e55658fb6c759612e7bc9739c79249dce
    728a4bd33ea666741abeaed0cccb716bb83acde2e35b5d3b9c5ae77a9eef
    e6d253e6692f673d47eaa7fa7c2fbeb4bf697d553ff6a30bfcea9253e309
    2f67fda5f553fee4610fed5490ea3f554f17e14f6d6b494f8c2dbfa9627e
    b3e07f5dc7ee658bd33f697d55063ed185e3f4aa44c6cefabb6e43062dd8
    8ec871860acd7ea131f99b3dff00452538bfe324ff009059e7737f239797
    2f52ff00191ff2037fe3d9f91ebcb5253ecff54bff00137d3ffe247e572d
    858ff54fff00137d3bfe247e52b6125292492494a492492520ceca661e1d
    d9767d0a18e7bbe0d1b9789754ea795d5736ccdca7175961d0766347d0aa
    bfe4317aff00d689ff009bbd463fee3bff0022f15494a497a07f8bfeabd2
    30ba45f567e453458ec8739adb5cd0e2d35d0dfcefccf62ea3fe717d5aff
    00b9f8bfe7b5253e2e92f69ff9c7f56bfee7e2ff009ed4bfe71fd5affb9f
    8dfe7b5253e2c92f69ff009c7f56bfee7e2ff9ed56713a8f49cd91879145
    e4448adcd7113f47dad494f9ff00f8b364f56c87feed31f79ffcc57a6a88
    6b4190003e202924a59793fd7aebaeea7d54e35366ec2c486d61a65af7c6
    eb6ff6fe77bbd0ff00adaee3eba75d3d1fa4bbd17465e49f4e9e0ed9fe76
    eda7f719ff0082fa6bc85252925b9f573ead5dd7464b9ae2c6d35b8b08ef
    644b18efe42c5b2b7d563abb06d7b096b9a7b1076b9a929f58fa8dd74f56
    e95e8dc67270b6d4f24c97363f437bbfe3363d74abc63eab75a7f46eaf4d
    e5c4635845792dec587dbea39bff0001bbd55ecad735ed0e6996b8483e45
    25325e5ffe317aa5d91d55bd3f514e30ddb7c5eefcefecb3ff003e5abd41
    790fd7affc52e4fc1bf91253cf270482083046a0856fa3e35797d53171ad
    1babbac0c70d4687fa9ee577eb1fd5bcbe8395b1f3662bcfe86f8e7fe0ec
    fdcb7ff3e7fdb95d694f61f537eba0cc0ce9bd56c03284fa590e200b47e6
    54ff00a3fac7fe7dff008d5daaf010482083047057a3fd4cfae9f6ad9d2f
    aabff58d45392e3a3e3fc1def7bbf9ff00f47fe97fe37f9c4a7b842c9fe8
    d6ff0051df911143204d168f163bf224a7c11779fe2b4fe9ba88fe4d5f96
    d5c1aef3fc577f3dd43fab57e5b5253e86924924a524924929ffd3efd249
    2494f3df5ef68fab19649870f4f6eb124beb6bbfe86f50fa8148abeac633
    844dcfb5e63c77be9f77fdb489f5eab0ff00ab197224b76387910f67fdf5
    0bfc5fddeafd59a1b20fa2fb1840edef75d0effb75253c93ddf68c5b446e
    1d47ae10ed796b21fb5dfc9fd6953cb06db7aa6ae272fa8331c471b43eeb
    76fb7fab42b98ecb28c3a4810707ae16ba609f70a9bff47d042c8a8d2ceb
    05e3df81d4aabce9aec73f22a77f23fd124a5758a5950ebb73040aefc7c1
    a8ff0021a1fbd9ff00b254a81c3a68afabe4346e6f4ec7a71a8f27dfb69c
    8b7d9fd7caff00b7568752c776457f592867b7df4750ac11ab9843ec7fb7
    feba932a3d43edf8b5eadeb5874e562b89d4dd8a1bebe37fdbadbbfeb492
    9e7323a4595d9656d23f55c5af26f719ff000a2ab1ac6ffec5d34a27d5be
    836f5dea4dc404d74346fc8b409d8c1f47e916fbed7fe8d9ff006e7f835a
    ed7d97d03a97a2fc965d8ff61ead8ccd2ea9d4fa555594d63bf7bd3c7fa7
    fe13d4ff00ad69fd52eafd13a630578b7e5655d94407e18a039f5107d36d
    b6e456d6fab5319ff0ff00f59494f59d531e9c5fabd9b8f8ec15d55625cd
    ad8386815bf6af1ce9dd432ba666559d88e0cbe92763880e1ee0ea9fed7f
    ef56f5ed1d73fe44ea1ff856ff00fcf762f27faa3858b9ff00587131332b
    16e3d9ea6fac9201db55d6b3e86dff0008c494da3f5ffeb41000ca6823b8
    aab93a33c6bfe47fe0b67fc17a79fd01eeb3eb174f7bccb9d97539c7c49b
    18e72f4fff00993f55e23ec0dd3f9767fe955e6dd2ea653f5b71aaac6d65
    79ec6306ba06dbb5adf76e7a4a7d9963bb0fa97fce46658ea43ec469703d
    348d6006b37b593eefd3d8cb9f95fceffda5fe6ac5b0b9e8fabeff00ae01
    fead8eeb35d2582ad4d6c6edddbbe87f3be859fe95253d0a4924929f23fa
    fdff008a5bff00aacffa95ce2e93ebff00fe29b23fa95ffd4b7cd6160d2c
    c8cdc7c7b090cbad656e2d8061ce6b1db7724a4092f52ffc6dba07efe47f
    9edf2ff824bff1b6e811f4f23fcf6ffe92494f96a4bd4bff001b6fabff00
    bf91fe7b7ff4927ffc6dfeaf69eec8e67e98fe4fb7f9afe4a4a7cb125ea1
    67f8b7e8018e707e402013f4dbd87fc52f31b5a196bd8386b8813e45253d
    67f8b3ff0097eeff00c2afff00cf98ebd45797ff008b33fe5ebfcf15ff00
    f9f31d779f587acd7d17a5db98e836416d0c3f9d611fa31fd5ff0049ff00
    06929e2bfc6375df5f29bd1a9335639165e7fe1483b2bfec5762e254eeba
    dbee7df738bedb1c5cf71ee4eae44c7c1ceca6976363db7b5a61c6b639e0
    1fe57a6d724a76feaa7d63c1e806dbadc57e464dbed0e6b834359fbbee0f
    4beb4fd61e9dd79ccbeac5b31f299a17b9c1c1cdfddfcddab2bf62f58ffb
    8193ff006cbfff002097ec6eb1ff0070327fed9b3ff20929a4bb4ff173d7
    3ecd98fe9173bf459477d13c36c68fd237febd5b3ff035c9e4606762b43f
    2b1ada1ae30d758c73013f4b6b5d635a854db6516b2ea8edb2b707b0f839
    a77b0a4a7d8beb67466f57e91752d137d63d4a0e9f4dbee6b7fb7fcd7fd7
    2c5e36e6b98e2c782d73490e6910411f49ae6af6afabbd66aeb5d2e9cb69
    02d8db7b3bb6c6fb5ffd977d3ad79dfd7be86ee9bd50e5d63f56cd25e23f
    36c1fce877fc6ff3bff6ea4a63f51faf0e93d57d1bdc46266456ff0006be
    7f437bbfced8f5eb2bc0576e3ebf387d58fb24b8f568f40d8663610e1f6b
    f527f9dd9ff8324a737ebc75f3d57a99c7a1e4e1627b5827dafb07f3b91e
    dffb6abffd48b9a4974bf513a29ea5d61b7d8d9c6c3fd238f6367f80afff
    00477fd6bfe11253de7d4ee8aee8fd2195dc00c8b89b2ef273bf33fb35b2
    b55bfc6198fab56f9db57fd57c574c000206802e6bfc6109fab371f0b2a3
    ff004a1253e4c924bd0bea8fd53e81d53a1d1999743adbdce787bbd47b47
    b5ce6b5bb6a7b3f31253e7a92f5cff00981f55ff00ee2bbfeddb3ff4a25f
    f307eabffdc577fdbb67fe94494f91a4bd73fe607d57ff00b8aeff00b76c
    ff00d2897fcc1faaff00f715dff6ed9ffa51253e46b67ea7ff00e29ba7ff
    00c61ffa97af43ff00983f55ff00ee2bbfeddb3ff4aa3e0fd4de81819756
    662d0e65f499638d8f7092367d1b1ee6fe724a73bfc64ffc80cff8f67e4b
    1796af55ff0018cd07eaec9305b756479fd26af2a494fb47d5411f573a70
    ff008169fbf55aeb27eaa907eae74e23fd0307dcb5925292492494a49249
    2535fa862333b0afc3b090cbd8eadc4730e1b5789f54e9997d2b31f8796c
    db633507b3da7e85b5ff0021ebdd155cfe9b81d4a9346750cbebec1e3569
    e375767f3953ff00975a4a7c2925eab91fe2e7eae5c66b17e30f0aec91ff
    00b34cc941ff00c6cba0ff00dc8cbff3ebff00de5494f9824bd3ff00f1b2
    e85ff7232ffcfaff00f7992ffc6cba17fdc8cbff003ebffde6494f982704
    b4820c11a823995e9dff008d9742ff00b9197fe7d7ff00bccb90fae1d030
    ba167538d86fb2c6595ef71b4b490676fb7d2ae9494ed7d49fae395f6a67
    49ea761babb7db8f7bcfbdaefcda6cb1ff00ce5767f835e8848682e2600d
    492bc27a7bdd5e7e358dfa4cbab709f10e6b97a5fd7eebbf60e9430e87c6
    4e682c31daa8fd3f6fcfdfe9ff00d71253c3fd6deb7fb6babbeeadc4e2d2
    3d3c71a8f68fa766d9fa56bfff0003f496224add1d27aa64d42ec7c4bada
    9d3b5ecadce698f6bb6b9ad494f49d07eba61f44e9cdc4a311ceb490eb6c
    274718f77b377efac2ebbd4713a9e69ccc7a3eceeb07e95823693fbecd5e
    a3fb03adcc7d8323fedb77fe452fd81d73fee064787f36effc8a4a73d7a8
    7f8beeba33ba79e9b71fd630800c263df51fe6f6c06ff33b7d35e6993899
    58967a5954be8b2376cb1a5a60fe76d7ab5d0faad9d23aa519cc98add16b
    47e756ef6dace5bbbdbf43fe11253ee0bc87ebdffe29727e0cfc8bd63172
    69ccc6ab2a876eaae687b1de4e1b9abca3ebe7fe29727faacffa9494e7fd
    5c04f5dc003fd3b3f2ff00697b1f50e9f8bd4b15f8996c165560820ffd52
    f1bfaba63aee07fc7b3f2af6e494f8d7d64fab597d0b2487036623cfe86e
    ff00d156ff00c2ff00e7dffb72aaf14120c8d08e0af76cfc0c5ea18cfc5c
    b60b2ab04105792fd66fab195d0b24900d984f23d2bbc09ddfa1b3f97ed4
    94f53f537ebb7da4d7d2faabff004e7db4649fcff0aaf77fa6ff0085ff00
    0bff0019fce770e82d33c415e04bbdfaadf5ef6d1fb3fabb8b9cd6c51926
    35007b6ac873b6fbff0072eff09fe13f49fce253c12eeffc56ff003fd47f
    a957e5b5708bbcff0015dfcf750fead5f96d494fa1a49249294924924a7f
    ffd4efd2492494d3ead88dcde999588e98baa7b749e48f6fd15c97f8b3ca
    2da33fa65836db4d82dda79f70f42ef6ff00c13e8aff00edc5dcaf37cf3f
    f363ebd3330cb30b31dbec3260b2ef664b9fad8f7fa191fac7fd6d252fd4
    f09f4e67d60e9267d4cadbd4709a3f38b5cebeee3feb8cff00ad27ad95e6
    e49c9711e8fd64c33469a3599d536a735b638ec633d5beafd1ff00c3adaf
    aeb83734627d62c268b2ce9c66f60126cc7711bb7387f81aff004bbffe0b
    22db16007d258705973abc1ea2ff00b6f49ca100e3e4cbbd4c5b1cdf4767
    e918fa59e9ff00337ff33fa7fd25694bd59797874559cea7f5be9a5dd37a
    c5701ce7e3457f66b7e97f36c6633ff4b57f3bfe97fc2203853431bd31f7
    3598a2dfb4747ea103730bbddf66b5fb9ecf43759ea6c7fe8edfd27e93fd
    1deb5b9d9adfda0d635bd6711be9751c37437ed353363fed6c6b7db631fe
    b53e9e4d7fccfa95fa9ea50b3f14b4d760c2a3f6860007ed1d36e245b411
    b9f6594d7ecb18cfa6ff00d17f85ff000c929b5765371721d6e6fafd1bab
    35a4599f4037519325a6af599fcbfa7ffa311adeb114c9fac38b508daeb3
    1b10faee693bf6fe6ecffc0d361f5468afd2c0ea8cc7a58619d37aab37fa
    665c1945393fd23d2655b2b57197f5864135745c5fdfbc1dda0fdda98fde
    ff00dcff008c494ecfd5ab87ece7576b323ec712ccaea2e68b2f2fdcdbff
    0040e73df5e333f45e97adfcefaca357d4ee9f89d7b1bac74f8c6151b3d6
    c60258ef5196d5be8d7f57daebbf99fe63d3fe6bd1ff0009cbdb978d91d4
    01befb3eb164b4fe870e96fa586cd03293b3f4957fa4ab7ffe7c5dbf4cea
    7eb574e3675d8ffb55ec36598f413ed6cfb7f47639f6fb6bd9ea6fff000a
    929d25e398023eb952008ff288d3febcbd8d798647d5dea1d23eb7615f73
    43b1327398faaeac12c1baddeca2ddc3f457ecff0007ff006d7a8929f4f5
    8fd1ddf6bcecdcdbba59c0c863cd0cc8781bf22b11fa4fa35bfd3fd1d5ff
    0005fe8afb7f48aef5319eec0bdbd35cc666b9a450eb356877fafd051e8e
    dea4de9b437aab9afce008b9cd882773b67d0dacfe6b624a6ea4924929f2
    4ff181ff008a6bff00a95ffd4858dd23fe55c2ff00c3157fd5b1775f5afe
    a5f56eb1d61f9d88ea1b5398c6c3dc5ae968daeddb2a72cec0ff00179d77
    1b3f1b22c7e396536b2c7c3dc4c31cd7bbfc07f25253e96924924a524924
    92985dfcd3ff00aa7f22f07c8fe916ff005ddf957bcbc6e696f88217995f
    fe2e3af3eeb1ecb31f6b9ce2d97b81827fe252530ff16ba75fb89e062be7
    fcfc743fafdd70751ea9f63a1fbb1b0fdb20e8eb0ff38ee7fc17f37ff6f2
    d7e89f533eb17487e5e4576d1ebd98eea6987388dcf754edcfdf537dbb6b
    5967fc5bfd62264bb1e4f3363bff004924a79400b886b44926001dcaf65f
    aabd17f62f48af1dd1ebbff49791ddeeff00c833f46b9afab5f507370baa
    5799d50d4eaa8f7d6c638ba6c07f46e7ee637db5fd3ff8c5dea4a5d24924
    94e5fd62e8d575ae976e23f4b3e952f892d78f7376ff00d42f16b6a7d36b
    eab06db2b716bda7b39a76b9abdf5709f5a7ea265f50ea4737a51a98db84
    decb1c5bfa407f9c6fb6cfe71bfebfa4494e0fd45eb87a67566e35847d9b
    348ade4cfb5fafa2f6ff0059ff00a35e85f59ba3b3acf49b7174f55a3d4a
    1c7f36c68f67f9df41ff00f04b831fe2e3eb10321d8e08e3f48eff00d24b
    d1ba3d59d4f4dc7a7a86d3955b032c731db83b6fb5b66f736bfa6929f0fb
    2bb2ab1f55ad2cb2b716bda790e69daf6b9457a5fd6efa8f6752c83d47a5
    96b725ff00cfd2f30d7c0dac7d2efa35d9ecd9fe8d723ff327eb44c7d81d
    fe7d7ffa5525386c63ec7b58c6973dc435ad689249d1ad6b42f65faadd10
    745e935e33e0e4389b2f70eef77fe419b2b585f553ea23ba7e437a87562c
    7e4335a2869dcdaddfe9ad7fe7dccfccff00075ff39ff17db24a52c2fae9
    83767fd5dcaaa86efb59b6d6b7c7639afb3ff01f516ea6494f80abd8bd6f
    abe15228c4ccba9a4124318f21a09fa5b5abb9ebdfe2e6ac9b5f95d1ec6d
    0f792e763593e949ff004163039f4ffc5ecb3feb4b07ff001bafac731b69
    f8fa9ff9824a727fe737d61ffcb1c8ff00b71dfde9ff00e73fd6131fe51c
    8d3fe11cb57ff1bafac7fbb4ff00db9ff98a6ffc6efeb27ee53ff6e0fee4
    94e57fce6fac3ff96391a7fc2392ff009cbf580ffde8e46bff0008effc92
    d5ff00c6ebeb27eed3ff006e7fe6290ff175f592636d23cfd4ff00cc5253
    97ff0039beb0ff00e58e47fdb8ef8ad8faa3d7bace57d62c2c7c9cdbaea5
    e5e1d5bde48315d85bbb77f510cff8bafac9fbb49ffae7fe62b5beacfd49
    eb3d33ade2e765fa428a77976c7ee77b99654df6ecfde7a4a7a2faf18766
    5fd5bca6d4ddd655b6d00730c735d67fe05bd78faf7e2038104483a10785
    c3758ff16b564643efe9790dc76bc971c7b1a4b1a4ff00a1b2bfa157fc1f
    a6929e4717eb67d60c3c7af171b31d5d150db5b0359a0feb1af7237fcf6f
    ad1ff73ddfe657ff00a4568ffe369f583fd2e2ff009eff00fde74dff008d
    afd60ff498dfe7bfff004824a73ffe7b7d68ff00b9eeff0032bf2ff82fe4
    a6ff009ebf5a35fd7ddaff0022bffd24b47ff1b5fac1fe971bfcf7ff00e9
    0487f8b5fac07fc2e30fedbfff004824a73bfe7afd6899fb7bbfccafff00
    49271f5dbeb40007dbdda7f22b3e1ff05fc95a1ff8da7d60ff004b8bfe7b
    ff00f79d3ffe369f583fd2e2ff009eff00fde7494cfeac7d6cebf99d730f
    132b2cdb8f6bc87b1cd66bed73be9b58c7a87d69fac7d730beb0e6518b99
    655554e68ad822002c63ff0039bfcb5a3f57bea1f58e9bd631b3f26da3d2
    a1c5ce0c7b8b8fb5cdf6efa367e726fac5f51bacf53eb5959d8cea0537b8
    1607bdc1da3595fb9ada9dfb8929e61df5afeb1b9c5c7a85b2798200ff00
    35ad4dff003abeb17fe585df7ad6ff00c6dbeb0fefe37fdb8eff00d2297f
    e36df587f7f1bfedc77fe91494e4ff00ceafac5ff96177f9c97fceafac5f
    f96177dffec5adff008db7d61fdfc6ff00b71dff00a452ff00c6dbeb0fef
    e37fdb8eff00d22929ca6fd6cfac6c3b8750b67cc83ff56d5473ba8e7751
    b45d9b73afb0080e74682776df6ae8ff00f1b6fac3fbf8dff6e3bff48a3e
    2ff8b2eacfb232f269a6a8fa55eeb1d33f47639b47fd5a4a799e8f8e6fce
    add3b6ba3f4d6bcf0d6b0874bbfb49758ea77755ea16e65c492f30c07f35
    a3e8b7fefebbcea5f516daba7370ba1bdad758672eebdc43ac681ecaff00
    4553bf3961ff00e36bf583fd2637f9efff00d20929e7fa3f4bbfab750ab0
    68d0d87dce890d68fa6f77faff0038bdaf0f16ac3c5ab169686d753435a0
    7905cf7d4efaa6fe86cb6fccd8fcdb0ed0eac921b5fee6e7b59f9cba8494
    a49249253c87f8c0e82337a71ea54b7f58c305ce8e5d569eaeeff8967e9b
    ff00562f2f5efae6b5ed2c7096b8410bcdfa87f8b7ea8ecdb9f83651f657
    38baa6bdce6b9ad2777a7b5b53ff009b494dcff173d78163ba3643a0b7dd
    8b27904b9d6d7fd8ff005fe6960fd7d1ff0064b91e6d67fd4ad1c0fa83f5
    9b07329cca6dc66d94bc387e91fdbe937f98fcf6fb15dfac7f527adf57ea
    6ecea9f8ed0f63410e7381dcd1eee2ab1253c87d5cff0097b03fe3d9f957
    b6af39e8ff00503ad61754c5cbbdf43aaa6c6bde18f717403f9ad752d5e8
    c9294abe6e0e367e33f172ab1654f105a44ab0924a7c77eb37d56cbe8579
    709b709e7f457784fd1aeffddb3ff3e7fe06b097bce4e2e3e5d2ea326b6d
    b4bfe931e241fecae07abff8b4bfd636748b98697127d1b89059fc965ad6
    bfd46ff5ff00f04494f08bd13fc5861dacc7cdcd708aed736b64f7f4f739
    eeff00c1567607f8b5ea8fc86fed0b6aab1c105fe9b8bdee13eead9ed636
    bdccff0009ff0081af45c3c4a30716ac4c66eca6968631be4047bbf79252
    74924925292492494fffd5efd2492494a5cefd71fabffb67003a96ce5512
    6b800b9c0fe67d2afe8bbfe37f45ebfa58f7647a2ba249253c4fd46ebedc
    bc677d5fea91f68a41ae86583f9da8076fc67b5c366fc6637feb98ff00f1
    36aa5d73eafd9d11f739949cbe8194e2eb6b6b775988e8f75f5ed6fe8eaa
    ff00f3dfe86dff004ead7d74fab598fcc6758e9559f59bb5cef45bef1634
    ef6dbb296fa9639ced9fa6fd259ea7f3ff00abfa7f67b7f567eba539db7a
    6759fd5ba9b4fa44d836b6e77d18734b5adc7c9fccb287ff00396ff31fe8
    2b4a7956b28af66464dd01e7f52eb1538bde1ccf4d8caba962fa9ec67a3e
    9b3df57fe7dc8b16866e774dc80d1d76a0dcb869a3acf4f717b5cd9b18db
    6cd59757edc67d5fa5f5ff00c35d554b77a9fd49acdb665f44b461db6c9b
    319e3763d9a386cf4dbefc7dfea3ff004957f33fe02b5cf1e97d430722d3
    66364748f697d97e334e4e14303ecb6fc8abf4be9d7b59eca9252ccc6bf2
    e1b46474eeaf5b2093900559003bdbe86ff63bf33f9cfd27f38add7d1ac6
    936b7eade2b9a0c6ff00b607301fe536c7bdbfb8a8330f1b2bda1dd2ba8b
    5d1b6c16bb0b25c4ff00c138d2dffc06c55dfd1f258e34bba239dee2d6ed
    c976d3f49ed6b7dfb5ff00a36bff00e33f9c494e8e465e46233d3bb2f0fa
    456c6fb31ba682fc9b376e7fa3ebb7d5d9b9edfe777fa4aa62e25b5db464
    b83fa6e33acdd53e77f50c971db51663318df56cb323f73d3fd0db917d5f
    a3c3c94466259815d765b7607452c6877a95b9d7658247f37e935f7dbfa4
    ddf9ecb7d0ff008dad6d61635b66f77d5fc1b6cc9b810eeb7d50969008f6
    db8dbbf5cbbd467b3f56a29abf9af57d4494f598594ec8a2b7df57d9b21e
    373b19ce6b9ecfdddfe9ff0023deacae7ba6f44c0e80d7f55ea7946dcc2d
    8bf32f7c34076dfd0d5bb6edabd4fe6ebffd46a8e6752ea3f59aaa2efaab
    9868fb35c5b955d9fa327567d9ef76966fc6f6dbfa3ff09fe87d4fd1a4a6
    0f7e17d76c96d6d765603fa5d8e77006f92d6b5fba7f439357a7fb9fa25d
    8a8535b995b4585aeb768163dadda1cefcf7867bb66e7ff2d11252924924
    94a4924925292492494a4924925292492494a4924925292492494a492492
    5292492494a4924925292492494a4924925292492494a492492529249249
    4a4924925292492494a4924925292492494a4924925292492494a4924925
    292492494a4924925292492494a4924925292492494a4924925292492494
    a4924925292492494a4924925292492494a4924925292492494a49249253
    ffd6efd2492494a492492529733f593ea5e17582ec9a00a33dc5bbac921a
    e1f45fea57eef7ecff00b73fd257ea7aaba649253e6d8bd6beb5fd542313
    3f1ce5e1b07b1af9f635a03dde865b03ff00475fa8c67bfed18f5ff3542e
    8b03fc60fd5ecb6c5f63f0ec9036dad2419fddb71fd666cff8df4974b657
    5dac2cb1a1ec772d70041f8b5cb0337ea3fd5ecb73de683558f2e71731c4
    7b9dbb5d7fadfcdff36929b4f67d56eacf758efb0e6d80439ffa2b1e07fc
    637758d556dfa9ff0054092fb312b6fc2db18381f9acbd8c5903fc57e0ef
    797e6d9b4ba58d630376b7f71ceb1f77a8ff00e5ff00e069bff1aec2db1f
    6fb77763b1b1f9bf9bbbfaff00ebfce253aaec8fa8bd208b9a706bb2b300
    d6196dad274fa340bf2566753ff1958cddd4f48c67e4dba86db68dacd3fc
    232967e9ed67f5fecc9b1bfc5860b2c71cacdb2da88f636b60aded33eddd
    6bdf935bff00ed85d1e1fd59e8585b0d3875ef6410f70dcedc07a7ea7bfd
    bbd253c4e3fd5dfac9f5b6d19dd5720d147f822f69da1ae1bb76163b7654
    fabf99fd2eff00d3ff00dc8f51779d1fa360f46c46e2e1b600fa763a37d8
    7f7ed7abc9d25292492494a4924925292492494a4924925292492494a492
    4925292492494a4924925292492494a4924925292492494a492492529249
    2494a4924925292492494a4924925292492494a4924925292492494a4924
    925292492494a4924925292492494a4924925292492494a4924925292492
    494a4924925292492494a4924925292492494a4924925292492494a49249
    25292492494a4924925292492494ff00ffd7efd2492494a4924925292492
    494a4924925292492494a4924925292492494a4924925292492494a49249
    25292492494a4924925292492494a4924925292492494a49249252924924
    94a4924925292492494a4924925292492494a4924925292492494a492492
    5292492494a4924925292492494a4924925292492494a492492529249249
    4a4924925292492494a4924925292492494a4924925292492494a4924925
    292492494a4924925292492494a4924925292492494a49249253ffd9
    ]]></icerik></resim><kisa_ad>Resim 3d1df48649498</kisa_ad><kaynak>TKWORD</kaynak><gizlilik>TASNIF DISI</gizlilik><tarihce islemturu="YENI_KAYIT"><kullanici>havelsan</kullanici><islemani>2002-06-29T20:55:18</islemani></tarihce></nesne>

  • XML Schema based form in webdynpro

    Hi I have existing webdynpro which is having an interactive form view. The form is XML schema based.
    I want to create the same webdynpro with different data structure and different interactive form.
    Do i need to create the form with XML schema or do i need to do that from Webdynpro side which will generate the XML Schema automatically.
    Can you please help.
    Nik

    Thanks Amit,
    It as a really a good help for me to understand the process of creation of form from Webdynpro.
    Let me explain you the problem in detail:-
    There is an webdynpro application where  7 forms are added using differents views for each form (created through webdynpro) with different interfaces. That means in all the forms i found XML Schema based interface.
    One for the forms view for surround frame form ZFORM1 (using a structure  ZSTR1 of 20 fields in the interface ZINT1 is there)
    An adobe form Developer created a new form ZFORM2 by copying this ZFORM1. That means ZFORM2 is also using the same interface ZINT1 (we can also say same structure ZSTR1 ).
    No view was created to use this form.
    Now before creating the view & add  it in the WD aplication, for this ZFORM2 Client want to delete 2
    fields & 2 new fields for this form ZFORM2.
    I created a new structure ZSTR2 ( as per the fields required) Now i am thinking of to create a new form ZFORM2 using this structure ZSTR2 in the context of my new View .This will create a new interface ZINT2 (XML schema based)
    But this is a very time consuming process as the form ZFORM2 created by the developer earlier has so many java scripting code. he took 2 months to develop it. and i dont have that much time.
    I am sure there must be some other way to fix this problem.
    Can anyone give me the proper solution .
    Cheers,
    Nik

  • How to create table for XML schema-based Interface form

    Hi All,
    With tcode SFP to crate  a XML schema-based Interface form, how to create a defined table can be listed in "Data View"?
    Just like APAP Dictonary- Based Interface form, that we can drag  a defined table from data view to the panel.

    Hi,
    Just follow these steps:
    1. Create interactive form UI element in your view.
    2. Now provide Datasource and PDFSOURCE to it in form properties.
    3. Now give a template name prefix with 'Z' or 'Y'.
    4. Double click on it. It will prompt for interface name.
    5. Provide interface name prefixed with 'Z' or 'Y'.
    6. Click on Context button in the Pop up window and provide the node you have selected as DATASOURCE.
    7. Click ok and it will open the form designer.
    8. In this way you can create a XML Schema based Form.
    9. Activate the interface and design the form providing layout type and other details.
    Hope it will help.
    Regards,
    Vaibhav

  • Generate Adobe Interactive Form with XML Schema-Based Interface

    Hi,
    I need to generate a adobe Interactive but with XML Schema-Based Interface, i have one example but with ABAP Dictionary-Based Interface.
    CALL FUNCTION 'FP_JOB_OPEN'
      CHANGING
        ie_outputparams       = fp_outputparams
    * EXCEPTIONS
    *   CANCEL                = 1
    *   USAGE_ERROR           = 2
    *   SYSTEM_ERROR          = 3
    *   INTERNAL_ERROR        = 4
    *   OTHERS                = 5
    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
      EXPORTING
        i_name     = 'ZMMDM_CL'
      IMPORTING
        e_funcname = fm_name.
    But when i call the next function for print i need the docxml parameter and i don't know how to get it
    fm_name
    CALL FUNCTION fm_name
      EXPORTING
       /1BCDWB/DOCPARAMS        = fp_docparams
    *    /1bcdwb/docxml           =
    * IMPORTING
    *   /1BCDWB/FORMOUTPUT       =
    * EXCEPTIONS
    *   USAGE_ERROR              = 1
    *   SYSTEM_ERROR             = 2
    *   INTERNAL_ERROR           = 3
    *   OTHERS                   = 4

    1) this questions was asked many times before, you didn´t search for a second
    2) I am not aware of any standard solution
    3) custom solution: use XSLT transformation ID to get XML from the filled DDIC structure and use string operations to add the header and footer to create a valid XML.
    Regards Otto

  • Schema based xml db

    how to create schema based xml database..i have tried but showing errors
    how to register the xml schema......

    LOL - "being the ACE" - hereby some of the things you could do
    an example
    clear screen
    -- Drop user TEST if it exists - Cleaning Up First
    conn / as sysdba
    set echo on
    set termout on
    set feed on
    drop user test cascade;
    purge dba_recyclebin;
    create user test identified by test;
    grant xdbadmin, dba to test;
    connect test/test
    set echo on
    set termout on
    set feed on
    var schemaPath varchar2(256)
    var schemaURL  varchar2(256)
    pause
    clear screen
    begin
      :schemaURL := 'http://www.myserver.com/root.xsd';
      :schemaPath := '/public/root.xsd';
    end;
    -- Create an XML Schema root.xsd in directory /public/
    declare
      res boolean;
      xmlSchema xmlType := xmlType(
    '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:xdb="http://xmlns.oracle.com/xdb"
                xmlns="http://www.myserver.com/root.xsd" targetNamespace="http://www.myserver.com/root.xsd"
                elementFormDefault="qualified"
                attributeFormDefault="unqualified"
                xdb:storeVarrayAsTable="true">
    <xs:element name="ROOT" xdb:defaultTable="ROOT_TABLE" xdb:maintainDOM="false">
      <xs:annotation>
       <xs:documentation>Example XML Schema</xs:documentation>
      </xs:annotation>
      <xs:complexType xdb:maintainDOM="false">
       <xs:sequence>
        <xs:element name="ID" type="xs:integer" xdb:SQLName="ID"/>
        <xs:element ref="INFO" xdb:SQLInline="false" />
       </xs:sequence>
      </xs:complexType>
    </xs:element>
    <xs:element name="INFO" xdb:SQLName="INFO_TYPE">
      <xs:complexType xdb:maintainDOM="false">
       <xs:sequence>
        <xs:element name="INFO_ID" type="xs:integer" xdb:SQLName="TYPE_INFO_ID"/>
        <xs:element name="INFO_CONTENT"
                    xdb:SQLName="TYPE_INFO_CONTENT" type="xs:string"/>
       </xs:sequence>
      </xs:complexType>
    </xs:element>
    </xs:schema>');
    begin
    if (dbms_xdb.existsResource(:schemaPath)) then
        dbms_xdb.deleteResource(:schemaPath);
    end if;
    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    end;
    pause
    clear screen
    -- Selecting repository files and folders via XDBUriType
    select xdbURIType ('/public/root.xsd').getClob()
    from   dual;
    pause
    clear screen
    begin
      :schemaURL := 'http://www.myserver.com/root.xml';
      :schemaPath := '/public/root.xml';
    end;
    -- Create an XML Document root.xml in directory /public/
    declare
      res boolean;
      xmlSchema xmlType := xmlType(
    '<?xml version="1.0" encoding="UTF-8"?>
    <ROOT xmlns="http://www.myserver.com/root.xsd">
    <ID>0</ID>
    <INFO>
       <INFO_ID>0</INFO_ID>
       <INFO_CONTENT>Text</INFO_CONTENT>
    </INFO>
    </ROOT>');
    begin
    if (dbms_xdb.existsResource(:schemaPath)) then
        dbms_xdb.deleteResource(:schemaPath);
    end if;
    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    end;
    pause
    clear screen
    -- Selecting repository files and folders via XDBUriType
    select xdbURIType ('/public/root.xml').getClob()
    from   dual;
    pause
    clear screen
    -- Delete an XML schema in the registry if it exists
    call DBMS_XMLSCHEMA.deleteSchema('http://www.myserver.com/root.xsd', 4);
    commit;
    select * from tab;
    alter session set events='31098 trace name context forever';
    BEGIN
    DBMS_XMLSCHEMA.registerSchema
    (SCHEMAURL => 'http://www.myserver.com/root.xsd',
      SCHEMADOC => xdbURIType('/public/root.xsd').getClob(),
      LOCAL     => FALSE, -- local
      GENTYPES  => TRUE,  -- generate object types
      GENBEAN   => FALSE, -- no java beans
      GENTABLES => TRUE,  -- generate object tables
      OWNER     => USER
    END;
    commit;
    select * from tab;
    pause
    clear screen
    -- Insert some data with XDBURIType
    DECLARE
       XMLData xmlType := xmlType(xdbURIType ('/public/root.xml').getClob());
    BEGIN
      for i in 1..10
      loop
          insert into ROOT_TABLE
          VALUES
          (XMLData);
      end loop;
    END;
    commit;
    -- randomize the data a little
    update ROOT_TABLE
    set object_value = updateXML(object_value,
                                '/ROOT/ID/text()',
                                substr(round(dbms_random.value*100),0,2)
    update ROOT_TABLE
    set object_value = updateXML(object_value,
                                '/ROOT/INFO/INFO_ID/text()',
                                substr(round(dbms_random.value*100),0,2)
    commit;
    pause
    clear screen
    -- End Result
    select count(*) from root_table;
    select * from root_table where rownum < 5;

  • Performance on  Schema based Xml and No Schema based XML

    Hai,
    We can insert two kind of xml like schema based xml document and non schema based xml document into XMLTYPE fields.I like to know which xml document will have good performance ( fast access ) compare to another.
    Even if we have any other approach than schema.It will be great.
    We do XPath query to get the values from xml document.Is there any way to get the fields faster than the XPath.I am using Oracle 10g R2.
    I need to access much fast the xml element from the table.Please help me!.
    Thanks,
    Saravanan.P

    HHave you read the FAQ or any of the XML DB whitepapers... If not I suggest that you do so before proceeding any further or asking any more questions. If you take the time to a do a little basic research you should be able to see that you have made the worst possible decision if performance is importantto you.
    If you invested a little bit of effort before posting you would soon understand that in 10gR2 you will need to use schema based storage to get high performance, and that it doesn't matter whether you use XPath or XQuery, what matters is whether or not the XPath or XQuery operations get re-written correctly so the database can optimize them.

  • XML Schema validator fails to load XML Schema from URL

    I'm trying to validate an XML document against a set of XML Schemas and the parser seems to freak out: even though all the schemas are referred to in the XML and are properly recognized by Schemas field in XML document properties, I get warnings (multiple
    instances):
    Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed
    Cannot resolve the 'schemaLocation' attribute
    The schema referenced from this location in your document contains errors
    The warning locations are also seemingly random - errors in schema locations are reported on closing tags inside XML or on whitespaces, and so on.
    The first warning (System.Net.WebPermission) suggests it has something to do with access to remote schemas, but all the necessary remote schemas are visible in XML Schema Set editor for the document. I also enabled downloading of XML schemas in XML text
    editor options.

    Hi Tomasz,
    Thank you for posting in MSDN forum.
    Since this issue is related to the XML Schemas, so we will move this case to the XML forum:https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=xmlandnetfx
    , you will get better support.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create XML from relational tables based on an XML Schema ?

    There is no automated way in Oracle XML DB to define an automatic mapping between a set of columns in some existing relational tables and the elements and attributres defined by an XML Schema.
    However it is easy solve this problem by using the SQL/XML operators (XMLAGG, XMLELEMENT, XMLFOREST, XMLATTRIBUTES, etc) to generate XML documents that are compliant with an XML Schema directly from a SQL statement.
    If the XML Schema is registered with Oracle XML DB and the appropraite Schema Location information is added into the generated document using XMLAttributes then it becomes very easy to ensure that the generated documents are valid.
    The following example show an easy way to do this by creating an XML View that contains the documents to be validated.
    SQL> drop table PURCHASEORDER_LINEITEM
      2  /
    Table dropped.
    SQL> drop table PURCHASEORDER_REJECTION
      2  /
    Table dropped.
    SQL> drop table PURCHASEORDER_SHIPPING
      2  /
    Table dropped.
    SQL> drop TABLE PURCHASEORDER_ACTION
      2  /
    Table dropped.
    SQL> drop TABLE PURCHASEORDER_TABLE
      2  /
    Table dropped.
    SQL> create table PURCHASEORDER_TABLE
      2  (
      3   REFERENCE                                          VARCHAR2(28),
      4   PRIMARY KEY ("REFERENCE"),
      5   REQUESTER                                          VARCHAR2(48),
      6   USERID                                             VARCHAR2(32),
      7   COSTCENTER                                         VARCHAR2(3),
      8   SPECIALINSTRUCTIONS                                VARCHAR2(2048)
      9  )
    10  /
    Table created.
    SQL> create table PURCHASEORDER_ACTION
      2  (
      3   REFERENCE,
      4   FOREIGN KEY ("REFERENCE")                          REFERENCES "PURCHASEORDER_TABLE" ("REFERENCE") ON DELETE CASCADE,
      5   ACTIONEDBY                                         VARCHAR2(32),
      6   DATEACTIONED                                       DATE
      7  )
      8  /
    Table created.
    SQL> create table PURCHASEORDER_SHIPPING
      2  (
      3   REFERENCE,
      4   FOREIGN KEY ("REFERENCE")                          REFERENCES "PURCHASEORDER_TABLE" ("REFERENCE") ON DELETE CASCADE,
      5   PRIMARY KEY ("REFERENCE"),
      6   SHIPTONAME                                         VARCHAR2(48),
      7   ADDRESS                                            VARCHAR2(512),
      8   PHONE                                              VARCHAR2(32)
      9  )
    10  /
    Table created.
    SQL> create table PURCHASEORDER_REJECTION
      2  (
      3   REFERENCE,
      4   FOREIGN KEY ("REFERENCE")                          REFERENCES "PURCHASEORDER_TABLE" ("REFERENCE") ON DELETE CASCADE,
      5   PRIMARY KEY ("REFERENCE"),
      6   REJECTEDBY                                         VARCHAR2(32),
      7   DATEREJECTED                                       DATE,
      8   COMMENTS                                           VARCHAR2(2048)
      9  )
    10  /
    Table created.
    SQL> create table PURCHASEORDER_LINEITEM
      2  (
      3   REFERENCE,
      4   FOREIGN KEY ("REFERENCE")                          REFERENCES "PURCHASEORDER_TABLE" ("REFERENCE") ON DELETE CASCADE,
      5   LINENO                                             NUMBER(10),
      6   PRIMARY KEY ("REFERENCE","LINENO"),
      7   UPC                                                   VARCHAR2(14),
      8   DESCRIPTION                                        VARCHAR2(128),
      9   QUANTITY                                           NUMBER(10),
    10   UNITPRICE                                          NUMBER(12,2)
    11  )
    12  /
    Table created.
    SQL> insert into PURCHASEORDER_TABLE values ('SMCCAIN-20030109123335470PDT','Samuel B. McCain','SMCCAIN','A10','Courier')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_ACTION values ('SMCCAIN-20030109123335470PDT','SVOLLMAN',NULL)
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_SHIPPING values ('SMCCAIN-20030109123335470PDT','Samuel B. McCain','800 Bridge Parkway,Redwood Shores,CA,9406
    5,USA','650 506 7800')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_REJECTION values ('SMCCAIN-20030109123335470PDT',null,null,null)
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','1','715515010320','Life of Brian - Monty Python''s','2','39.
    95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','2','37429145227','The Night Porter','2','29.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','3','37429128121','Oliver Twist','1','39.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','4','715515012720','Notorious','4','39.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','5','715515012928','In the Mood for Love','3','39.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','6','37429130926','Alphaville','2','29.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','7','37429166529','General Idi Amin Dada','4','29.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','8','715515012928','In the Mood for Love','3','39.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','9','715515009423','Flesh for Frankenstein','3','39.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','10','715515008976','The Killer','1','39.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','11','37429167922','Ballad of a Soldier','2','29.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','12','37429158623','Ordet','2','0')
      2  /
    1 row created.
    SQL> var schemaPath varchar2(256)
    SQL> --
    SQL> begin
      2    :schemaURL := 'http://xfiles:8080/home/SCOTT/poSource/xsd/purchaseOrder.xsd';
      3    :schemaPath := '/public/purchaseOrder.xsd';
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SQL> call dbms_xmlSchema.deleteSchema(:schemaURL,4)
      2  /
    Call completed.
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<!-- edited with XML Spy v4.0 U (http://www.xmlspy.com) by Mark (Drake) -->
      5  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" version="1.0" xdb:storeVarrayAsTable="tr
    ue">
      6          <xs:element name="PurchaseOrder" type="PurchaseOrderType" xdb:defaultTable="PURCHASEORDER"/>
      7          <xs:complexType name="PurchaseOrderType" xdb:SQLType="PURCHASEORDER_T" xdb:maintainDOM="false">
      8                  <xs:sequence>
      9                          <xs:element name="Reference" type="ReferenceType" xdb:SQLName="REFERENCE"/>
    10                          <xs:element name="Actions" type="ActionsType" xdb:SQLName="ACTIONS"/>
    11                          <xs:element name="Reject" type="RejectionType" minOccurs="0" xdb:SQLName="REJECTION"/>
    12                          <xs:element name="Requestor" type="RequestorType" xdb:SQLName="REQUESTOR"/>
    13                          <xs:element name="User" type="UserType" xdb:SQLName="USERID"/>
    14                          <xs:element name="CostCenter" type="CostCenterType" xdb:SQLName="COST_CENTER"/>
    15                          <xs:element name="ShippingInstructions" type="ShippingInstructionsType" xdb:SQLName="SHIPPING_INSTRUCTIONS"/>
    16                          <xs:element name="SpecialInstructions" type="SpecialInstructionsType" xdb:SQLName="SPECIAL_INSTRUCTIONS"/>
    17                          <xs:element name="LineItems" type="LineItemsType" xdb:SQLName="LINEITEMS"/>
    18                  </xs:sequence>
    19          </xs:complexType>
    20          <xs:complexType name="LineItemsType" xdb:SQLType="LINEITEMS_T" xdb:maintainDOM="false">
    21                  <xs:sequence>
    22                          <xs:element name="LineItem" type="LineItemType" maxOccurs="unbounded" xdb:SQLName="LINEITEM" xdb:SQLCollType="L
    INEITEM_V"/>
    23                  </xs:sequence>
    24          </xs:complexType>
    25          <xs:complexType name="LineItemType" xdb:SQLType="LINEITEM_T" xdb:maintainDOM="false">
    26                  <xs:sequence>
    27                          <xs:element name="Description" type="DescriptionType" xdb:SQLName="DESRIPTION"/>
    28                          <xs:element name="Part" type="PartType" xdb:SQLName="PART"/>
    29                  </xs:sequence>
    30                  <xs:attribute name="ItemNumber" type="xs:integer" xdb:SQLName="ITEMNUMBER" xdb:SQLType="NUMBER"/>
    31          </xs:complexType>
    32          <xs:complexType name="PartType" xdb:SQLType="PART_T" xdb:maintainDOM="false">
    33                  <xs:attribute name="Id" xdb:SQLName="PART_NUMBER" xdb:SQLType="VARCHAR2">
    34                          <xs:simpleType>
    35                                  <xs:restriction base="xs:string">
    36                                          <xs:minLength value="10"/>
    37                                          <xs:maxLength value="14"/>
    38                                  </xs:restriction>
    39                          </xs:simpleType>
    40                  </xs:attribute>
    41                  <xs:attribute name="Quantity" type="moneyType" xdb:SQLName="QUANTITY"/>
    42                  <xs:attribute name="UnitPrice" type="quantityType" xdb:SQLName="UNITPRICE"/>
    43          </xs:complexType>
    44          <xs:simpleType name="ReferenceType">
    45                  <xs:restriction base="xs:string">
    46                          <xs:minLength value="18"/>
    47                          <xs:maxLength value="30"/>
    48                  </xs:restriction>
    49          </xs:simpleType>
    50          <xs:complexType name="ActionsType" xdb:SQLType="ACTIONS_T" xdb:maintainDOM="false">
    51                  <xs:sequence>
    52                          <xs:element name="Action" maxOccurs="4" xdb:SQLName="ACTION" xdb:SQLCollType="ACTION_V">
    53                                  <xs:complexType xdb:SQLType="ACTION_T" xdb:maintainDOM="false">
    54                                          <xs:sequence>
    55                                                  <xs:element name="User" type="UserType" xdb:SQLName="ACTIONED_BY"/>
    56                                                  <xs:element name="Date" type="DateType" minOccurs="0" xdb:SQLName="DATE_ACTIONED"/>
    57                                          </xs:sequence>
    58                                  </xs:complexType>
    59                          </xs:element>
    60                  </xs:sequence>
    61          </xs:complexType>
    62          <xs:complexType name="RejectionType" xdb:SQLType="REJECTION_T" xdb:maintainDOM="false">
    63                  <xs:all>
    64                          <xs:element name="User" type="UserType" minOccurs="0" xdb:SQLName="REJECTED_BY"/>
    65                          <xs:element name="Date" type="DateType" minOccurs="0" xdb:SQLName="DATE_REJECTED"/>
    66                          <xs:element name="Comments" type="CommentsType" minOccurs="0" xdb:SQLName="REASON_REJECTED"/>
    67                  </xs:all>
    68          </xs:complexType>
    69          <xs:complexType name="ShippingInstructionsType" xdb:SQLType="SHIPPING_INSTRUCTIONS_T" xdb:maintainDOM="false">
    70                  <xs:sequence>
    71                          <xs:element name="name" type="NameType" minOccurs="0" xdb:SQLName="SHIP_TO_NAME"/>
    72                          <xs:element name="address" type="AddressType" minOccurs="0" xdb:SQLName="SHIP_TO_ADDRESS"/>
    73                          <xs:element name="telephone" type="TelephoneType" minOccurs="0" xdb:SQLName="SHIP_TO_PHONE"/>
    74                  </xs:sequence>
    75          </xs:complexType>
    76          <xs:simpleType name="moneyType">
    77                  <xs:restriction base="xs:decimal">
    78                          <xs:fractionDigits value="2"/>
    79                          <xs:totalDigits value="12"/>
    80                  </xs:restriction>
    81          </xs:simpleType>
    82          <xs:simpleType name="quantityType">
    83                  <xs:restriction base="xs:decimal">
    84                          <xs:fractionDigits value="4"/>
    85                          <xs:totalDigits value="8"/>
    86                  </xs:restriction>
    87          </xs:simpleType>
    88          <xs:simpleType name="UserType">
    89                  <xs:restriction base="xs:string">
    90                          <xs:minLength value="1"/>
    91                          <xs:maxLength value="10"/>
    92                  </xs:restriction>
    93          </xs:simpleType>
    94          <xs:simpleType name="RequestorType">
    95                  <xs:restriction base="xs:string">
    96                          <xs:minLength value="0"/>
    97                          <xs:maxLength value="128"/>
    98                  </xs:restriction>
    99          </xs:simpleType>
    100          <xs:simpleType name="CostCenterType">
    101                  <xs:restriction base="xs:string">
    102                          <xs:minLength value="1"/>
    103                          <xs:maxLength value="4"/>
    104                  </xs:restriction>
    105          </xs:simpleType>
    106          <xs:simpleType name="VendorType">
    107                  <xs:restriction base="xs:string">
    108                          <xs:minLength value="0"/>
    109                          <xs:maxLength value="20"/>
    110                  </xs:restriction>
    111          </xs:simpleType>
    112          <xs:simpleType name="PurchaseOrderNumberType">
    113                  <xs:restriction base="xs:integer"/>
    114          </xs:simpleType>
    115          <xs:simpleType name="SpecialInstructionsType">
    116                  <xs:restriction base="xs:string">
    117                          <xs:minLength value="0"/>
    118                          <xs:maxLength value="2048"/>
    119                  </xs:restriction>
    120          </xs:simpleType>
    121          <xs:simpleType name="NameType">
    122                  <xs:restriction base="xs:string">
    123                          <xs:minLength value="1"/>
    124                          <xs:maxLength value="20"/>
    125                  </xs:restriction>
    126          </xs:simpleType>
    127          <xs:simpleType name="AddressType">
    128                  <xs:restriction base="xs:string">
    129                          <xs:minLength value="1"/>
    130                          <xs:maxLength value="256"/>
    131                  </xs:restriction>
    132          </xs:simpleType>
    133          <xs:simpleType name="TelephoneType">
    134                  <xs:restriction base="xs:string">
    135                          <xs:minLength value="1"/>
    136                          <xs:maxLength value="24"/>
    137                  </xs:restriction>
    138          </xs:simpleType>
    139          <xs:simpleType name="DateType">
    140                  <xs:restriction base="xs:date"/>
    141          </xs:simpleType>
    142          <xs:simpleType name="CommentsType">
    143                  <xs:restriction base="xs:string">
    144                          <xs:minLength value="1"/>
    145                          <xs:maxLength value="2048"/>
    146                  </xs:restriction>
    147          </xs:simpleType>
    148          <xs:simpleType name="DescriptionType">
    149                  <xs:restriction base="xs:string">
    150                          <xs:minLength value="1"/>
    151                          <xs:maxLength value="256"/>
    152                  </xs:restriction>
    153          </xs:simpleType>
    154  </xs:schema>
    155  ');
    156  begin
    157    if (dbms_xdb.existsResource(:schemaPath)) then
    158      dbms_xdb.deleteResource(:schemaPath);
    159    end if;
    160    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    161  end;
    162  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      :schemaURL,
      5      xdbURIType(:schemaPath).getClob(),
      6      TRUE,TRUE,FALSE,FALSE
      7    );
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> create or replace view PURCHASEORDER_XML
      2  of xmltype
      3  xmlSCHEMA "http://xfiles:8080/home/SCOTT/poSource/xsd/purchaseOrder.xsd" Element "PurchaseOrder"
      4  with object id
      5  (
      6    substr(extractValue(object_value,'/PurchaseOrder/Reference'),1,32)
      7  )
      8  as
      9    select xmlElement
    10           (
    11             "PurchaseOrder",
    12             xmlAttributes
    13             (
    14               'http://xfiles:8080/home/SCOTT/poSource/xsd/purchaseOrder.xsd' as "xsi:noNamespaceSchemaLocation",
    15               'http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi"
    16             ),
    17             xmlElement("Reference",p.REFERENCE),
    18             xmlElement
    19             (
    20               "Actions",
    21               ( select xmlAgg
    22                        (
    23                          xmlElement
    24                          (
    25                            "Action",
    26                            xmlElement("User",ACTIONEDBY),
    27                            case
    28                              when DATEACTIONED is not null
    29                              then xmlElement("Date",DATEACTIONED)
    30                            end
    31                          )
    32                        )
    33                   from PURCHASEORDER_ACTION a
    34                  where a.REFERENCE = p.REFERENCE
    35               )
    36             ),
    37             xmlElement
    38             (
    39               "Reject",
    40                  xmlForest
    41                  (
    42                    REJECTEDBY as "User",
    43                 DATEREJECTED as "Date",
    44                    COMMENTS as "Comments"
    45                  )
    46             ),
    47             xmlElement("Requestor",REQUESTER),
    48             xmlElement("User",USERID),
    49             xmlElement("CostCenter",COSTCENTER),
    50             xmlElement
    51             (
    52               "ShippingInstructions",
    53               xmlElement("name",SHIPTONAME),
    54               xmlElement("address",ADDRESS),
    55               xmlElement("telephone",PHONE)
    56             ),
    57             xmlElement("SpecialInstructions",SPECIALINSTRUCTIONS),
    58             xmlElement
    59             (
    60               "LineItems",
    61               ( select xmlAgg
    62                        (
    63                          xmlElement
    64                          (
    65                            "LineItem",
    66                            xmlAttributes(LINENO as "ItemNumber"),
    67                            xmlElement("Description",DESCRIPTION),
    68                            xmlElement
    69                            (
    70                              "Part",
    71                              xmlAttributes
    72                              (
    73                                UPC       as "Id",
    74                                QUANTITY  as "Quantity",
    75                                UNITPRICE as "UnitPrice"
    76                              )
    77                            )
    78                          )
    79                        )
    80                    from PURCHASEORDER_LINEITEM l
    81                   where l.REFERENCE = p.REFERENCE
    82               )
    83             )
    84           )
    85      from PURCHASEORDER_TABLE p, PURCHASEORDER_REJECTION r, PURCHASEORDER_SHIPPING s
    86     where r.REFERENCE = p.REFERENCE
    87       and s.REFERENCE = p.REFERENCE
    88  /
    View created.
    SQL> set long 10000 pages 0 lines 140
    SQL> --
    SQL> select x.object_value.extract('/*')
      2    from PURCHASEORDER_XML x
      3  /
    <PurchaseOrder xsi:noNamespaceSchemaLocation="http://xfiles:8080/home/SCOTT/poSource/xsd/purchaseOrder.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <Reference>SMCCAIN-20030109123335470PDT</Reference>
      <Actions>
        <Action>
          <User>SVOLLMAN</User>
        </Action>
      </Actions>
      <Reject/>
      <Requestor>Samuel B. McCain</Requestor>
      <User>SMCCAIN</User>
      <CostCenter>A10</CostCenter>
      <ShippingInstructions>
        <name>Samuel B. McCain</name>
        <address>800 Bridge Parkway,Redwood Shores,CA,94065,USA</address>
        <telephone>650 506 7800</telephone>
      </ShippingInstructions>
      <SpecialInstructions>Courier</SpecialInstructions>
      <LineItems>
        <LineItem ItemNumber="1">
          <Description>Life of Brian - Monty Python&apos;s</Description>
          <Part Id="715515010320" Quantity="2" UnitPrice="39.95"/>
        </LineItem>
        <LineItem ItemNumber="2">
          <Description>The Night Porter</Description>
          <Part Id="37429145227" Quantity="2" UnitPrice="29.95"/>
        </LineItem>
        <LineItem ItemNumber="3">
          <Description>Oliver Twist</Description>
          <Part Id="37429128121" Quantity="1" UnitPrice="39.95"/>
        </LineItem>
        <LineItem ItemNumber="4">
          <Description>Notorious</Description>
          <Part Id="715515012720" Quantity="4" UnitPrice="39.95"/>
        </LineItem>
        <LineItem ItemNumber="5">
          <Description>In the Mood for Love</Description>
          <Part Id="715515012928" Quantity="3" UnitPrice="39.95"/>
        </LineItem>
        <LineItem ItemNumber="6">
          <Description>Alphaville</Description>
          <Part Id="37429130926" Quantity="2" UnitPrice="29.95"/>
        </LineItem>
        <LineItem ItemNumber="7">
          <Description>General Idi Amin Dada</Description>
          <Part Id="37429166529" Quantity="4" UnitPrice="29.95"/>
        </LineItem>
        <LineItem ItemNumber="8">
          <Description>In the Mood for Love</Description>
          <Part Id="715515012928" Quantity="3" UnitPrice="39.95"/>
        </LineItem>
        <LineItem ItemNumber="9">
          <Description>Flesh for Frankenstein</Description>
          <Part Id="715515009423" Quantity="3" UnitPrice="39.95"/>
        </LineItem>
        <LineItem ItemNumber="10">
          <Description>The Killer</Description>
          <Part Id="715515008976" Quantity="1" UnitPrice="39.95"/>
        </LineItem>
        <LineItem ItemNumber="11">
          <Description>Ballad of a Soldier</Description>
          <Part Id="37429167922" Quantity="2" UnitPrice="29.95"/>
        </LineItem>
        <LineItem ItemNumber="12">
          <Description>Ordet</Description>
          <Part Id="37429158623" Quantity="2" UnitPrice="0"/>
        </LineItem>
      </LineItems>
    </PurchaseOrder>
    SQL> begin
      2    for x in (select object_value from PURCHASEORDER_XML) loop
      3      x.object_value.schemaValidate();
      4    end loop;
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL>

    There is no automated way in Oracle XML DB to define an automatic mapping between a set of columns in some existing relational tables and the elements and attributres defined by an XML Schema.
    However it is easy solve this problem by using the SQL/XML operators (XMLAGG, XMLELEMENT, XMLFOREST, XMLATTRIBUTES, etc) to generate XML documents that are compliant with an XML Schema directly from a SQL statement.
    If the XML Schema is registered with Oracle XML DB and the appropraite Schema Location information is added into the generated document using XMLAttributes then it becomes very easy to ensure that the generated documents are valid.
    The following example show an easy way to do this by creating an XML View that contains the documents to be validated.
    SQL> drop table PURCHASEORDER_LINEITEM
      2  /
    Table dropped.
    SQL> drop table PURCHASEORDER_REJECTION
      2  /
    Table dropped.
    SQL> drop table PURCHASEORDER_SHIPPING
      2  /
    Table dropped.
    SQL> drop TABLE PURCHASEORDER_ACTION
      2  /
    Table dropped.
    SQL> drop TABLE PURCHASEORDER_TABLE
      2  /
    Table dropped.
    SQL> create table PURCHASEORDER_TABLE
      2  (
      3   REFERENCE                                          VARCHAR2(28),
      4   PRIMARY KEY ("REFERENCE"),
      5   REQUESTER                                          VARCHAR2(48),
      6   USERID                                             VARCHAR2(32),
      7   COSTCENTER                                         VARCHAR2(3),
      8   SPECIALINSTRUCTIONS                                VARCHAR2(2048)
      9  )
    10  /
    Table created.
    SQL> create table PURCHASEORDER_ACTION
      2  (
      3   REFERENCE,
      4   FOREIGN KEY ("REFERENCE")                          REFERENCES "PURCHASEORDER_TABLE" ("REFERENCE") ON DELETE CASCADE,
      5   ACTIONEDBY                                         VARCHAR2(32),
      6   DATEACTIONED                                       DATE
      7  )
      8  /
    Table created.
    SQL> create table PURCHASEORDER_SHIPPING
      2  (
      3   REFERENCE,
      4   FOREIGN KEY ("REFERENCE")                          REFERENCES "PURCHASEORDER_TABLE" ("REFERENCE") ON DELETE CASCADE,
      5   PRIMARY KEY ("REFERENCE"),
      6   SHIPTONAME                                         VARCHAR2(48),
      7   ADDRESS                                            VARCHAR2(512),
      8   PHONE                                              VARCHAR2(32)
      9  )
    10  /
    Table created.
    SQL> create table PURCHASEORDER_REJECTION
      2  (
      3   REFERENCE,
      4   FOREIGN KEY ("REFERENCE")                          REFERENCES "PURCHASEORDER_TABLE" ("REFERENCE") ON DELETE CASCADE,
      5   PRIMARY KEY ("REFERENCE"),
      6   REJECTEDBY                                         VARCHAR2(32),
      7   DATEREJECTED                                       DATE,
      8   COMMENTS                                           VARCHAR2(2048)
      9  )
    10  /
    Table created.
    SQL> create table PURCHASEORDER_LINEITEM
      2  (
      3   REFERENCE,
      4   FOREIGN KEY ("REFERENCE")                          REFERENCES "PURCHASEORDER_TABLE" ("REFERENCE") ON DELETE CASCADE,
      5   LINENO                                             NUMBER(10),
      6   PRIMARY KEY ("REFERENCE","LINENO"),
      7   UPC                                                   VARCHAR2(14),
      8   DESCRIPTION                                        VARCHAR2(128),
      9   QUANTITY                                           NUMBER(10),
    10   UNITPRICE                                          NUMBER(12,2)
    11  )
    12  /
    Table created.
    SQL> insert into PURCHASEORDER_TABLE values ('SMCCAIN-20030109123335470PDT','Samuel B. McCain','SMCCAIN','A10','Courier')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_ACTION values ('SMCCAIN-20030109123335470PDT','SVOLLMAN',NULL)
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_SHIPPING values ('SMCCAIN-20030109123335470PDT','Samuel B. McCain','800 Bridge Parkway,Redwood Shores,CA,9406
    5,USA','650 506 7800')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_REJECTION values ('SMCCAIN-20030109123335470PDT',null,null,null)
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','1','715515010320','Life of Brian - Monty Python''s','2','39.
    95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','2','37429145227','The Night Porter','2','29.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','3','37429128121','Oliver Twist','1','39.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','4','715515012720','Notorious','4','39.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','5','715515012928','In the Mood for Love','3','39.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','6','37429130926','Alphaville','2','29.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','7','37429166529','General Idi Amin Dada','4','29.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','8','715515012928','In the Mood for Love','3','39.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','9','715515009423','Flesh for Frankenstein','3','39.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','10','715515008976','The Killer','1','39.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','11','37429167922','Ballad of a Soldier','2','29.95')
      2  /
    1 row created.
    SQL> insert into PURCHASEORDER_LINEITEM values ('SMCCAIN-20030109123335470PDT','12','37429158623','Ordet','2','0')
      2  /
    1 row created.
    SQL> var schemaPath varchar2(256)
    SQL> --
    SQL> begin
      2    :schemaURL := 'http://xfiles:8080/home/SCOTT/poSource/xsd/purchaseOrder.xsd';
      3    :schemaPath := '/public/purchaseOrder.xsd';
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SQL> call dbms_xmlSchema.deleteSchema(:schemaURL,4)
      2  /
    Call completed.
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<!-- edited with XML Spy v4.0 U (http://www.xmlspy.com) by Mark (Drake) -->
      5  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" version="1.0" xdb:storeVarrayAsTable="tr
    ue">
      6          <xs:element name="PurchaseOrder" type="PurchaseOrderType" xdb:defaultTable="PURCHASEORDER"/>
      7          <xs:complexType name="PurchaseOrderType" xdb:SQLType="PURCHASEORDER_T" xdb:maintainDOM="false">
      8                  <xs:sequence>
      9                          <xs:element name="Reference" type="ReferenceType" xdb:SQLName="REFERENCE"/>
    10                          <xs:element name="Actions" type="ActionsType" xdb:SQLName="ACTIONS"/>
    11                          <xs:element name="Reject" type="RejectionType" minOccurs="0" xdb:SQLName="REJECTION"/>
    12                          <xs:element name="Requestor" type="RequestorType" xdb:SQLName="REQUESTOR"/>
    13                          <xs:element name="User" type="UserType" xdb:SQLName="USERID"/>
    14                          <xs:element name="CostCenter" type="CostCenterType" xdb:SQLName="COST_CENTER"/>
    15                          <xs:element name="ShippingInstructions" type="ShippingInstructionsType" xdb:SQLName="SHIPPING_INSTRUCTIONS"/>
    16                          <xs:element name="SpecialInstructions" type="SpecialInstructionsType" xdb:SQLName="SPECIAL_INSTRUCTIONS"/>
    17                          <xs:element name="LineItems" type="LineItemsType" xdb:SQLName="LINEITEMS"/>
    18                  </xs:sequence>
    19          </xs:complexType>
    20          <xs:complexType name="LineItemsType" xdb:SQLType="LINEITEMS_T" xdb:maintainDOM="false">
    21                  <xs:sequence>
    22                          <xs:element name="LineItem" type="LineItemType" maxOccurs="unbounded" xdb:SQLName="LINEITEM" xdb:SQLCollType="L
    INEITEM_V"/>
    23                  </xs:sequence>
    24          </xs:complexType>
    25          <xs:complexType name="LineItemType" xdb:SQLType="LINEITEM_T" xdb:maintainDOM="false">
    26                  <xs:sequence>
    27                          <xs:element name="Description" type="DescriptionType" xdb:SQLName="DESRIPTION"/>
    28                          <xs:element name="Part" type="PartType" xdb:SQLName="PART"/>
    29                  </xs:sequence>
    30                  <xs:attribute name="ItemNumber" type="xs:integer" xdb:SQLName="ITEMNUMBER" xdb:SQLType="NUMBER"/>
    31          </xs:complexType>
    32          <xs:complexType name="PartType" xdb:SQLType="PART_T" xdb:maintainDOM="false">
    33                  <xs:attribute name="Id" xdb:SQLName="PART_NUMBER" xdb:SQLType="VARCHAR2">
    34                          <xs:simpleType>
    35                                  <xs:restriction base="xs:string">
    36                                          <xs:minLength value="10"/>
    37                                          <xs:maxLength value="14"/>
    38                                  </xs:restriction>
    39                          </xs:simpleType>
    40                  </xs:attribute>
    41                  <xs:attribute name="Quantity" type="moneyType" xdb:SQLName="QUANTITY"/>
    42                  <xs:attribute name="UnitPrice" type="quantityType" xdb:SQLName="UNITPRICE"/>
    43          </xs:complexType>
    44          <xs:simpleType name="ReferenceType">
    45                  <xs:restriction base="xs:string">
    46                          <xs:minLength value="18"/>
    47                          <xs:maxLength value="30"/>
    48                  </xs:restriction>
    49          </xs:simpleType>
    50          <xs:complexType name="ActionsType" xdb:SQLType="ACTIONS_T" xdb:maintainDOM="false">
    51                  <xs:sequence>
    52                          <xs:element name="Action" maxOccurs="4" xdb:SQLName="ACTION" xdb:SQLCollType="ACTION_V">
    53                                  <xs:complexType xdb:SQLType="ACTION_T" xdb:maintainDOM="false">
    54                                          <xs:sequence>
    55                                                  <xs:element name="User" type="UserType" xdb:SQLName="ACTIONED_BY"/>
    56                                                  <xs:element name="Date" type="DateType" minOccurs="0" xdb:SQLName="DATE_ACTIONED"/>
    57                                          </xs:sequence>
    58                                  </xs:complexType>
    59                          </xs:element>
    60                  </xs:sequence>
    61          </xs:complexType>
    62          <xs:complexType name="RejectionType" xdb:SQLType="REJECTION_T" xdb:maintainDOM="false">
    63                  <xs:all>
    64                          <xs:element name="User" type="UserType" minOccurs="0" xdb:SQLName="REJECTED_BY"/>
    65                          <xs:element name="Date" type="DateType" minOccurs="0" xdb:SQLName="DATE_REJECTED"/>
    66                          <xs:element name="Comments" type="CommentsType" minOccurs="0" xdb:SQLName="REASON_REJECTED"/>
    67                  </xs:all>
    68          </xs:complexType>
    69          <xs:complexType name="ShippingInstructionsType" xdb:SQLType="SHIPPING_INSTRUCTIONS_T" xdb:maintainDOM="false">
    70                  <xs:sequence>
    71                          <xs:element name="name" type="NameType" minOccurs="0" xdb:SQLName="SHIP_TO_NAME"/>
    72                          <xs:element name="address" type="AddressType" minOccurs="0" xdb:SQLName="SHIP_TO_ADDRESS"/>
    73                          <xs:element name="telephone" type="TelephoneType" minOccurs="0" xdb:SQLName="SHIP_TO_PHONE"/>
    74                  </xs:sequence>
    75          </xs:complexType>
    76          <xs:simpleType name="moneyType">
    77                  <xs:restriction base="xs:decimal">
    78                          <xs:fractionDigits value="2"/>
    79                          <xs:totalDigits value="12"/>
    80                  </xs:restriction>
    81          </xs:simpleType>
    82          <xs:simpleType name="quantityType">
    83                  <xs:restriction base="xs:decimal">
    84                          <xs:fractionDigits value="4"/>
    85                          <xs:totalDigits value="8"/>
    86                  </xs:restriction>
    87          </xs:simpleType>
    88          <xs:simpleType name="UserType">
    89                  <xs:restriction base="xs:string">
    90                          <xs:minLength value="1"/>
    91                          <xs:maxLength value="10"/>
    92                  </xs:restriction>
    93          </xs:simpleType>
    94          <xs:simpleType name="RequestorType">
    95                  <xs:restriction base="xs:string">
    96                          <xs:minLength value="0"/>
    97                          <xs:maxLength value="128"/>
    98                  </xs:restriction>
    99          </xs:simpleType>
    100          <xs:simpleType name="CostCenterType">
    101                  <xs:restriction base="xs:string">
    102                          <xs:minLength value="1"/>
    103                          <xs:maxLength value="4"/>
    104                  </xs:restriction>
    105          </xs:simpleType>
    106          <xs:simpleType name="VendorType">
    107                  <xs:restriction base="xs:string">
    108                          <xs:minLength value="0"/>
    109                          <xs:maxLength value="20"/>
    110                  </xs:restriction>
    111          </xs:simpleType>
    112          <xs:simpleType name="PurchaseOrderNumberType">
    113                  <xs:restriction base="xs:integer"/>
    114          </xs:simpleType>
    115          <xs:simpleType name="SpecialInstructionsType">
    116                  <xs:restriction base="xs:string">
    117                          <xs:minLength value="0"/>
    118                          <xs:maxLength value="2048"/>
    119                  </xs:restriction>
    120          </xs:simpleType>
    121          <xs:simpleType name="NameType">
    122                  <xs:restriction base="xs:string">
    123                          <xs:minLength value="1"/>
    124                          <xs:maxLength value="20"/>
    125                  </xs:restriction>
    126          </xs:simpleType>
    127          <xs:simpleType name="AddressType">
    128                  <xs:restriction base="xs:string">
    129                          <xs:minLength value="1"/>
    130                          <xs:maxLength value="256"/>
    131                  </xs:restriction>
    132          </xs:simpleType>
    133          <xs:simpleType name="TelephoneType">
    134                  <xs:restriction base="xs:string">
    135                          <xs:minLength value="1"/>
    136                          <xs:maxLength value="24"/>
    137                  </xs:restriction>
    138          </xs:simpleType>
    139          <xs:simpleType name="DateType">
    140                  <xs:restriction base="xs:date"/>
    141          </xs:simpleType>
    142          <xs:simpleType name="CommentsType">
    143                  <xs:restriction base="xs:string">
    144                          <xs:minLength value="1"/>
    145                          <xs:maxLength value="2048"/>
    146                  </xs:restriction>
    147          </xs:simpleType>
    148          <xs:simpleType name="DescriptionType">
    149                  <xs:restriction base="xs:string">
    150                          <xs:minLength value="1"/>
    151                          <xs:maxLength value="256"/>
    152                  </xs:restriction>
    153          </xs:simpleType>
    154  </xs:schema>
    155  ');
    156  begin
    157    if (dbms_xdb.existsResource(:schemaPath)) then
    158      dbms_xdb.deleteResource(:schemaPath);
    159    end if;
    160    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    161  end;
    162  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      :schemaURL,
      5      xdbURIType(:schemaPath).getClob(),
      6      TRUE,TRUE,FALSE,FALSE
      7    );
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> create or replace view PURCHASEORDER_XML
      2  of xmltype
      3  xmlSCHEMA "http://xfiles:8080/home/SCOTT/poSource/xsd/purchaseOrder.xsd" Element "PurchaseOrder"
      4  with object id
      5  (
      6    substr(extractValue(object_value,'/PurchaseOrder/Reference'),1,32)
      7  )
      8  as
      9    select xmlElement
    10           (
    11             "PurchaseOrder",
    12             xmlAttributes
    13             (
    14               'http://xfiles:8080/home/SCOTT/poSource/xsd/purchaseOrder.xsd' as "xsi:noNamespaceSchemaLocation",
    15               'http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi"
    16             ),
    17             xmlElement("Reference",p.REFERENCE),
    18             xmlElement
    19             (
    20               "Actions",
    21               ( select xmlAgg
    22                        (
    23                          xmlElement
    24                          (
    25                            "Action",
    26                            xmlElement("User",ACTIONEDBY),
    27                            case
    28                              when DATEACTIONED is not null
    29                              then xmlElement("Date",DATEACTIONED)
    30                            end
    31                          )
    32                        )
    33                   from PURCHASEORDER_ACTION a
    34                  where a.REFERENCE = p.REFERENCE
    35               )
    36             ),
    37             xmlElement
    38             (
    39               "Reject",
    40                  xmlForest
    41                  (
    42                    REJECTEDBY as "User",
    43                 DATEREJECTED as "Date",
    44                    COMMENTS as "Comments"
    45                  )
    46             ),
    47             xmlElement("Requestor",REQUESTER),
    48             xmlElement("User",USERID),
    49             xmlElement("CostCenter",COSTCENTER),
    50             xmlElement
    51             (
    52               "ShippingInstructions",
    53               xmlElement("name",SHIPTONAME),
    54               xmlElement("address",ADDRESS),
    55               xmlElement("telephone",PHONE)
    56             ),
    57             xmlElement("SpecialInstructions",SPECIALINSTRUCTIONS),
    58             xmlElement
    59             (
    60               "LineItems",
    61               ( select xmlAgg
    62                        (
    63                          xmlElement
    64                          (
    65                            "LineItem",
    66                            xmlAttributes(LINENO as "ItemNumber"),
    67                            xmlElement("Description",DESCRIPTION),
    68                            xmlElement
    69                            (
    70                              "Part",
    71                              xmlAttributes
    72                              (
    73                                UPC       as "Id",
    74                                QUANTITY  as "Quantity",
    75                                UNITPRICE as "UnitPrice"
    76                              )
    77                            )
    78                          )
    79                        )
    80                    from PURCHASEORDER_LINEITEM l
    81                   where l.REFERENCE = p.REFERENCE
    82               )
    83             )
    84           )
    85      from PURCHASEORDER_TABLE p, PURCHASEORDER_REJECTION r, PURCHASEORDER_SHIPPING s
    86     where r.REFERENCE = p.REFERENCE
    87       and s.REFERENCE = p.REFERENCE
    88  /
    View created.
    SQL> set long 10000 pages 0 lines 140
    SQL> --
    SQL> select x.object_value.extract('/*')
      2    from PURCHASEORDER_XML x
      3  /
    <PurchaseOrder xsi:noNamespaceSchemaLocation="http://xfiles:8080/home/SCOTT/poSource/xsd/purchaseOrder.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <Reference>SMCCAIN-20030109123335470PDT</Reference>
      <Actions>
        <Action>
          <User>SVOLLMAN</User>
        </Action>
      </Actions>
      <Reject/>
      <Requestor>Samuel B. McCain</Requestor>
      <User>SMCCAIN</User>
      <CostCenter>A10</CostCenter>
      <ShippingInstructions>
        <name>Samuel B. McCain</name>
        <address>800 Bridge Parkway,Redwood Shores,CA,94065,USA</address>
        <telephone>650 506 7800</telephone>
      </ShippingInstructions>
      <SpecialInstructions>Courier</SpecialInstructions>
      <LineItems>
        <LineItem ItemNumber="1">
          <Description>Life of Brian - Monty Python&apos;s</Description>
          <Part Id="715515010320" Quantity="2" UnitPrice="39.95"/>
        </LineItem>
        <LineItem ItemNumber="2">
          <Description>The Night Porter</Description>
          <Part Id="37429145227" Quantity="2" UnitPrice="29.95"/>
        </LineItem>
        <LineItem ItemNumber="3">
          <Description>Oliver Twist</Description>
          <Part Id="37429128121" Quantity="1" UnitPrice="39.95"/>
        </LineItem>
        <LineItem ItemNumber="4">
          <Description>Notorious</Description>
          <Part Id="715515012720" Quantity="4" UnitPrice="39.95"/>
        </LineItem>
        <LineItem ItemNumber="5">
          <Description>In the Mood for Love</Description>
          <Part Id="715515012928" Quantity="3" UnitPrice="39.95"/>
        </LineItem>
        <LineItem ItemNumber="6">
          <Description>Alphaville</Description>
          <Part Id="37429130926" Quantity="2" UnitPrice="29.95"/>
        </LineItem>
        <LineItem ItemNumber="7">
          <Description>General Idi Amin Dada</Description>
          <Part Id="37429166529" Quantity="4" UnitPrice="29.95"/>
        </LineItem>
        <LineItem ItemNumber="8">
          <Description>In the Mood for Love</Description>
          <Part Id="715515012928" Quantity="3" UnitPrice="39.95"/>
        </LineItem>
        <LineItem ItemNumber="9">
          <Description>Flesh for Frankenstein</Description>
          <Part Id="715515009423" Quantity="3" UnitPrice="39.95"/>
        </LineItem>
        <LineItem ItemNumber="10">
          <Description>The Killer</Description>
          <Part Id="715515008976" Quantity="1" UnitPrice="39.95"/>
        </LineItem>
        <LineItem ItemNumber="11">
          <Description>Ballad of a Soldier</Description>
          <Part Id="37429167922" Quantity="2" UnitPrice="29.95"/>
        </LineItem>
        <LineItem ItemNumber="12">
          <Description>Ordet</Description>
          <Part Id="37429158623" Quantity="2" UnitPrice="0"/>
        </LineItem>
      </LineItems>
    </PurchaseOrder>
    SQL> begin
      2    for x in (select object_value from PURCHASEORDER_XML) loop
      3      x.object_value.schemaValidate();
      4    end loop;
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL>

Maybe you are looking for