Trouble including registered XML Schema in generated XML

Hello,
I'm new to XMLDB, and find myself wanting to build an XML document that conforms
to a paricular XML schema. I'm looking for help in "passing" the shema into the
xml query, and for advice (i may not be going about things in the best way possible).
my data comes from three different sources: deliveries, origin of deliveries (warehouse),
and a user-defined parameter (number of vehicles). I am putting the xml data together via union statements.
this is slightly undesireable due to the limitations on union (no xmltypes, no clobs)
and the size limitation of the varchar datatype. If there is a better way of structuring
the end XML document (all three sources, one output record) then please advise me.
I am having issues "passing" the registered XML schema to the SYS_XMLGEN function,
so if you see where I've made a mistake, please point it out.
Last thing, Oracle version: 9.2.0.4.0 (aka 9iR2)
--Register a new XML schema
--Since this is a GLOBAL schema, register it as privileged user (SYS).
DECLARE
       vrp varchar2(10000) :=
'<xs:schema targetNamespace="http://example.com/vrp.xsd"
    xmlns:vrp="http://example.com/vrp.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified">
    <xs:complexType name="VehicleRoute">
        <xs:sequence>
            <xs:element name="Stops" type="vrp:Stops" minOccurs="1" maxOccurs="1" />
            <xs:element name="Vehicles" type="xs:string" minOccurs="1" maxOccurs="1" />
            <xs:element name="Warehouse" type="vrp:Warehouse" minOccurs="1" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Stops">
        <xs:sequence>
            <xs:element name="Stop" type="vrp:Stop" minOccurs="1" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Stop">
        <xs:sequence>
            <xs:element name="Documents" type="vrp:Documents" minOccurs="1" maxOccurs="1" />
            <xs:element name="Stop_Address" type="xs:string" minOccurs="1" maxOccurs="1" />
            <xs:element name="Stop_Minutes" type="xs:double" minOccurs="1" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Documents">
        <xs:sequence>
            <xs:element name="Document" type="xs:string" minOccurs="1" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Warehouse">
        <xs:sequence>
            <xs:element name="Warehouse_Address" type="xs:string" minOccurs="1" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="Vehicle_Route" type="vrp:VehicleRoute" />
</xs:schema>';  
begin
  --"CUSTOM" is the name of my database user - the SCHEMA in which this development should occur.
     dbms_xmlschema.registerschema('http://example.com/vrp.xsd', vrp, false, false, false, false, false, 'CUSTOM');
END;Here is the XML schema (as viewed by the 'CUSTOM' user):
<xs:schema targetNamespace="http://example.com/vrp.xsd" xmlns:vrp="http://example.com/vrp.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:oraxdb="http://xmlns.oracle.com/xdb" oraxdb:flags="17" oraxdb:schemaURL="http://example.com/vrp.xsd" oraxdb:schemaOwner="CUSTOM" oraxdb:numProps="10">
  <xs:complexType name="VehicleRoute" oraxdb:SQLType="CLOB">
    <xs:sequence>
      <xs:element name="Stops" type="vrp:Stops" minOccurs="1" maxOccurs="1" oraxdb:propNumber="2225" oraxdb:global="false" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false"/>
      <xs:element name="Vehicles" type="xs:string" minOccurs="1" maxOccurs="1" oraxdb:propNumber="2226" oraxdb:global="false" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
      <xs:element name="Warehouse" type="vrp:Warehouse" minOccurs="1" maxOccurs="1" oraxdb:propNumber="2227" oraxdb:global="false" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Stops" oraxdb:SQLType="CLOB">
    <xs:sequence>
      <xs:element name="Stop" type="vrp:Stop" minOccurs="1" maxOccurs="unbounded" oraxdb:propNumber="2228" oraxdb:global="false" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Stop" oraxdb:SQLType="CLOB">
    <xs:sequence>
      <xs:element name="Documents" type="vrp:Documents" minOccurs="1" maxOccurs="1" oraxdb:propNumber="2229" oraxdb:global="false" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false"/>
      <xs:element name="Stop_Address" type="xs:string" minOccurs="1" maxOccurs="1" oraxdb:propNumber="2230" oraxdb:global="false" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
      <xs:element name="Stop_Minutes" type="xs:double" minOccurs="1" maxOccurs="1" oraxdb:propNumber="2231" oraxdb:global="false" oraxdb:memType="2" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Documents" oraxdb:SQLType="CLOB">
    <xs:sequence>
      <xs:element name="Document" type="xs:string" minOccurs="1" maxOccurs="unbounded" oraxdb:propNumber="2232" oraxdb:global="false" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Warehouse" oraxdb:SQLType="CLOB">
    <xs:sequence>
      <xs:element name="Warehouse_Address" type="xs:string" minOccurs="1" maxOccurs="1" oraxdb:propNumber="2233" oraxdb:global="false" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="Vehicle_Route" type="vrp:VehicleRoute" oraxdb:propNumber="2224" oraxdb:global="true" oraxdb:SQLType="CLOB" oraxdb:SQLName="Vehicle_Route" oraxdb:memType="258"/>
</xs:schema>Here is sample data for reproducing what I'm seeing:
--Create the "document" table
create table vrp_document
(document_num varchar2(10),
document_minutes number(10),
document_address varchar2(30));
--Sample "document" data
insert into vrp_document (document_num, document_minutes, document_address)
values ('TEST1', 30, '1234 ELM ST');
insert into vrp_document (document_num, document_minutes, document_address)
values ('TEST2', 20, '1234 ELM ST');
insert into vrp_document (document_num, document_minutes, document_address)
values ('TEST3', 40, '1234 MAPLE ST');
insert into vrp_document (document_num, document_minutes, document_address)
values ('TEST3', 15, '1234 YEW ST');
--Create the "warehouse" table
create table vrp_warehouse
(warehouse_id varchar2(3),
warehouse_address varchar2(30));
--Sample "warehouse" data
insert into vrp_warehouse (warehouse_id, warehouse_address)
values ('100', '900 MY OWN WAY');Query to produce XML
Please note, I realize that for the data provided, the aggregations (and sub queries)
are a little over the top. They are however necessary for my actual data set.
SELECT SYS_XMLGEN(xmlagg(XMLTYPE(xmlroute)),  xmlformat.createFormat('Vehicle_Route')).getStringVal() Delivery_XML_Data
FROM (SELECT XMLELEMENT("Stops",
          XMLAGG(XMLELEMENT("Stop",    
          XMLCONCAT(
            XMLELEMENT("Documents",
                xmlagg(xmlelement("Document", t.document))),
              xmlforest(t.document_address "Stop_Address",  
             SUM(t.document_minutes) "Stop_Minutes"))))).getStringVal() AS xmlroute
from     (select   s.document_num document, 
                   s.document_address,
                   sum(s.document_minutes) document_minutes
          from     vrp_document s       
          group by s.document_num, s.document_address) t
GROUP BY t.document_address
UNION
SELECT   XMLELEMENT("Warehouse",
         xmlforest(
          w.warehouse_address "Warehouse_Address")).getstringval()
from     vrp_warehouse w
WHERE    w.warehouse_id = '100'
union
select   xmlelement("Vehicles", '&Number_Of_Vehicles').getstringval()
FROM     dual) g;This query produces the following (Note. Answer "1" or any other integer for &Number_Of_Vehicles):
The only other thing I want is to mention the above schema (that is, xmlns:http://example.com/vrp) or however that goes.
I realize I can "fudge" this by assigning the attribute for various elements, but I think the "right" way would be to modify that call to createFormat().
<?xml version="1.0"?>
<Vehicle_Route>
<Stops>
  <Stop>
    <Documents>
      <Document>TEST1</Document>
      <Document>TEST2</Document>
    </Documents>
    <Stop_Address>1234 ELM ST</Stop_Address>
    <Stop_Minutes>50</Stop_Minutes>
  </Stop>
  <Stop>
    <Documents>
      <Document>TEST3</Document>
    </Documents>
    <Stop_Address>1234 MAPLE ST</Stop_Address>
    <Stop_Minutes>40</Stop_Minutes>
  </Stop>
  <Stop>
    <Documents>
      <Document>TEST3</Document>
    </Documents>
    <Stop_Address>1234 YEW ST</Stop_Address>
    <Stop_Minutes>15</Stop_Minutes>
  </Stop>
</Stops>
<Vehicles>1</Vehicles>
<Warehouse>
  <Warehouse_Address>900 MY OWN WAY</Warehouse_Address>
</Warehouse>
</Vehicle_Route>I have tried various permutation of the following with no success:
Currently, the error is something serious:
ORA-00600: internal error code, arguments: [kkdotat1], [], [], [], [], [], [], []
00600. 00000 - "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"
*Cause:    This is the generic internal error number for Oracle program
exceptions.     This indicates that a process has encountered an
exceptional condition.
*Action:   Report as a bug - the first argument is the internal error number
SELECT SYS_XMLGEN(xmlagg(XMLTYPE(xmlroute)),  xmlformat.createFormat('Vehicle_Route', 'USE_GIVEN_SCHEMA', 'http://example.com/vrp.xsd', 'http://example.com/vrp.xsd')).getStringVal() Delivery_XML_Data
. . .Edited by: user2316919 on Jan 21, 2010 3:46 PM

Cannot find a cleanest solution:
SQL>  select xmltype('<?xml version="1.0"?>'||
  2                  xmlelement("Vehicle_Route",
  3                     xmlattributes('http://www.w3.org/2001/XMLSchema-instance' AS "xmlns:xsi",
  4                                   'http://example.com/vrp.xsd' AS "xsi:schemaLocation"
  5                                   ),
  6                     xmlagg(xmltype(xmlroute))
  7                     ).extract('/*')
  8                  ) Delivery_XML_Data
  9   FROM (SELECT XMLELEMENT("Stops",
10             XMLAGG(XMLELEMENT("Stop",    
11             XMLCONCAT(
12               XMLELEMENT("Documents",
13                   xmlagg(xmlelement("Document", t.document))),
14             xmlforest(t.document_address "Stop_Address",  
15                SUM(t.document_minutes) "Stop_Minutes"))))).getStringVal() AS xmlroute
16   from     (select   s.document_num document, 
17                      s.document_address,
18                      sum(s.document_minutes) document_minutes
19             from     vrp_document s       
20             group by s.document_num, s.document_address) t
21   GROUP BY t.document_address
22   UNION
23   SELECT   XMLELEMENT("Warehouse",
24             xmlforest(
25              w.warehouse_address "Warehouse_Address")).getstringval()
26    from     vrp_warehouse w
27    WHERE    w.warehouse_id = '100'
28    union
29    select   xmlelement("Vehicles", '&Number_Of_Vehicles').getstringval()
30    FROM     dual) g;
Immettere un valore per number_of_vehicles: 1
vecchio  29:   select   xmlelement("Vehicles", '&Number_Of_Vehicles').getstringval()
nuovo  29:   select   xmlelement("Vehicles", '1').getstringval()
DELIVERY_XML_DATA
<?xml version="1.0"?><Vehicle_Route xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schema
http://example.com/vrp.xsd">
  <Stops>
    <Stop>
      <Documents>
        <Document>TEST1</Document>
        <Document>TEST2</Document>
      </Documents>
      <Stop_Address>1234 ELM ST</Stop_Address>
      <Stop_Minutes>50</Stop_Minutes>
    </Stop>
    <Stop>
      <Documents>
        <Document>TEST3</Document>
      </Documents>
      <Stop_Address>1234 MAPLE ST</Stop_Address>
      <Stop_Minutes>40</Stop_Minutes>
    </Stop>
    <Stop>
      <Documents>
        <Document>TEST3</Document>
      </Documents>
      <Stop_Address>1234 YEW ST</Stop_Address>
      <Stop_Minutes>15</Stop_Minutes>
    </Stop>
  </Stops>
  <Vehicles>1</Vehicles>
  <Warehouse>
    <Warehouse_Address>900 MY OWN WAY</Warehouse_Address>
  </Warehouse>
</Vehicle_Route>
{code}
Max
[My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/17/supporto-di-xml-schema-in-oracle-xmldb/]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to Generate and Register XML Schema

    Does any one know how to gererate Oracle type XML schema provided XML file and register to XMLType field?
    Thanks for any expert suggestion...

    The SQL statement below shows how one can register XML schema to an XMLType column:
    create table po_tab(
    id number,
    po sys.XMLType
    xmltype column po
    XMLSCHEMA "http://www.oracle.com/PO.xsd"
    element "PurchaseOrder";
    Similarly you can register XML schema to the INVDOC field in the your INVOICE table.
    Hope it helps
    Shefali
    (OTN team)

  • Genearte XML based on registered  XML schema

    Hi all!!
    How would I generate an XML document from XML-DB which conform to a registered
    Schema? My tables and xsd are as follows:
    Customer table
    ==============
    create table cust
    ( id number primary key,
    last_name varchar2(50),
    first_name varchar2(50),
    fullname varchar2(50),
    dob date
    Cust_address table
    ==================
    create table cust_address
    (addr_id number primary key,
    address_1 varchar2(100),
    address_2 varchar2(100),
    county varchar2(4),
    home_ph varchar2(20),
    office_ph varchar2(20),
    cust_id number references cust(id) );
    Some data
    SQL> insert into cust
    2 values( 1, 'Harvey','John','Jeff M Harvey','18-jun-80');
    1 row created.
    insert into cust_address
    values ( 1,' 21 West Trophy Road','Memphis,
    TN','0009','901-6782345','901-768234',1);
    My XMLSchema is as follows:
    ===========================
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema
    xmlns="
    http://www.oaws.org/CAR"
    xmlns:xs="
    http://www.w3.org/2001/XMLSchema"
    targetNamespace="
    http://www.oaws.org/CAR"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified">
    <xs:element name="CARData">
    <xs:annotation>
    <xs:documentation>Customer Contact information etc
    </xs:documentation>
    </xs:annotation>
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Name" type="NameType"/>
    <xs:element name="Address" type="AddressType"/>
    <xs:element name="PlayerContact">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Name" type="NameType"/>
    <xs:element name="Address" type="AddressType"/>
    <xs:element name="PlayCntySher" type="xs:string"/>
    <xs:element name="PlayCntyClk" type="xs:string"/>
    <xs:element name="PlayAlsTyp" type="xs:string"/>
    <xs:element name="Play" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="BankContact">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="BKName" type="xs:string"/>
    <xs:element name="BKAddr1" type="xs:string"/>
    <xs:element name="BKAddr2" type="xs:string"/>
    <xs:element name="BKAddrfnl" type="xs:string"/>
    <xs:element name="BKCNTY" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    <xs:attribute name="LTRDT" type="xs:date"/>
    </xs:complexType>
    </xs:element>
    <xs:complexType name="AddressType">
    <xs:sequence>
    <xs:element name="playaddr1">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="playaddr2">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="playaddrfnl" type="xs:string"/>
    <xs:element name="playhomecomm">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="playwrkcomm">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="playcnty">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="25"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="NameType">
    <xs:sequence>
    <xs:element name="PlayFullName" type="xs:string"/>
    <xs:element name="PlayFName" type="xs:string"/>
    <xs:element name="PlayLName" type="xs:string"/>
    <xs:element name="PlayDefName" type="xs:string"/>
    <xs:element name="PlayIDNum">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="12"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="PlayDob" type="xs:date"/>
    </xs:sequence>
    </xs:complexType>
    <xs:simpleType name="money">
    <xs:restriction base="xs:decimal">
    <xs:totalDigits value="14"/>
    <xs:fractionDigits value="2"/>
    </xs:restriction>
    </xs:simpleType>
    <xs:complexType name="CollectorType">
    <xs:sequence>
    <xs:element name="CollectorNumber" type="xs:integer"/>
    <xs:element name="CarFullName" type="xs:string"/>
    <xs:element name="CollectorPhone" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    I have registered this schema in to my database schema
    SQL> begin
    2 dbms_xmlschema.registerSchema
    3 (
    4 '
    http://tien.oaws.silver:8080/home/CAR/xsd/',
    5 xdbURIType('/home/CAR/xsd/CARSchema.xsd').getClob(),
    6 True,True,False,True
    7 );
    8 End;
    9 /
    PL/SQL procedure successfully completed.
    Now I need to generate an XML which include all elements from CUST and
    CUST_ADDRESS table and must conform to the XML Schema, need your help.
    Thank you.

    Does the following help at all..
    SQL> call dbms_xmlschema.deleteSchema('http://tien.oaws.silver:8080/home/CAR/xsd/CARData.xsd',4)
      2  /
    Call completed.
    SQL> drop table cust_address
      2  /
    Table dropped.
    SQL> drop table cust
      2  /
    Table dropped.
    SQL> create table cust
      2  (
      3    id number primary key,
      4    last_name varchar2(50),
      5    first_name varchar2(50),
      6    fullname varchar2(50),
      7    dob date
      8  )
      9  /
    Table created.
    SQL> create table cust_address
      2  (
      3    addr_id number primary key,
      4    address_1 varchar2(100),
      5    address_2 varchar2(100),
      6    county varchar2(4),
      7    home_ph varchar2(20),
      8    office_ph varchar2(20),
      9    cust_id number references cust(id)
    10  )
    11  /
    Table created.
    SQL> insert into cust
      2  values( 1, 'Harvey','John','Jeff M Harvey','18-jun-80')
      3  /
    1 row created.
    SQL> insert into cust_address
      2  values ( 1,' 21 West Trophy Road','Memphis, TN','0009','901-6782345','901-768234',1)
      3  /
    1 row created.
    SQL> commit
      2  /
    Commit complete.
    SQL> declare
      2    xmlSchema xmltype := xmltype(
      3  '<xs:schema xmlns="http://www.oaws.org/CAR" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.oaws.org/C
    ntFormDefault="qualified" attributeFormDefault="unqualified">
      4     <xs:element name="CARData">
      5             <xs:annotation>
      6                     <xs:documentation>Customer Contact information etc </xs:documentation>
      7             </xs:annotation>
      8             <xs:complexType>
      9                     <xs:sequence>
    10                             <xs:element name="Name" type="NameType"/>
    11                             <xs:element name="Address" type="AddressType"/>
    12                             <xs:element name="PlayerContact">
    13                                     <xs:complexType>
    14                                             <xs:sequence>
    15                                                     <xs:element name="Name" type="NameType"/>
    16                                                     <xs:element name="Address" type="AddressType"/>
    17                                                     <xs:element name="PlayCntySher" type="xs:string"/>
    18                                                     <xs:element name="PlayCntyClk" type="xs:string"/>
    19                                                     <xs:element name="PlayAlsTyp" type="xs:string"/>
    20                                                     <xs:element name="Play" type="xs:string"/>
    21                                             </xs:sequence>
    22                                     </xs:complexType>
    23                             </xs:element>
    24                             <xs:element name="BankContact">
    25                                     <xs:complexType>
    26                                             <xs:sequence>
    27                                                     <xs:element name="BKName" type="xs:string"/>
    28                                                     <xs:element name="BKAddr1" type="xs:string"/>
    29                                                     <xs:element name="BKAddr2" type="xs:string"/>
    30                                                     <xs:element name="BKAddrfnl" type="xs:string"/>
    31                                                     <xs:element name="BKCNTY" type="xs:string"/>
    32                                             </xs:sequence>
    33                                     </xs:complexType>
    34                             </xs:element>
    35                     </xs:sequence>
    36                     <xs:attribute name="LTRDT" type="xs:date"/>
    37             </xs:complexType>
    38     </xs:element>
    39     <xs:complexType name="AddressType">
    40             <xs:sequence>
    41                     <xs:element name="playaddr1">
    42                             <xs:simpleType>
    43                                     <xs:restriction base="xs:string">
    44                                             <xs:length value="100"/>
    45                                     </xs:restriction>
    46                             </xs:simpleType>
    47                     </xs:element>
    48                     <xs:element name="playaddr2">
    49                             <xs:simpleType>
    50                                     <xs:restriction base="xs:string">
    51                                             <xs:length value="100"/>
    52                                     </xs:restriction>
    53                             </xs:simpleType>
    54                     </xs:element>
    55                     <xs:element name="playaddrfnl" type="xs:string"/>
    56                     <xs:element name="playhomecomm">
    57                             <xs:simpleType>
    58                                     <xs:restriction base="xs:string">
    59                                             <xs:length value="100"/>
    60                                     </xs:restriction>
    61                             </xs:simpleType>
    62                     </xs:element>
    63                     <xs:element name="playwrkcomm">
    64                             <xs:simpleType>
    65                                     <xs:restriction base="xs:string">
    66                                             <xs:length value="100"/>
    67                                     </xs:restriction>
    68                             </xs:simpleType>
    69                     </xs:element>
    70                     <xs:element name="playcnty">
    71                             <xs:simpleType>
    72                                     <xs:restriction base="xs:string">
    73                                             <xs:length value="25"/>
    74                                     </xs:restriction>
    75                             </xs:simpleType>
    76                     </xs:element>
    77             </xs:sequence>
    78     </xs:complexType>
    79     <xs:complexType name="NameType">
    80             <xs:sequence>
    81                     <xs:element name="PlayFullName" type="xs:string"/>
    82                     <xs:element name="PlayFName" type="xs:string"/>
    83                     <xs:element name="PlayLName" type="xs:string"/>
    84                     <xs:element name="PlayDefName" type="xs:string"/>
    85                     <xs:element name="PlayIDNum">
    86                             <xs:simpleType>
    87                                     <xs:restriction base="xs:string">
    88                                             <xs:length value="12"/>
    89                                     </xs:restriction>
    90                             </xs:simpleType>
    91                     </xs:element>
    92                     <xs:element name="PlayDob" type="xs:date"/>
    93             </xs:sequence>
    94     </xs:complexType>
    95     <xs:simpleType name="money">
    96             <xs:restriction base="xs:decimal">
    97                     <xs:totalDigits value="14"/>
    98                     <xs:fractionDigits value="2"/>
    99             </xs:restriction>
    100     </xs:simpleType>
    101     <xs:complexType name="CollectorType">
    102             <xs:sequence>
    103                     <xs:element name="CollectorNumber" type="xs:integer"/>
    104                     <xs:element name="CarFullName" type="xs:string"/>
    105                     <xs:element name="CollectorPhone" type="xs:string"/>
    106             </xs:sequence>
    107     </xs:complexType>
    108  </xs:schema>');
    109  begin
    110    dbms_xmlschema.registerSchema
    111    (
    112      'http://tien.oaws.silver:8080/home/CAR/xsd/CARData.xsd',
    113      xmlSchema,
    114      True,True,False,True
    115    );
    116  end;
    117  /
    PL/SQL procedure successfully completed.
    SQL> set long 100000 pages 0
    SQL> --
    SQL> select xmlelement
      2         (
      3           "CARData",
      4           xmlAttributes
      5           (
      6              'http://www.oaws.org/CAR' as "xmlns",
      7              'http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi",
      8              'http://www.oaws.org/CAR http://tien.oaws.silver:8080/home/CAR/xsd/CARData.xsd' as "xsi:schemaLocation",
      9              '' as "LTRDT"
    10           ),
    11           xmlElement
    12           (
    13             "Name",
    14             xmlElement("PlayFullName",fullname ),
    15        xmlElement("PlayFName",first_name),
    16             xmlElement("PlayLName",last_name),
    17        xmlElement("PlayDefName",null),
    18        xmlElement("PlayIDNum",id),
    19        xmlElement("PlayDob",dob)
    20      ),
    21           xmlElement
    22           (
    23             "Address",
    24             xmlElement("playaddr1",address_1 ),
    25        xmlElement("playaddr2",address_2),
    26             xmlElement("playaddrfnl",null),
    27        xmlElement("playhomecomm",home_ph),
    28        xmlElement("playwrkcomm",office_ph),
    29        xmlElement("playcnty",county)
    30      )
    31         ).extract('/*')
    32    from cust, cust_address
    33   where id = cust_id
    34  /
    <CARData xmlns="http://www.oaws.org/CAR" xmlns:xsi="http://www.w3.org/2001/XMLSc
    hema-instance" xsi:schemaLocation="http://www.oaws.org/CAR http://tien.oaws.silv
    er:8080/home/CAR/xsd/CARData.xsd">
      <Name>
        <PlayFullName>Jeff M Harvey</PlayFullName>
        <PlayFName>John</PlayFName>
        <PlayLName>Harvey</PlayLName>
        <PlayDefName/>
        <PlayIDNum>1</PlayIDNum>
        <PlayDob>1980-06-18</PlayDob>
      </Name>
      <Address>
        <playaddr1> 21 West Trophy Road</playaddr1>
        <playaddr2>Memphis, TN</playaddr2>
        <playaddrfnl/>
        <playhomecomm>901-6782345</playhomecomm>
        <playwrkcomm>901-768234</playwrkcomm>
        <playcnty>0009</playcnty>
      </Address>
    </CARData>
    SQL>

  • Register xml schema and store data

    hi
    i registered a schema in my DB and want to store data related to that scema.
    is there any function which will allow me to create a relational table table from the XML document or we need to extract each and every value from the nodes using funcions like xmlsequence,extract,.....
    i read somewhere that we can do this using structured storage of xml using xml db
    but not sure if there is any function or just extracting the each value and storing ina apre created table...
    can someone help??
    Thank You

    Just curious but any reason you did not post the URLs for the two schemas since they are publicly available via the URL contained within each one? You could have posted those URLs and then dropped in a snippet of the XML in the forum instead of hosting on an external site.
    To post for everyone's knowledge, ifc2x3.xsd imports ex.xsd which contains common definitions for structures used in ifc2x3.xsd. The root node of the XML file is in ex.xsd; however; the schema defined in ex.xsd (which does not import/include ifc2x3.xsd) allows for the structures defined in ifc2x3.xsd to be used. Hence a stripped version of the XML file is
    <ex:iso_10303_28 xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ex="<removed URN>" xsi:schemaLocation="<removed URN>ex.xsd">
         <ex:iso_10303_28_header/>
         <uos id="uos_1" xmlns="<removed location>" xsi:schemaLocation="<removed location> IFC2X3.xsd">
              <IfcCartesianPoint id="ID1"/>
         </uos>
    </ex:iso_10303_28>The following is based off what I've read in this forum over time.
    Given your root node is defined in ex.xsd, this is what you should reference when creating your column in the table. I believe that since you have both schemas registered, Oracle should be able to find the ifc2x3.xsd when validating the XML.
    I've never seen this schema setup before but maybe if you review some of the posts by Marco Gralike or mdrake where they RegisterSchema you may come across a similar example.
    Sorry for not being more help but maybe someone else can build upon what I started.

  • Problem using XMLNode class with schema registered XML

    Hello,
    I'm working on an XML document management system that currently uses CLOB storage of XML data. I'm trying to switch over to a schema registered/object-relational approach to increase performance.
    However, the code (which I didn't write) uses the XMLNode class and its methods such as selectSingleNode which work when used against unregisterd xml, but breaks when used against registered xml. I don't know if this is a namespace issue or what.
    Here's a sample.
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setNamespaceAware(true); // don't know if this is neccessary
    newICD = (XMLDocument) dbf.newDocumentBuilder().parse(icdFile);
    docNode = (XMLNode) newICD.getDocumentElement();
    //this works with CLOB storage, but returns null with registered schema/O-R storage
    tempNode = docNode.selectSingleNode("/sw_icd/TITLEPAGE/DocNum");
    Any ideas would be greatly appreciated.
    Thanks

    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <!--W3C Schema generated by XMLSpy v2006 sp2 U (http://www.altova.com)-->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
         <xs:element name="AffectedComponents">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="COMPONENT" maxOccurs="unbounded" />
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="CHANGE" type="xs:string" />
         <xs:element name="COMPONENT">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="SectionString" />
                        <xs:element ref="RevisionType" />
                        <xs:element ref="SectionType" />
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Change">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="CHANGE" />
                        <xs:element ref="SSCN" />
                        <xs:element ref="PIRNS" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="DESCRIPTION" type="xs:string" />
         <xs:element name="PIRN">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="PIRN_NUMBER" />
                        <xs:element ref="AffectedComponents" />
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="PIRNS">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="PIRN" maxOccurs="unbounded" />
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="PIRN_NUMBER" type="xs:string" />
         <xs:element name="PUBDATE" type="xs:string" />
         <xs:element name="REV" type="xs:string" />
         <xs:element name="RevItem">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="REV" />
                        <xs:element ref="DESCRIPTION" />
                        <xs:element ref="PUBDATE" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="RevisionType" type="xs:string" />
         <xs:element name="SSCN" type="xs:string" />
         <xs:element name="SectNum">
              <xs:complexType>
                   <xs:choice maxOccurs="unbounded">
                        <xs:element ref="SectNumTitle" />
                        <xs:element ref="t" />
                        <xs:element ref="list" />
                        <xs:element ref="figure" />
                        <xs:element ref="tbl" />
                   </xs:choice>
                   <xs:attribute name="id" type="xs:string" use="required" />
                   <xs:attribute name="val" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="SectNumTitle" type="xs:string" />
         <xs:element name="SectionString" type="xs:string" />
         <xs:element name="SectionType" type="xs:string" />
         <xs:element name="SigDate" type="xs:string" />
         <xs:element name="SigElectronic" type="xs:string" />
         <xs:element name="SigName" type="xs:string" />
         <xs:element name="SigOrganization" type="xs:string" />
         <xs:element name="SigType" type="xs:string" />
         <xs:element name="Signature">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="SigType" />
                        <xs:element ref="SigName" />
                        <xs:element ref="SigElectronic" minOccurs="0" />
                        <xs:element ref="SigOrganization" />
                        <xs:element ref="SigDate" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" />
              </xs:complexType>
         </xs:element>
         <xs:element name="Signatures">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="colspec" maxOccurs="unbounded" />
                        <xs:element ref="Signature" maxOccurs="unbounded" />
                   </xs:sequence>
                   <xs:attribute name="type" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="TblHdg">
              <xs:complexType mixed="true">
                   <xs:attribute name="num" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="bindata">
              <xs:complexType>
                   <xs:attribute name="src" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="caption" type="xs:string" />
         <xs:element name="cell">
              <xs:complexType mixed="true">
                   <xs:attribute name="name" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="colspec">
              <xs:complexType>
                   <xs:attribute name="id" type="xs:string" use="required" />
                   <xs:attribute name="name" type="xs:string" use="required" />
                   <xs:attribute name="width" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="figure">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="width" />
                        <xs:element ref="height" />
                        <xs:element ref="caption" />
                        <xs:element ref="bindata" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
                   <xs:attribute name="val" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="height" type="xs:string" />
         <xs:element name="list">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="list1" maxOccurs="unbounded" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="list1">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="t" />
                        <xs:element ref="list2" minOccurs="0" maxOccurs="unbounded" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
                   <xs:attribute name="val" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="list2">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="t" />
                        <xs:element name="list3" minOccurs="0">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element ref="t" />
                                  </xs:sequence>
                                  <xs:attribute name="id" type="xs:string" use="required" />
                                  <xs:attribute name="val" type="xs:string" use="required" />
                             </xs:complexType>
                        </xs:element>
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
                   <xs:attribute name="val" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="pui" type="xs:string" />
         <xs:element name="sect">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="SectNum" maxOccurs="unbounded" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="sw_icd">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="TITLEPAGE">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="Title1" type="xs:string" />
                                       <xs:element name="Title2" type="xs:string" />
                                       <xs:element name="Group" type="xs:string" />
                                       <xs:element name="Rev" type="xs:string" />
                                       <xs:element name="DrafDate" type="xs:string" />
                                       <xs:element name="DocumentType" type="xs:string" />
                                       <xs:element name="Org1" type="xs:string" />
                                       <xs:element name="Org2" type="xs:string" />
                                       <xs:element name="Org3" type="xs:string" />
                                       <xs:element name="Location" type="xs:string" />
                                       <xs:element name="ContractNo" type="xs:string" />
                                       <xs:element name="DocNum" type="xs:string" />
                                  </xs:sequence>
                             </xs:complexType>
                        </xs:element>
                        <xs:element name="REVHISTPAGE">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="RevItems">
                                            <xs:complexType>
                                                 <xs:sequence>
                                                      <xs:element ref="colspec" maxOccurs="unbounded" />
                                                      <xs:element ref="RevItem" maxOccurs="unbounded" />
                                                 </xs:sequence>
                                            </xs:complexType>
                                       </xs:element>
                                       <xs:element ref="t" />
                                       <xs:element name="ERU" type="xs:string" />
                                  </xs:sequence>
                             </xs:complexType>
                        </xs:element>
                        <xs:element name="PREFACE">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element ref="t" />
                                       <xs:element ref="Signature" />
                                  </xs:sequence>
                             </xs:complexType>
                        </xs:element>
                        <xs:element name="CONCURRENCE">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element ref="Signatures" maxOccurs="unbounded" />
                                  </xs:sequence>
                             </xs:complexType>
                        </xs:element>
                        <xs:element name="CHANGES">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="ChangeItems">
                                            <xs:complexType>
                                                 <xs:sequence>
                                                      <xs:element ref="colspec" maxOccurs="unbounded" />
                                                      <xs:element ref="Change" maxOccurs="unbounded" />
                                                 </xs:sequence>
                                            </xs:complexType>
                                       </xs:element>
                                  </xs:sequence>
                                  <xs:attribute name="id" type="xs:string" use="required" />
                             </xs:complexType>
                        </xs:element>
                        <xs:element ref="sect" maxOccurs="unbounded" />
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="t">
              <xs:complexType mixed="true">
                   <xs:attribute name="id" type="xs:string" />
              </xs:complexType>
         </xs:element>
         <xs:element name="tbl">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="pui" minOccurs="0" />
                        <xs:element ref="TblHdg" maxOccurs="unbounded" />
                        <xs:element ref="colspec" maxOccurs="unbounded" />
                        <xs:element ref="tr" maxOccurs="unbounded" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
                   <xs:attribute name="val" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="tr">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="cell" maxOccurs="unbounded" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="width" type="xs:string" />
    </xs:schema>

  • ORA-00600 error when registering XML Schema

    Dear Mark!
    1. Database version: 9.2.0.3.0
    2. Operating system: Windows XP Prof
    3. XML Schema: (it's too big to be posted_
    4. Instance document: no
    5. SQL statement used to register the schema
    DBMS_XMLSCHEMA.registerSchema(schemaURL =&gt; aSchemaURL, schemaDoc =&gt; fBFile_Loc);
    6. SQL statement that exposes the problem: above
    Attempt to register XML Schema caused the following error:
    ORA-00600: internal error code, arguments: [qmtsGetAttrElemName1], [], [], [], [], [], [], []
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 131
    ORA-06512: at "DVLP.PRIME_BRIDGE", line 91
    ORA-06512: at line 6
    What does it mean?
    Thank you in advance
    Artem Rodin

    If you cannot post the schema please open a itar with oralce support so that the schema can be uploaded.

  • Error when registering XML Schema

    When I try to register a schema with XDB I keep getting an ORA-31000 error. It says that the schema it references is not a valid XDB schema, but when I try to register that one it says the first one isn't valid.

    Testing with 11g I get
    I assume you have registered 'http://www.w3.org/2005/08/addressing/ws-addr.xsd'
    SQL> set echo on
    SQL> spool testcase.log
    SQL> --
    SQL> connect sys/ as sysdba
    Enter password:
    Connected.
    SQL> set define on
    SQL> set timing on
    SQL> --
    SQL> define USERNAME = IXSEMF01
    SQL> --
    SQL> def PASSWORD = IXSEMF01
    SQL> --
    SQL> def USER_TABLESPACE = USERS
    SQL> --
    SQL> def TEMP_TABLESPACE = TEMP
    SQL> --
    SQL> drop user &USERNAME cascade
      2  /
    old   1: drop user &USERNAME cascade
    new   1: drop user IXSEMF01 cascade
    drop user IXSEMF01 cascade
    ERROR at line 1:
    ORA-01918: user 'IXSEMF01' does not exist
    Elapsed: 00:00:00.03
    SQL> grant connect, resource to &USERNAME identified by &PASSWORD
      2  /
    old   1: grant connect, resource to &USERNAME identified by &PASSWORD
    new   1: grant connect, resource to IXSEMF01 identified by IXSEMF01
    Grant succeeded.
    Elapsed: 00:00:00.01
    SQL> grant create any directory, drop any directory to &USERNAME
      2  /
    old   1: grant create any directory, drop any directory to &USERNAME
    new   1: grant create any directory, drop any directory to IXSEMF01
    Grant succeeded.
    Elapsed: 00:00:00.00
    SQL> grant alter session, create view to &USERNAME
      2  /
    old   1: grant alter session, create view to &USERNAME
    new   1: grant alter session, create view to IXSEMF01
    Grant succeeded.
    Elapsed: 00:00:00.00
    SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
      2  /
    old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
    new   1: alter user IXSEMF01 default tablespace USERS temporary tablespace TEMP
    User altered.
    Elapsed: 00:00:00.00
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> alter session set events ='19027 trace name context forever, level 0x800'
      2  /
    Session altered.
    Elapsed: 00:00:00.00
    SQL> var schemaURL  varchar2(700)
    SQL> var schemaURL1 varchar2(700)
    SQL> var schemaURL2 varchar2(700)
    SQL> var xmlschema CLOB
    SQL> --
    SQL> begin
      2    :schemaURL := 'http://www.w3.org/2005/08/addressing/ws-addr.xsd';
      3    :xmlSchema :=
      4  '<?xml version="1.0" encoding="utf-8"?>
      5  <!--
      6  <!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
      7      W3C XML Schema defined in the Web Services Addressing 1.0 specification
      8      http://www.w3.org/TR/ws-addr-core
      9
    10     Copyright c 2005 World Wide Web Consortium,
    11
    12     (Massachusetts Institute of Technology, European Research Consortium for
    13     Informatics and Mathematics, Keio University). All Rights Reserved. This
    14     work is distributed under the W3Cr Software License [1] in the hope that
    15     it will be useful, but WITHOUT ANY WARRANTY; without even the implied
    16     warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    17
    18     [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
    19
    20     $Id: ws-addr.xsd,v 1.3 2005/08/09 13:17:35 hugo Exp $
    21  -->
    22  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.w3.org/2005/08/addressing" targetNamespace="http://www.w3.
    org/2005/08/addressing" blockDefault="#all" elementFormDefault="qualified" finalDefault="" attributeFormDefault="unqualified">
    23
    24     <!-- Constructs from the WS-Addressing Core -->
    25
    26     <xs:element name="EndpointReference" type="tns:EndpointReferenceType"/>
    27     <xs:complexType name="EndpointReferenceType" mixed="false">
    28             <xs:sequence>
    29                     <xs:element name="Address" type="tns:AttributedURIType"/>
    30                     <xs:element name="ReferenceParameters" type="tns:ReferenceParametersType" minOccurs="0"/>
    31                     <xs:element ref="tns:Metadata" minOccurs="0"/>
    32                     <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    33             </xs:sequence>
    34             <xs:anyAttribute namespace="##other" processContents="lax"/>
    35     </xs:complexType>
    36
    37     <xs:complexType name="ReferenceParametersType" mixed="false">
    38             <xs:sequence>
    39                     <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    40             </xs:sequence>
    41             <xs:anyAttribute namespace="##other" processContents="lax"/>
    42     </xs:complexType>
    43
    44     <xs:element name="Metadata" type="tns:MetadataType"/>
    45     <xs:complexType name="MetadataType" mixed="false">
    46             <xs:sequence>
    47                     <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    48             </xs:sequence>
    49             <xs:anyAttribute namespace="##other" processContents="lax"/>
    50     </xs:complexType>
    51
    52     <xs:element name="MessageID" type="tns:AttributedURIType"/>
    53     <xs:element name="RelatesTo" type="tns:RelatesToType"/>
    54     <xs:complexType name="RelatesToType" mixed="false">
    55             <xs:simpleContent>
    56                     <xs:extension base="xs:anyURI">
    57                             <xs:attribute name="RelationshipType" type="tns:RelationshipTypeOpenEnum" use="optional" default="http://www
    .w3.org/2005/08/addressing/reply"/>
    58                             <xs:anyAttribute namespace="##other" processContents="lax"/>
    59                     </xs:extension>
    60             </xs:simpleContent>
    61     </xs:complexType>
    62
    63     <xs:simpleType name="RelationshipTypeOpenEnum">
    64             <xs:union memberTypes="tns:RelationshipType xs:anyURI"/>
    65     </xs:simpleType>
    66
    67     <xs:simpleType name="RelationshipType">
    68             <xs:restriction base="xs:anyURI">
    69                     <xs:enumeration value="http://www.w3.org/2005/08/addressing/reply"/>
    70             </xs:restriction>
    71     </xs:simpleType>
    72
    73     <xs:element name="ReplyTo" type="tns:EndpointReferenceType"/>
    74     <xs:element name="From" type="tns:EndpointReferenceType"/>
    75     <xs:element name="FaultTo" type="tns:EndpointReferenceType"/>
    76     <xs:element name="To" type="tns:AttributedURIType"/>
    77     <xs:element name="Action" type="tns:AttributedURIType"/>
    78
    79     <xs:complexType name="AttributedURIType" mixed="false">
    80             <xs:simpleContent>
    81                     <xs:extension base="xs:anyURI">
    82                             <xs:anyAttribute namespace="##other" processContents="lax"/>
    83                     </xs:extension>
    84             </xs:simpleContent>
    85     </xs:complexType>
    86
    87     <!-- Constructs from the WS-Addressing SOAP binding -->
    88
    89     <xs:attribute name="IsReferenceParameter" type="xs:boolean"/>
    90
    91     <xs:simpleType name="FaultCodesOpenEnumType">
    92             <xs:union memberTypes="tns:FaultCodesType xs:QName"/>
    93     </xs:simpleType>
    94
    95     <xs:simpleType name="FaultCodesType">
    96             <xs:restriction base="xs:QName">
    97                     <xs:enumeration value="tns:InvalidAddressingHeader"/>
    98                     <xs:enumeration value="tns:InvalidAddress"/>
    99                     <xs:enumeration value="tns:InvalidEPR"/>
    100                     <xs:enumeration value="tns:InvalidCardinality"/>
    101                     <xs:enumeration value="tns:MissingAddressInEPR"/>
    102                     <xs:enumeration value="tns:DuplicateMessageID"/>
    103                     <xs:enumeration value="tns:ActionMismatch"/>
    104                     <xs:enumeration value="tns:MessageAddressingHeaderRequired"/>
    105                     <xs:enumeration value="tns:DestinationUnreachable"/>
    106                     <xs:enumeration value="tns:ActionNotSupported"/>
    107                     <xs:enumeration value="tns:EndpointUnavailable"/>
    108             </xs:restriction>
    109     </xs:simpleType>
    110
    111     <xs:element name="RetryAfter" type="tns:AttributedUnsignedLongType"/>
    112     <xs:complexType name="AttributedUnsignedLongType" mixed="false">
    113             <xs:simpleContent>
    114                     <xs:extension base="xs:unsignedLong">
    115                             <xs:anyAttribute namespace="##other" processContents="lax"/>
    116                     </xs:extension>
    117             </xs:simpleContent>
    118     </xs:complexType>
    119
    120     <xs:element name="ProblemHeaderQName" type="tns:AttributedQNameType"/>
    121     <xs:complexType name="AttributedQNameType" mixed="false">
    122             <xs:simpleContent>
    123                     <xs:extension base="xs:QName">
    124                             <xs:anyAttribute namespace="##other" processContents="lax"/>
    125                     </xs:extension>
    126             </xs:simpleContent>
    127     </xs:complexType>
    128
    129     <xs:element name="ProblemHeader" type="tns:AttributedAnyType"/>
    130     <xs:complexType name="AttributedAnyType" mixed="false">
    131             <xs:sequence>
    132                     <xs:any namespace="##any" processContents="lax" minOccurs="1" maxOccurs="1"/>
    133             </xs:sequence>
    134             <xs:anyAttribute namespace="##other" processContents="lax"/>
    135     </xs:complexType>
    136
    137     <xs:element name="ProblemIRI" type="tns:AttributedURIType"/>
    138
    139     <xs:element name="ProblemAction" type="tns:ProblemActionType"/>
    140     <xs:complexType name="ProblemActionType" mixed="false">
    141             <xs:sequence>
    142                     <xs:element ref="tns:Action" minOccurs="0"/>
    143                     <xs:element name="SoapAction" minOccurs="0" type="xs:anyURI"/>
    144             </xs:sequence>
    145             <xs:anyAttribute namespace="##other" processContents="lax"/>
    146     </xs:complexType>
    147
    148  </xs:schema>';
    149  end;
    150  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> declare
      2    xmlschema xmltype := xmltype(:xmlschema);
      3  begin
      4    dbms_xmlschema.registerSchema
      5    (
      6        schemaURL => :schemaURL
      7       ,schemaDoc => xmlschema
      8       ,local     => TRUE
      9       ,genBean   => false
    10       ,genTypes  => TRUE
    11       ,genTables => TRUE
    12    );
    13  end;
    14  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:03.07
    SQL>
    SQL> begin
      2    :schemaURL1 := 'muws1-2.xsd';
      3    :xmlSchema :=
      4  '<?xml version="1.0" encoding="utf-8"?>
      5  <!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Dirk Grissett (Oracle Corp.) --> <xs:schema xmlns:muws1="http://docs.
    oasis-open.org/wsdm/muws1-2.xsd" xmlns:muws2="http://docs.oasis-open.org/wsdm/muws2-2.xsd" xmlns:wsa="http://www.w3.org/2005/08/addressing"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://docs.oasis-open.org/wsdm/muws1-2.xsd" elementFormDefault="qualified" att
    ributeFormDefault="unqualified">
      6     <xs:import namespace="http://docs.oasis-open.org/wsdm/muws2-2.xsd" schemaLocation="muws2-2.xsd"/>
      7     <xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="http://www.w3.org/2005/08/addressing/ws-addr.xsd"/>
      8     <xs:element name="ResourceId" type="xs:anyURI"/>
      9     <xs:element name="ManageabilityCapability" type="xs:anyURI"/>
    10     <xs:complexType name="CorrelatablePropertiesType">
    11             <xs:sequence>
    12                     <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    13             </xs:sequence>
    14             <xs:attribute name="Dialect" type="xs:anyURI"/>
    15             <xs:attribute name="NegativeAssertionPossible" type="xs:boolean"/>
    16             <xs:anyAttribute namespace="##other"/>
    17     </xs:complexType>
    18     <xs:element name="CorrelatableProperties" type="muws1:CorrelatablePropertiesType"/>
    19     <xs:complexType name="ComponentAddressType">
    20             <xs:sequence>
    21                     <xs:element name="ManagementURL" type="xs:string"/>
    22                     <xs:any namespace="##any" processContents="lax"/>
    23             </xs:sequence>
    24     </xs:complexType>
    25     <xs:complexType name="ComponentType">
    26             <xs:sequence>
    27                     <xs:element name="ResourceId" type="xs:anyURI" minOccurs="0"/>
    28                     <xs:element name="ComponentAddress" type="muws1:ComponentAddressType" minOccurs="0"/>
    29                     <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    30             </xs:sequence>
    31             <xs:anyAttribute namespace="##other"/>
    32     </xs:complexType>
    33     <xs:complexType name="ManagementEventType">
    34             <xs:sequence>
    35                     <xs:element name="EventId" type="xs:anyURI"/>
    36                     <xs:element name="SourceComponent" type="muws1:ComponentType"/>
    37                     <xs:element name="ReporterComponent" type="muws1:ComponentType" minOccurs="0"/>
    38                     <xs:element ref="muws2:Situation"/>
    39                     <xs:element name="ExtendedData" type="muws1:ExtendedDataType" minOccurs="0" maxOccurs="unbounded"/>
    40                     <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    41             </xs:sequence>
    42             <xs:attribute name="ReportTime" type="xs:dateTime" use="optional"/>
    43             <xs:anyAttribute namespace="##other"/>
    44     </xs:complexType>
    45     <xs:element name="ManagementEvent" type="muws1:ManagementEventType"/>
    46     <xs:element name="ManageabilityEndpointReference" type="wsa:EndpointReferenceType"/>
    47     <xs:complexType name="ExtendedDataElementType">
    48             <xs:sequence>
    49                     <xs:choice>
    50                             <xs:element name="values" minOccurs="0">
    51                                     <xs:simpleType>
    52                                             <xs:restriction base="xs:string">
    53                                                     <xs:maxLength value="1024"/>
    54                                             </xs:restriction>
    55                                     </xs:simpleType>
    56                             </xs:element>
    57                             <xs:element name="hexValue" type="xs:hexBinary" minOccurs="0"/>
    58                             <xs:element name="intValues" type="xs:int" minOccurs="0"/>
    59                             <xs:element name="longValues" type="xs:long" minOccurs="0"/>
    60                             <xs:element name="shortValues" type="xs:short" minOccurs="0"/>
    61                             <xs:element name="dateTimeValues" type="xs:dateTime" minOccurs="0"/>
    62                             <xs:element name="byteValues" type="xs:byte" minOccurs="0"/>
    63                             <xs:element name="booleanValues" type="xs:boolean" minOccurs="0"/>
    64                             <xs:element name="floatValues" type="xs:float" minOccurs="0"/>
    65                             <xs:element name="doubleValues" type="xs:double" minOccurs="0"/>
    66                             <xs:element name="largeStringValue" type="xs:string" minOccurs="0"/>
    67                     </xs:choice>
    68             </xs:sequence>
    69             <xs:attribute name="name" use="required">
    70                     <xs:simpleType>
    71                             <xs:restriction base="xs:Name">
    72                                     <xs:maxLength value="64"/>
    73                             </xs:restriction>
    74                     </xs:simpleType>
    75             </xs:attribute>
    76             <xs:attribute name="type" use="required">
    77                     <xs:simpleType>
    78                             <xs:restriction base="xs:string">
    79                                     <xs:enumeration value="noValue"/>
    80                                     <xs:enumeration value="byte"/>
    81                                     <xs:enumeration value="short"/>
    82                                     <xs:enumeration value="int"/>
    83                                     <xs:enumeration value="long"/>
    84                                     <xs:enumeration value="float"/>
    85                                     <xs:enumeration value="double"/>
    86                                     <xs:enumeration value="string"/>
    87                                     <xs:enumeration value="dateTime"/>
    88                                     <xs:enumeration value="boolean"/>
    89                                     <xs:enumeration value="byteArray"/>
    90                                     <xs:enumeration value="shortArray"/>
    91                                     <xs:enumeration value="intArray"/>
    92                                     <xs:enumeration value="longArray"/>
    93                                     <xs:enumeration value="floatArray"/>
    94                                     <xs:enumeration value="doubleArray"/>
    95                                     <xs:enumeration value="stringArray"/>
    96                                     <xs:enumeration value="dateTimeArray"/>
    97                                     <xs:enumeration value="booleanArray"/>
    98                                     <xs:enumeration value="hexBinary"/>
    99                                     <xs:enumeration value="largeStringValue"/>
    100                             </xs:restriction>
    101                     </xs:simpleType>
    102             </xs:attribute>
    103     </xs:complexType>
    104     <xs:complexType name="ExtendedDataType">
    105             <xs:sequence>
    106                     <xs:element name="ExtendedDataElement" type="muws1:ExtendedDataElementType" minOccurs="0" maxOccurs="unbounded"/>
    107             </xs:sequence>
    108             <xs:attribute name="profile" type="xs:ID"/>
    109     </xs:complexType>
    110     <!--
    111                                         SCHEMA COPY Material Copy and paste element references below into the schema of a resource prope
    rties document.
    112  These references are provide to insure that the correct minOccurs/maxOccurs attributes are specified in a resource property document sc
    hema.
    113
    114  NOTE: You must import the MUWS Part 1 schema namespace (MUWS1).
    115
    116          **    Identity Properties    **
    117            <xs:element ref="muws1:ResourceId"/>
    118
    119
    120          **    ManageabilityCharacteristics Properties    **
    121            <xs:element ref="muws1:ManageabilityCapability"
    122                        minOccurs="0" maxOccurs="unbounded"/>
    123
    124          **    Correlatable Properties    **
    125            <xs:element ref="muws1:CorrelatableProperties"
    126                        minOccurs="0" maxOccurs="unbounded"/>
    127
    128  -->
    129  </xs:schema>';
    130  end;
    131  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> declare
      2    xmlschema xmltype := xmltype(:xmlschema);
      3  begin
      4    dbms_xmlschema.registerSchema
      5    (
      6        schemaURL => :schemaURL1
      7       ,schemaDoc => xmlschema
      8       ,local     => TRUE
      9       ,genBean   => false
    10       ,genTypes  => TRUE
    11       ,genTables => TRUE
    12       ,force => TRUE
    13    );
    14  end;
    15  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.35
    SQL> begin
      2    :schemaURL2 := 'muws2-2.xsd';
      3    :xmlSchema :=
      4  '<?xml version="1.0" encoding="utf-8"?>
      5  <!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Dirk Grissett (Oracle Corp.) -->
      6  <xs:schema xmlns:muws2="http://docs.oasis-open.org/wsdm/muws2-2.xsd" xmlns:muws1="http://docs.oasis-open.org/wsdm/muws1-2.xsd" xmlns:ws
    a="http://www.w3.org/2005/08/addressing" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://docs.oasis-open.org/wsdm/muws2-
    2.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">
      7     <xs:import namespace="http://docs.oasis-open.org/wsdm/muws1-2.xsd" schemaLocation="muws1-2.xsd"/>
      8     <xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="http://www.w3.org/2005/08/addressing/ws-addr.xsd"/>
      9     <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
    10     <xs:complexType name="LangString">
    11             <xs:simpleContent>
    12                     <xs:extension base="xs:string">
    13                             <xs:attribute ref="xml:lang" use="required"/>
    14                             <xs:anyAttribute namespace="##other"/>
    15                     </xs:extension>
    16             </xs:simpleContent>
    17     </xs:complexType>
    18     <!-- Begin properties for the Description capability -->
    19     <xs:element name="Caption" type="muws2:LangString"/>
    20     <xs:element name="Description" type="muws2:LangString"/>
    21     <xs:element name="Version" type="xs:string"/>
    22     <!-- End   properties for the Description capability -->
    23     <xs:complexType name="CategoryType">
    24             <xs:sequence>
    25                     <xs:any namespace="##any" processContents="lax" minOccurs="0"/>
    26             </xs:sequence>
    27     </xs:complexType>
    28     <xs:complexType name="StateType">
    29             <xs:complexContent>
    30                     <xs:extension base="muws2:CategoryType"/>
    31             </xs:complexContent>
    32     </xs:complexType>
    33     <xs:element name="State" type="muws2:StateType"/>
    34     <xs:element name="EnteredState" type="muws2:StateType"/>
    35     <xs:element name="PreviousState" type="muws2:StateType"/>
    36     <xs:complexType name="StateTransitionType">
    37             <xs:sequence>
    38                     <xs:element ref="muws2:EnteredState"/>
    39                     <xs:element ref="muws2:PreviousState" minOccurs="0"/>
    40                     <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    41             </xs:sequence>
    42             <xs:attribute name="TransitionIdentifier" type="xs:anyURI" use="optional"/>
    43             <xs:attribute name="Time" type="xs:dateTime" use="required"/>
    44             <xs:anyAttribute namespace="##other"/>
    45     </xs:complexType>
    46     <xs:element name="StateTransition" type="muws2:StateTransitionType"/>
    47     <!-- Begin properties for the OperationalStatus capability -->
    48     <xs:element name="OperationalStatus">
    49             <xs:simpleType>
    50                     <xs:restriction base="xs:string">
    51                             <xs:enumeration value="Available"/>
    52                             <xs:enumeration value="PartiallyAvailable"/>
    53                             <xs:enumeration value="Unavailable"/>
    54                             <xs:enumeration value="Unknown"/>
    55                     </xs:restriction>
    56             </xs:simpleType>
    57     </xs:element>
    58     <!-- End   properties for the OperationalStatus capability -->
    59     <xs:attributeGroup name="MetricAttributes">
    60             <xs:attribute name="ResetAt" type="xs:dateTime"/>
    61             <xs:attribute name="LastUpdated" type="xs:dateTime"/>
    62             <xs:attribute name="Duration" type="xs:duration"/>
    63     </xs:attributeGroup>
    64     <!-- Begin properties for the Metrics capability -->
    65     <xs:element name="CurrentTime" type="xs:dateTime"/>
    66     <!-- End   properties for the Metrics capability -->
    67     <xs:complexType name="RelationshipTypeType">
    68             <xs:complexContent>
    69                     <xs:extension base="muws2:CategoryType"/>
    70             </xs:complexContent>
    71     </xs:complexType>
    72     <xs:element name="Self">
    73             <xs:complexType/>
    74     </xs:element>
    75     <xs:complexType name="RelationshipParticipantType">
    76             <xs:sequence>
    77                     <xs:element ref="muws2:Self" minOccurs="0"/>
    78                     <xs:element ref="muws1:ManageabilityEndpointReference" minOccurs="0" maxOccurs="unbounded"/>
    79                     <xs:element ref="wsa:EndpointReference" minOccurs="0" maxOccurs="unbounded"/>
    80                     <xs:element ref="muws1:ResourceId" minOccurs="0"/>
    81                     <xs:element name="Role" type="xs:anyURI"/>
    82                     <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    83             </xs:sequence>
    84             <xs:anyAttribute namespace="##other"/>
    85     </xs:complexType>
    86     <!-- Begin properties for the RelationshipResource capability -->
    87     <xs:element name="Name" type="xs:string"/>
    88     <xs:element name="Type" type="muws2:RelationshipTypeType"/>
    89     <xs:element name="Participant" type="muws2:RelationshipParticipantType"/>
    90     <!-- End   properties for the RelationshipResource capability -->
    91     <xs:complexType name="RelationshipType">
    92             <xs:sequence>
    93                     <xs:element ref="muws2:Name" minOccurs="0"/>
    94                     <xs:element ref="muws2:Type"/>
    95                     <xs:element ref="muws2:Participant" minOccurs="2" maxOccurs="unbounded"/>
    96                     <xs:element name="AccessEndpointReference" type="wsa:EndpointReferenceType" minOccurs="0"/>
    97                     <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    98             </xs:sequence>
    99             <xs:anyAttribute namespace="##other"/>
    100     </xs:complexType>
    101     <!-- Begin properties for the Relationship capability -->
    102     <xs:element name="Relationship" type="muws2:RelationshipType"/>
    103     <!-- End   properties for the Relationship capability -->
    104     <xs:element name="RelationshipCreatedNotification">
    105             <xs:complexType>
    106                     <xs:sequence>
    107                             <xs:element ref="muws2:Relationship"/>
    108                             <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    109                     </xs:sequence>
    110                     <xs:anyAttribute namespace="##other"/>
    111             </xs:complexType>
    112     </xs:element>
    113     <xs:element name="RelationshipDeletedNotification">
    114             <xs:complexType>
    115                     <xs:sequence>
    116                             <xs:element ref="muws2:Relationship"/>
    117                             <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    118                     </xs:sequence>
    119                     <xs:anyAttribute namespace="##other"/>
    120             </xs:complexType>
    121     </xs:element>
    122     <xs:element name="QueryRelationshipsByType">
    123             <xs:complexType>
    124                     <xs:sequence>
    125                             <xs:element name="RequestedType" type="xs:QName"/>
    126                     </xs:sequence>
    127             </xs:complexType>
    128     </xs:element>
    129     <xs:element name="QueryRelationshipsByTypeResponse">
    130             <xs:complexType>
    131                     <xs:sequence>
    132                             <xs:element ref="muws2:Relationship" minOccurs="0" maxOccurs="unbounded"/>
    133                     </xs:sequence>
    134             </xs:complexType>
    135     </xs:element>
    136     <xs:element name="CreationNotification">
    137             <xs:complexType>
    138                     <xs:sequence>
    139                             <xs:element ref="muws1:ManageabilityEndpointReference" minOccurs="0" maxOccurs="unbounded"/>
    140                     </xs:sequence>
    141                     <xs:anyAttribute namespace="##other"/>
    142             </xs:complexType>
    143     </xs:element>
    144     <xs:element name="DestructionNotification">
    145             <xs:complexType>
    146                     <xs:sequence>
    147                             <xs:element ref="muws1:ResourceId" minOccurs="0"/>
    148                     </xs:sequence>
    149                     <xs:anyAttribute namespace="##other"/>
    150             </xs:complexType>
    151     </xs:element>
    152     <xs:complexType name="SituationCategoryType">
    153             <xs:complexContent>
    154                     <xs:extension base="muws2:CategoryType">
    155                             <xs:sequence>
    156                                     <xs:element name="SituationName" minOccurs="0"/>
    157                             </xs:sequence>
    158                     </xs:extension>
    159             </xs:complexContent>
    160     </xs:complexType>
    161     <xs:element name="fred" type="xs:string"/>
    162     <xs:complexType name="SubstitutableMsgType">
    163             <xs:sequence>
    164                     <xs:element name="Value" type="xs:anySimpleType" minOccurs="0" maxOccurs="unbounded"/>
    165             </xs:sequence>
    166             <xs:attribute name="MsgId" type="xs:string" use="required"/>
    167             <xs:attribute name="MsgIdType" type="xs:anyURI" use="required"/>
    168     </xs:complexType>
    169     <xs:complexType name="SituationType">
    170             <xs:sequence>
    171                     <xs:element name="SituationCategory" type="muws2:SituationCategoryType"/>
    172                     <xs:element name="SuccessDisposition" minOccurs="0">
    173                             <xs:simpleType>
    174                                     <xs:restriction base="xs:string">
    175                                             <xs:enumeration value="Successful"/>
    176                                             <xs:enumeration value="Unsuccessful"/>
    177                                     </xs:restriction>
    178                             </xs:simpleType>
    179                     </xs:element>
    180                     <xs:element name="SituationTime" type="xs:dateTime"/>
    181                     <xs:element name="Priority" type="xs:short" minOccurs="0"/>
    182                     <xs:element name="Severity" type="xs:short" minOccurs="0"/>
    183                     <xs:element name="Message" type="muws2:LangString" minOccurs="0"/>
    184                     <xs:element name="SubstitutableMsg" type="muws2:SubstitutableMsgType" minOccurs="0"/>
    185             </xs:sequence>
    186     </xs:complexType>
    187     <xs:element name="Situation" type="muws2:SituationType"/>
    188     <xs:complexType name="EventCorrelationPropertiesType">
    189             <xs:sequence>
    190                     <xs:element name="repeatCount" minOccurs="0">
    191                             <xs:simpleType>
    192                                     <xs:restriction base="xs:short">
    193                                             <xs:minInclusive value="0"/>
    194                                     </xs:restriction>
    195                             </xs:simpleType>
    196                     </xs:element>
    197                     <xs:element name="elapsedTime" minOccurs="0">
    198                             <xs:simpleType>
    199                                     <xs:restriction base="xs:long">
    200                                             <xs:minInclusive value="0"/>
    201                                     </xs:restriction>
    202                             </xs:simpleType>
    203                     </xs:element>
    204             </xs:sequence>
    205             <xs:attribute name="sequenceNumber" type="xs:unsignedLong"/>
    206     </xs:complexType>
    207     <xs:element name="EventCorrelationProperties" type="muws2:EventCorrelationPropertiesType"/>
    208     <xs:complexType name="MsgCatalogInformationType">
    209             <xs:sequence>
    210                     <xs:element name="msgCatalog" type="xs:anyURI"/>
    211                     <xs:element name="msgCatalogType" type="xs:anyURI" minOccurs="0"/>
    212             </xs:sequence>
    213     </xs:complexType>
    214     <xs:element name="MsgCatalogInformation" type="muws2:MsgCatalogInformationType"/>
    215     <!-- #####   Metadata description elements   ##### -->
    216     <xs:element name="Capability" type="xs:anyURI"/>
    217     <xs:complexType name="DialectableExpressionType" mixed="true">
    218             <xs:sequence>
    219                     <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    220             </xs:sequence>
    221             <xs:attribute name="Dialect" type="xs:anyURI" use="required"/>
    222             <xs:anyAttribute namespace="##other"/>
    223     </xs:complexType>
    224     <xs:element name="ValidWhile" type="muws2:DialectableExpressionType"/>
    225     <xs:element name="Units" type="xs:string"/>
    226     <xs:element name="ChangeType">
    227             <xs:simpleType>
    228                     <xs:restriction base="xs:string">
    229                             <xs:enumeration value="Counter"/>
    230                             <xs:enumeration value="Gauge"/>
    231                             <xs:enumeration value="Unknown"/>
    232                     </xs:restriction>
    233             </xs:simpleType>
    234     </xs:element>
    235     <xs:element name="TimeScope">
    236             <xs:simpleType>
    237                     <xs:restriction base="xs:string">
    238                             <xs:enumeration value="Interval"/>
    239                             <xs:enumeration value="PointInTime"/>
    240                             <xs:enumeration value="SinceReset"/>
    241                     </xs:restriction>
    242             </xs:simpleType>
    243     </xs:element>
    244     <xs:element name="GatheringTime">
    245             <xs:simpleType>
    246                     <xs:restriction base="xs:string">
    247                             <xs:enumeration value="OnChange"/>
    248                             <xs:enumeration value="Periodic"/>
    249                             <xs:enumeration value="OnDemand"/>
    250                             <xs:enumeration value="Unknown"/>
    251                     </xs:restriction>
    252             </xs:simpleType>
    253     </xs:element>
    254     <xs:element name="CalculationInterval" type="xs:duration"/>
    255     <xs:element name="MetricGroup" type="xs:anyURI"/>
    256     <xs:element name="PostCondition" type="muws2:DialectableExpressionType"/>
    257     <!-- =========   StartSituation   ============  -->
    258     <xs:element name="StartSituation">
    259             <xs:complexType>
    260                     <xs:complexContent>
    261                             <xs:restriction base="muws2:SituationCategoryType"/>
    262                     </xs:complexContent>
    263             </xs:complexType>
    264     </xs:element>
    265     <xs:element name="StartInitiated">
    266             <xs:complexType>
    267                     <xs:complexContent>
    268                             <xs:restriction base="muws2:SituationCategoryType">
    269                                     <xs:sequence>
    270                                             <xs:element ref="muws2:StartSituation"/>
    271                                     </xs:sequence>
    272                             </xs:restriction>
    273                     </xs:complexContent>
    274             </xs:complexType>
    275     </xs:element>
    276     <xs:element name="RestartInitiated">
    277             <xs:complexType>
    278                     <xs:complexContent>
    279                             <xs:restriction base="muws2:SituationCategoryType">
    280                                     <xs:sequence>
    281                                             <xs:element ref="muws2:StartSituation"/>
    282                                     </xs:sequence>
    283                             </xs:restriction>
    284                     </xs:complexContent>
    285             </xs:complexType>
    286     </xs:element>
    287     <xs:element name="StartCompleted">
    288             <xs:complexType>
    289                     <xs:complexContent>
    290                             <xs:restriction base="muws2:SituationCategoryType">
    291                                     <xs:sequence>
    292                                             <xs:element ref="muws2:StartSituation"/>
    293                                     </xs:sequence>
    294                             </xs:restriction>
    295                     </xs:complexContent>
    296             </xs:complexType>
    297     </xs:element>
    298     <!-- =========   StopSituation   ============  -->
    299     <xs:element name="StopSituation">
    300             <xs:complexType>
    301                     <xs:complexContent>
    302                             <xs:restriction base="muws2:SituationCategoryType"/>
    303                     </xs:complexContent>
    304             </xs:complexType>
    305     </xs:element>
    306     <xs:element name="StopInitiated">
    307             <xs:complexType>
    308                     <xs:complexContent>
    309                             <xs:restriction base="muws2:SituationCategoryType">
    310                                     <xs:sequence>
    311                                             <xs:element ref="muws2:StopSituation"/>
    312                                     </xs:sequence>
    313                             </xs:restriction>
    314                     </xs:complexContent>
    315             </xs:complexType>
    316     </xs:element>
    317     <xs:element name="AbortInitiated">
    318             <xs:complexType>
    319                     <xs:complexContent>
    320                             <xs:restriction base="muws2:SituationCategoryType">
    321                                     <xs:sequence>
    322                                             <xs:element ref="muws2:StopSituation"/>
    323                                     </xs:sequence>
    324                             </xs:restriction>
    325                     </xs:complexContent>
    326             </xs:complexType>
    327     </xs:element>
    328     <xs:element name="PauseInitiated">
    329             <xs:complexType>
    330                     <xs:complexContent>
    331                             <xs:restriction base="muws2:SituationCategoryType">
    332                                     <xs:sequence>
    333                                             <xs:element ref="muws2:StopSituation"/>
    334                                     </xs:sequence>
    335                             </xs:restriction>
    336                     </xs:complexContent>
    337             </xs:complexType>
    338     </xs:element>
    339     <xs:element name="StopCompleted">
    340             <xs:complexType>
    341                     <xs:complexContent>
    342                             <xs:restriction base="muws2:SituationCategoryType">
    343                                     <xs:sequence>
    344                                             <xs:element ref="muws2:StopSituation"/>
    345                                     </xs:sequence>
    346                             </xs:restriction>
    347                     </xs:complexContent>
    348             </xs:complexType>
    349     </xs:element>
    350     <!-- =========   RequestSituation   ============  -->
    351     <xs:element name="RequestSituation">
    352             <xs:complexType>
    353                     <xs:complexContent>
    354                             <xs:restriction base="muws2:SituationCategoryType"/>
    355                     </xs:complexContent>
    356             </xs:complexType>
    357     </xs:element>
    358     <xs:element name="RequestInitiated">
    359             <xs:complexType>
    360                     <xs:complexContent>
    361                             <xs:restriction base="muws2:SituationCategoryType">
    362                                     <xs:sequence>
    363                                             <xs:element ref="muws2:RequestSituation"/>
    364                                     </xs:sequence>
    365                             </xs:restriction>
    366                     </xs:complexContent>
    367             </xs:complexType>
    368     </xs:element>
    369     <xs:element name="RequestCompleted">
    370             <xs:complexType>
    371                     <xs:complexContent>
    372                             <xs:restriction base="muws2:SituationCategoryType">
    373                                     <xs:sequence>
    374                                             <xs:element ref="muws2:RequestSituation"/>
    375                                     </xs:sequence>
    376                             </xs:restriction>
    377                     </xs:complexContent>
    378             </xs:complexType>
    379     </xs:element>
    380     <!-- =========   DestroySituation   ============  -->
    381     <xs:element name="DestroySituation">
    382             <xs:complexType>
    383                     <xs:complexContent>
    384                             <xs:restriction base="muws2:SituationCategoryType"/>
    385                     </xs:complexContent>
    386             </xs:complexType>
    387     </xs:element>
    388     <xs:element name="DestroyInitiated">
    389             <xs:complexType>
    390                     <xs:complexContent>
    391                             <xs:restriction base="muws2:SituationCategoryType">
    392                                     <xs:sequence>
    393                                             <xs:element ref="muws2:DestroySituation"/>
    394                                     </xs:sequence>
    395                             </xs:restriction>
    396                     </xs:complexContent>
    397             </xs:complexType>
    398     </xs:element>
    399     <xs:element name="DestroyCompleted">
    400             <xs:complexType>
    401                     <xs:complexContent>
    402                             <xs:restriction base="muws2:SituationCategoryType">
    403                                     <xs:sequence>
    404                                             <xs:element ref="muws2:DestroySituation"/>
    405                                     </xs:sequence>
    406                             </xs:restriction>
    407                     </xs:complexContent>
    408             </xs:complexType>
    409     </xs:element>
    410     <!-- =========   CreateSituation   ============  -->
    411     <xs:element name="CreateSituation">
    412             <xs:complexType>
    413                     <xs:complexContent>
    414                             <xs:restriction base="muws2:SituationCategoryType"/>
    415                     </xs:complexContent>
    416             </xs:complexType>
    417     </xs:element>
    418     <xs:element name="CreateInitiated">
    419             <xs:complexType>
    420                     <xs:complexContent>
    421                             <xs:restriction base="muws2:SituationCategoryType">
    422                                     <xs:sequence>
    423                                             <xs:element ref="muws2:CreateSituation"/>
    424                                     </xs:sequence>
    425                             </xs:restriction>
    426                     </xs:complexContent>
    427             </xs:complexType>
    428     </xs:element>
    429     <xs:element name="CreateCompleted">
    430             <xs:complexType>
    431                     <xs:complexContent>
    432                             <xs:restriction base="muws2:SituationCategoryType">
    433                                     <xs:sequence>
    434                                             <xs:element ref="muws2:CreateSituation"/>
    435                                     </xs:sequence>
    436                             </xs:restriction>
    437                     </xs:complexContent>
    438             </xs:complexType>
    439     </xs:element>
    440     <!-- =========   ConnectSituation   ============  -->
    441     <xs:element name="ConnectSituation">
    442             <xs:complexType>
    443                     <xs:complexContent>
    444                             <xs:restriction base="muws2:SituationCategoryType"/>
    445                     </xs:complexContent>
    446             </xs:complexType>
    447     </xs:element>
    448     <xs:element name="ConnectInitiated">
    449             <xs:complexType>
    450                     <xs:complexContent>
    451                             <xs:restriction base="muws2:SituationCategoryType">
    452                                     <xs:sequence>
    453                                             <xs:element ref="muws2:ConnectSituation"/>
    454                                     </xs:sequence>
    455                             </xs:restriction>
    456                     </xs:complexContent>
    457             </xs:complexType>
    458     </xs:element>
    459     <xs:element name="ReconnectInitiated">
    460             <xs:complexType>
    461                     <xs:complexContent>
    462                             <xs:restriction base="muws2:SituationCategoryType">
    463                                     <xs:sequence>
    464                                             <xs:element ref="muws2:ConnectSituation"/>
    465                                     </xs:sequence>
    466                             </xs:restriction>
    467                     </xs:complexContent>
    468             </xs:complexType>
    469     </xs:element>
    470     <xs:element name="ConnectCompleted">
    471             <xs:complexType>
    472                     <xs:complexContent>
    473                             <xs:restriction base="muws2:SituationCategoryType">
    474                                     <xs:sequence>
    475                                             <xs:element ref="muws2:ConnectSituation"/>
    476                                     </xs:sequence>
    477                             </xs:restriction>
    478                     </xs:complexContent>
    479             </xs:complexType>
    480     </xs:element>
    481     <!-- =========   ReportSituation   ============  -->
    482     <xs:element name="ReportSituation">
    483             <xs:complexType>
    484                     <xs:complexContent>
    485                             <xs:restriction base="muws2:SituationCategoryType"/>
    486                     </xs:complexContent>
    487             </xs:complexType>
    488     </xs:element>
    489     <xs:element name="PerformanceReport">
    490             <xs:complexType>
    491                     <xs:complexContent>
    492                             <xs:restriction base="muws2:SituationCategoryType">
    493                                     <xs:sequence>
    494                                             <xs:element ref="muws2:ReportSituation"/>
    495                                     </xs:sequence>
    496                             </xs:restriction>
    497                     </xs:complexContent>
    498             </xs:complexType>
    499     </xs:element>
    500     <xs:element name="SecurityReport">
    501             <xs:complexType>
    502                     <xs:complexContent>
    503                             <xs:restriction base="muws2:SituationCategoryType">
    504                                     <xs:sequence>
    505                                             <xs:element ref="muws2:ReportSituation"/>
    506                                     </xs:sequence>
    507                             </xs:restriction>
    508                     </xs:complexContent>
    509             </xs:complexType>
    510     </xs:element>
    511     <xs:element name="HeartbeatReport">
    512             <xs:complexType>
    513                     <xs:complexContent>
    514                             <xs:restriction base="muws2:SituationCategoryType">
    515                                     <xs:sequence>
    516                                             <xs:element ref="muws2:ReportSituation"/>
    517                                     </xs:sequence>
    518                             </xs:restriction>
    519                     </xs:complexContent>
    520             </xs:complexType>
    521     </xs:element>
    522     <xs:element name="StatusReport">
    523             <xs:complexType>
    524                     <xs:complexContent>
    525                             <xs:restriction base="muws2:SituationCategoryType">
    526                                     <xs:sequence>
    527                                             <xs:element ref="muws2:ReportSituation"/>
    528                                     </xs:sequence>
    529                             </xs:restriction>
    530                     </xs:complexContent>
    531             </xs:complexType>
    532     </xs:element>
    533     <xs:element name="TraceReport">
    534             <xs:complexType>
    535                     <xs:complexContent>
    536                             <xs:restriction base="muws2:SituationCategoryType"&g

  • Cannot see registered XML schema in user_objects

    Hi,
    I noticed that XML schema that I register do not appear in the user_objects view. But they appear in the all_objects view.
    Joining all_objects with all_xml_schemas each XML schema appears to have two owners, the owner XDB and the account used to register the schema.
    select schema_url,X.owner xml_owner,O.owner object_owner
    from all_xml_schemas X, all_objects O
    where int_objname = object_name
    SCHEMA_URL                                                   XML_OWNER       OBJECT_OWNER
    ts-csg.com/group_alertAscii.xsd                              OPS$PHITCHMAN   XDB
    ts-csg.com/group_applicationId.xsd                           OPS$PHITCHMAN   XDB
    ts-csg.com/group_paraAsciiSimple.xsd                         OPS$PHITCHMAN   XDB
    ts-csg.com/group_paragraphAscii.xsd                          OPS$PHITCHMAN   XDB
    ts-csg.com/group_paraAscii.xsd                               OPS$PHITCHMAN   XDB
    ts-csg.com/group_coreAscii.xsd                               OPS$PHITCHMAN   XDB
    ts-csg.com/group_psList.xsd                                  OPS$PHITCHMAN   XDBIs this right?
    Thanks
    Pete

    USER_XML_SCHEMAS is the view you need to query.
    USER_XML_SCHEMAS describes the registered XML schemas owned by the current user. Its columns (except for OWNER) are the same as those in ALL_XML_SCHEMAS.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_4491.htm#REFRN26307

  • Register xml schema in Oracle 9i error

    I got following ORA error when register xml schema in Oracle 9i.
    ORA-30931: Element 'seq' cannot contain mixed text
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
    ORA-06512: at line 754
    There is no mixed in the XSD. There is someone mentioned oracle 9i has bug and need to change the xsd file. any ideas how to work around this?
    Edited by: user7435395 on Dec 2, 2011 1:22 PM

    You are out of luck. Oracle 9i is not a supported version.

  • Register XML schema using dbms_xmlschema in Oracle 11g

    I have a xsd file located at C:\temp\test.xsd
    I need to register this schema to create a XMLType table for Object Relational XML Storage.
    How do I register the schema for relational storage?
    I do not seem to find any example on internet for registering the schema for relational storage.
    Any help would be highly appreciated.

    Thanks for help. The table is created now. But it created a CLOB table whereas I want a relational table with rows and columns. Is it because the schema was registered with SCHEMADOC as bfilename? How do I get the relational storage?
    BEGIN
       DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL=> 'TESTDEPT.XSD',
        SCHEMADOC=> bfilename('XML_DIR','TESTDEPT.XSD'),
        LOCAL=> TRUE,
        GENTYPES=> TRUE,
        GENTABLES=> FALSE,
        CSID=> nls_charset_id('AL32UTF8'));
    END;
    CREATE TABLE TESTDEPT OF XMLType
      XMLTYPE store AS OBJECT RELATIONAL
      XMLSCHEMA "TESTDEPT.XSD" ELEMENT "root";
    desc TESTDEPT;
      Name                           Null     Type                                                                                                                                                                                         
    SYS_NC_ROWINFO$                         XMLTYPE()        
    SELECT dbms_metadata.get_ddl('TABLE','TESTDEPT') from dual;
      DBMS_METADATA.GET_DDL('TABLE','TESTDEPT')                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(CLOB)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
      CREATE TABLE "DMUSER"."TESTDEPT" OF XMLTYPE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
      XMLSCHEMA "TESTDEPT.XSD" ELEMENT "root" ID 4090 PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
      TABLESPACE "USERS" 
    My database version:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production    
    PL/SQL Release 11.2.0.1.0 - Production                                          
    CORE 11.2.0.1.0 Production                                                        
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production                         
    NLSRTL Version 11.2.0.1.0 - Production

  • How to identify objects created by registering xml schema

    Hi Everyone,
    We are using Oracle 9i Rel2. I have registered an XML schema and I saw that there were several objects created for it table ,some types and a trigger . For some build purposes I want to exclude all of these objects which are associated with xml schema and should be able to drop and recreate the whole of oracle schema.
    I see the user_types table does not have any parameter to indicate that these are autogenerated or are different. In user_types they look like any other type that a user would have created. Do any of you know how to differentiate these types created by registering XML schemas from the normal types.
    Thanks for your help

    There is no way I know of to differentiate between a type created by Schema Registration and another Type. You can query the XML Schema itslef to get the Typenames it relies on.
    SQL> --
    SQL> SQL> select nvl(extractvalue
    2 (
    3 value(ct),
    4 '/xs:complexType/@name',
    5 'xmlns:xs="http://www.w3.org/2001/XMLSchema"
    6 xmlns:xdb="http://xmlns.oracle.com/xdb"'
    7 ),'Local Complex Type') COMPLEX_TYPE,
    8 extractvalue
    9 (
    10 value(ct),
    11 '/xs:complexType/@xdb:SQLType',
    12 'xmlns:xs="http://www.w3.org/2001/XMLSchema"
    13 xmlns:xdb="http://xmlns.oracle.com/xdb"'
    14 ) SQL_TYPE
    15 from user_xml_schemas,
    16 table
    17 (
    18 xmlsequence
    19 (
    20 extract
    21 (
    22 schema,
    23 '//xs:complexType',
    24 'xmlns:xs="http://www.w3.org/2001/XMLSchema"
    25 xmlns:xdb="http://xmlns.oracle.com/xdb"'
    26 )
    27 )
    28 ) ct
    29 /
    COMPLEX_TYPE
    SQL_TYPE
    PurchaseOrderType
    PURCHASEORDER_T
    LineItemsType
    LINEITEMS_T
    LineItemType
    LINEITEM_T
    COMPLEX_TYPE
    SQL_TYPE
    PartType
    PART_T
    ActionsType
    ACTIONS_T
    Local Complex Type
    ACTION_T
    COMPLEX_TYPE
    SQL_TYPE
    RejectionType
    REJECTION_T
    ShippingInstructionsType
    SHIPPING_INSTRUCTIONS_T
    Local Complex Type
    ROOT_T
    COMPLEX_TYPE
    SQL_TYPE
    Local Complex Type
    P222_T
    10 rows selected.
    SQL>

  • How can I modify a registered XML-Schema?

    Hi
    I have registered a XML-Schema document. Is it possible to modify it?
    Here is an example of an registered XML-Schema. What I have to do if I would like to change for example the MA_NR, without to delete and recreate the XML-Schema?
    DECLARE
    xml_schema VARCHAR2(1000) :=
    '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:adr="http://www.ordix.de/mitarbeiterAbteilung4.xsd"
    elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:complexType name="MitarbeiterType">
    <xs:sequence>
    <xs:element name="Ma_Nr"/>
    <xs:element name="Ma_Vorname"/>
    <xs:element name="Ma_Nachname"/>
    <xs:element name="Ma_Abteilung">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Abteilung_NR"/>
         <xs:element name="Abteilung_Name"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="Mitarbeiter" type="MitarbeiterType"/>
    </xs:schema>';
    BEGIN
    DBMS_XMLSCHEMA.registerSchema('http://www.ordix.de/mitarbeiterAbteilung4.xsd',xml_schema);
    END;

    I believe you want CopyEvolve

  • When I register XML schema, if I set the GENTYPES=FALES.

    hi all,
    when I regist XML schema, if I set the GENTYPES=FALES. I also set xdb:storeVarrayAsTable="fales"
    do I still need to put annotation xdb:SQLType = "XXXXXX" in the .xsd file?
    when do I should set GENTYPES=FALES, when should set GENTYPES=FALES = TRUE.
    Thanks.
    Cow.

    I think you hit the wrong forum: it's about Berkeley DB XML, not Oracle DB
    Vyacheslav

  • How to register a schema use a .xsd file which has lots of includes schema

    Hello, All,
    Does someone have the experience to register a schema use a .xsd file which contains several tags like <xs:include schemaLocation="../dt/somedatatypes.xsd"/>?
    I tried both the OEM and command line dbms_xmlschema.registerSchema(), although the whole file structure already in the repository, seems like Oracle can't automatically search and find the includes and register it. should I register those includes first? the actual error I got is "ORA-31000: Resource '../dt/somedatatypes.xsd' is not an XDB schema document.ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0 ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26 ORA-06512: at line 2" .
    Any suggestion? thanks in advance...

    We do not (currently) support relative references in included XML Schemas.
    In order to use an include or import the target Schema must first be registered with XML DB under some known location. The schemaLocation argument needs to the 'Docuemnt Location Hint', or URL, that was passed to registerSchema when the included schema was registered.
    If you have cyclic dependancies between schemas you can use the force option of registerSchema to register the first Schema. This will then allow registration of the second schema to succeed. Once the second schema has been successfully registed the first schema must be explicitiy recompiled using dbms_xmlschema.compileSchema().

  • What is the best way to include an xml file in JSP?

    I have a jsp page that I need to include an xml file. The xml file
              uses an xsl to render the file. What is the best way to include the
              xml file and still maintain the structure of the style sheet?
              Thanks
              Jennifer
              

              The best way is using the tag lib. If you cannot, but you can use JAXP, you can
              try
              javax.xml.transform.Transformer.transform(Source xmlSource,
              Result outputTarget)
              throws TransformerException
              You construct the transformer with you xsl, use you xml file or DOM to form xmlSource,
              and use JSPWriter "out" to form outputTarget (StreamResult). But if your JSP page
              generates the xml itself, tag lib is the only way.
              [email protected] (Jennifer) wrote:
              >[email protected] (Jennifer) wrote in message news:<[email protected]>...
              >> I have a jsp page that I need to include an xml file. The xml file
              >> uses an xsl to render the file. What is the best way to include the
              >> xml file and still maintain the structure of the style sheet?
              >>
              >> Thanks
              >>
              >> Jennifer
              >
              >Or is there a way to parse the xml file with the jsp page to display
              >the information. I cannot use the Java Standard Tag Libraries as the
              >version of iplanet we are running does not support the JSTL
              >
              >Thanks
              >
              >Jennifer
              

Maybe you are looking for

  • Applying a preset after Auto Tone

    When I import a large batch of photographs (2000+) I want to firstly run Auto Tone to get the exposure in the right ball park. Once this is done, I want to apply my own preset. This adjusts most of the settings, EXCEPT exposure which I want to retain

  • Regarding SUS ASN Info

    Hi,          I am working on GRNSTATUS object in which ASN Number is one of the selection screen parameter.For example if ASN is created against DELINS i want to find GRnumber Corresponding ASN Number.Can any one guide me how to find the GRN. Thanks

  • C interpreter in Labview

    In order to build a script based Test System, someone has an Idea how to let LabView load at C like source text file and interpret it ? Is there some ressources existing for that ?

  • Security Update 2008-002 failed Software update install, now absent in SU

    So, I used Software Update to download and install Security Update 2008-002, but at after downloaded and going through install process, it never completed. I think it never even reached the optimizing part. So, I forced quit Software update. Backed u

  • Wot PSU??

    Hey ppl Need your advice on a PSU for this system I am building. I am thinking of the Antec 480W TrueBlue PSU. Because I have one and I love it but do u think it will be powerful enough? System Specs: 3.2Ghz/3.0Ghz P4 800FSB HT Abit IC7-MAX3. 1GB 433