XDB annotations on complex XML Schema

I am currently testing this in 11gr2 Express, while I wait for our DBA to upgrade our main AIX dev instance to 11gr2 enterprise edition.
I have a fairly complex xmlschema, provided by the IPTC and trying to annotate it to override some of the default sqltype mappings, but running into problems with how/where to annotate.
From what I have learned so far, annotations to override the sqltype mappings can only be done on complexType and simpleTypes. ComplexTypes must map to a sql object type, and simpleTypes map to a basic atomic sqlType.
How would you handle an instance where a complex type extends an xs:string.. but need to have this string map to a CLOB and not a varchar2(4000)?
<xs:element name="inlineData">
                                                  <xs:annotation>
                                                       <xs:documentation>A rendition of the content using plain-text or encoded inline data</xs:documentation>
                                                  </xs:annotation>
                                                  <xs:complexType>
                                                       <xs:simpleContent>
                                                            <xs:extension base="xs:string">
                                                                 <xs:attributeGroup ref="newsContentAttributes" />
                                                                 <xs:attributeGroup ref="newsContentTypeAttributes" />
                                                                 <xs:attribute name="encoding" type="QCodeType">
                                                                      <xs:annotation>
                                                                           <xs:documentation>The encoding applied to the content before inclusion</xs:documentation>
                                                                      </xs:annotation>
                                                                 </xs:attribute>
                                                                 <xs:attributeGroup ref="newsContentCharacteristics" />
                                                                 <xs:attributeGroup ref="i18nAttributes" />
                                                                 <xs:anyAttribute namespace="##other" processContents="lax" />
                                                            </xs:extension>
                                                       </xs:simpleContent>
                                                  </xs:complexType>
                                             </xs:element>Adding the xdb: mapUnboundedStringToLob annotation to element "inlineData" fails... not valid... and can't add it to the extension either.. so would a viable valid option in this case, be to create a simpleType, call it say "LargeStringToClob"..with a restriction of type xs:String... then annotate this simpleType to map it to a CLOB.
Then change the inlineData element extension from xs:string to "LargeStringToClob" ? I plan to use an XMLType column with BinaryXML storage...
I was hoping to not have to modify the xml schema too much, but I guess its to be expected when trying to map it into Oracle.
I am faced with a similar issue when trying to annotate for Timestamp with time zone...
some elements are declared as unions of other types. From what I have read, Oracle maps these to varchar2(4000)
Example:
<xs:simpleType name="DateOptTimeType">
          <xs:annotation>
               <xs:documentation>The type of a date (required) and a time (optional).</xs:documentation>
          </xs:annotation>
          <xs:union memberTypes="xs:date xs:dateTime" />
     </xs:simpleType>Even though this is a simpleType... I cannot annotate it to map it to a TimeStamp with Timezone ... would I have to again... create simpleTypes for each of the memberTypes in the union, annotate each one to map to Timestampt with time zone.. then use these new simpleTypes in the union?
Thanks for any tips or advice!

odie_63 wrote:
so if using Binary XML, you are stuck with what Oracle gives you? for instance, the inlineData element is an unbounded string in the schema... Oracle maps it to varchar2(4000).No, Binary XML stores data differently.
Consider this simple example :
SQL> begin
2   dbms_xmlschema.registerSchema(
3   schemaURL => 'test.xsd',
4   schemaDoc => '<?xml version="1.0"?>
5  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb">
6  <xs:element name="note" xdb:defaultTable="NOTES_TABLE">
7    <xs:complexType>
8      <xs:sequence>
9        <xs:element name="content" type="xs:string"/>
10        <xs:element name="dt" type="xs:dateTime"/>
11      </xs:sequence>
12    </xs:complexType>
13  </xs:element>
14  </xs:schema>',
15   local => true,
16   genTypes => false,
17   genTables => false,
18   enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE,
19   options => dbms_xmlschema.REGISTER_BINARYXML
20   );
21  end;
22  /
PL/SQL procedure successfully completed
SQL> CREATE TABLE notes_table OF XMLTYPE
2  XMLTYPE STORE AS binary xml
3  XMLSCHEMA "test.xsd"
4  ELEMENT "note"
5  ;
Table created
SQL> insert into notes_table values(xmltype(
2  '<note>
3  <content>'||lpad(to_clob('X'),8000,'X')||'</content>
4  <dt>2011-11-16T11:56:23+01:00</dt>
5  </note>'));
1 row inserted
SQL> select x.dt
2       , x.content
3       , length(x.content)
4  from notes_table t
5     , xmltable('/note' passing t.object_value
6       columns dt      timestamp with time zone  path 'dt'
7             , content clob                      path 'content'
8       ) x
9  ;
DT                                CONTENT                                                                          LENGTH(X.CONTENT)
16/11/11 11:56:23,000000 +01:00   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX              8000No issue in storing large strings.Very cool... that works... .. the string limit exceeded expcetion I got earlier was no fault to Binary XML.. but me pasting in too much text in SQLDeveloper insert statement.
I think I may have been on this for too long... brain is getting fuzzy ;-)
The approach you outline shows promise and I will go with BinaryXML storage option.
I need to decide whether to use virtual columns or non-trivial columns at this point, to enforce integrity constraints and possibly some partitioning. We do have a few relational lookup tables to tie into this as well... and will also need to implement VPD.

Similar Messages

  • XML Schema Collection (SQL Server 2012): Complex Schema Collection with Attribute - Should xs or xsd be used in the coding?

    Hi all,
    I just got a copy of the book "Pro SQL Server 2008 XML" written by Michael Coles (published by Apress) and try to learn the XML Schema Collection in my SQL Server 2012 Management Studio (SSMS2012). I studied Chapter 4 XML Collection of the book
    and executed the following code of Listing 4-8 Complex Schema with Attribute:
    -- Pro SQL Server 2008 XML by Michael Coles (Apress)
    -- Listing04-08.sql Complex XML Schema with Attribute
    -- shcColes04-08.sql saved in C:\\Documents\XML_SQL_Server2008_code_Coles_Apress
    -- 6 April 2015 8:00 PM
    CREATE XML SCHEMA COLLECTION dbo.ComplexTestSchemaCollection_attribute
    AS
    N'<?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="item">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="name" />
    <xs:element name="color" />
    <xs:group ref="id-price" />
    <xs:group ref="size-group" />
    </xs:sequence>
    <xs:attribute name="id" />
    <xs:attribute name="number" />
    </xs:complexType>
    </xs:element>
    <xs:group name="id-price">
    <xs:choice>
    <xs:element name="list-price" />
    <xs:element name="standard-cost" />
    </xs:choice>
    </xs:group>
    <xs:group name="size-group">
    <xs:sequence>
    <xs:element name="size" />
    <xs:element name="unit-of-measure" />
    </xs:sequence>
    </xs:group>
    </xs:schema>';
    GO
    DECLARE @x XML (dbo.ComplexTestSchemaCollection_attribute);
    SET @x = N'<?xml version="1.0"?>
    <item id="749" number="BK-R93R-62">
    <name>Road-150 Red, 62</name>
    <color>Red</color>
    <list-price>3578.27</list-price>
    <size>62</size>
    <unit-of-measure>CM</unit-of-measure>
    </item>';
    SELECT @x;
    GO
    DROP XML SCHEMA COLLECTION dbo.ComplexTestSchemaCollection_attribute;
    It worked nicely. But, I just found out the coding that was downloaded from the website of Apress and I just executed was different from the coding of Listing 4-8 listed in the book: all the <xs: ....> and </xs: ..> in my SSMS2012 are
    listed as <xsd:...> and </xsd:...> respectively in the book!!??  The same thing happens in the Listing 4-3 Simple XML Schema, Listing 4-5 XML Schema and Valid XML Document with Comple Type Definition, Listion 4-6 XML Schema and XML
    Document Document with Complex Type Using <sequence> and <choice>, and Listing 4-7 Complex XML Schema and XML Document with Model Group Definition (I executed last week) too.  I wonder: should xs or xsd be used in the XML
    Schema Collection of SSMS2012?  Please kindly help,  clarify this matter and explain the diffirence of using xs and xsd for me.
    Thanks in advance,
    Scott Chang   

    Hi Scott,
    Using xs or xsd depends on how you declare the namespace prefix.
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="item">
    I've posted a very good link in your last question, just in case you might have missed it, please see the below link.
    Understanding XML Namespaces
    In an XML document we use a namespace prefix to qualify the local names of both elements and attributes . A prefix is really just an abbreviation for the namespace identifier (URI), which is typically quite long. The prefix is first mapped to a namespace
    identifier through a namespace declaration. The syntax for a namespace declaration is:
    xmlns:<prefix>='<namespace identifier>'
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • XML schema size restrictions

    I was wondering what size restrictions there are on XML schemas? I'm developing a schema that has just raised the following error on registration.
    ERROR at line 1:
    ORA-31084: error while creating table "CAS"."swift564357_TAB" for element "swift564"
    ORA-01792: maximum number of columns in a table or view is 1000
    ORA-02310: exceeded maximum number of allowable columns in table
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 151
    ORA-06512: at line 828
    On removing a few elements from the schema it registers fine, but querying the generated table swift564xxx_TAB there is only ever one column, typed with an ADT that itself only has 5 elements. In fact there doesn't seem to be, on the face of it, any type that has more than 20-30 elements. Where does this error come from then?
    Unfortunately the schema exceeds the 20k limit on postings. I can split it up and post it in two parts if this would help.
    Thanks
    Marc

    Each attribute in the ADT and each attribute of attributes which are an ADT count as one column
    Here's a snippet from the next version of the doc that may help...
    3-20 Oracle XML DB Developer’s Guide, Rel. 1(10.1) Beta 2 Draft
    A number of issues can arise when working with large, complex XML Schemas.
    Sometimes the error "ORA-01792: maximum number of columns in a table or view
    is 1000" will be ecountered when registering an XML Schema or creating a table
    based on a global element defined by an XML Schema. This error occurs when an
    attempt is made to create an XMLType table or column based on a global element
    and the global element is defined as a complexType that contains a very large
    number of element and attribute definitions.
    The errors only occurs when creating an XMLType table or column that uses object
    relational storage. When object relational storage is selected the XMLType is
    persisted as a SQL Type. When a table or column is based on a SQL Type, each
    Registering an XML Schema with Oracle XML DB
    attribute defined by the Type counts as a column in the underlying table. If the SQL
    Type contains attributes that are based on other SQL Types, the attributes defined
    by those Types also count as columns in the underlying table. If the total number of
    attributes in all the SQL types exceeds the Oracle limits of 1000 columns in a table
    the storage table cannot be created.
    This means that as the total number of elements and attributes defined by a
    complexType approaches 1000, it is no longer possible to create a single Table that
    can manage the SQL Objects generated when an instance of the Type is stored in the
    database.
    In order to resolve this problem it is necessary to reduce the total number of
    attributes in the SQL Types that are used create the storage tables. Looking at the
    schema there are two approaches that can be used to achieve this:
    The first approach uses a ’top-down’ technique that uses multiple XMLType
    tables to manage the XML documents. This technique reduces the number of
    SQL attributes in the SQL Type heirarchy for a given storage table. As long as
    none of the tables need manage more than 1000 attributes the problem is
    resolved.
    The second approach uses a ’bottom-up’ technique that reduces the number of
    SQL attributes in the SQL Type herirarchy collapsing some of elements and
    attributes defined by the XMLSchema so that they are stored as a single CLOB.
    Both techniques rely on annotating the XML Schema to define how a particular
    complexType will stored in the database.
    In the case of the top down techniqueby the annotations SQLInline="false" and
    defaultTable are used to force some sub-elements within the XML Document to
    be stored as rows in a seperate XMLType table. Oracle XML DB maitains the
    relationship between the two tables using a REF of XMLType Good candidates
    for this approach are XML Schemas that define a choice where each element
    within the choice is defined as a complexType, or where the XML Schema
    defines an element based on a complexType that contains a very large number
    of element and attribute definitions.
    The bottom up technique involves reducing the total number of attributes in the
    SQL object types by choosing to store some of the lower level complexTypes as
    CLOBs, rather than objects. This is acieved by annotating the complexType or
    the usage of the complexType with SQLType="CLOB".
    Which technique is best depends on the application, and the kind of queries and
    updates that need to be performed against the data.

  • Problems using mathml XML Schema in XMLDB

    I have successfully loaded the hierarchy of XML Schema definition documents for the current 'mathml' by adjusting the relative paths in all include and import statements, and by forcing the load to overcome cyclic dependency issues.
    However when I try to create a table using the XMLTYPE or register another schema which is dependent on mathml I receive the following error:
    ERROR at line 1:
    ORA-31079: unable to resolve reference to group "Content-expr.class"
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 61
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 126
    ORA-06512: at line 14
    Having tried loading into both 9iR2 and 10GR2 databases and pasting the document containing the 'Content-expr.class' into the parent document (i.e. removing the include) I have come to the conclusion that there is a problem with the schema definition.
    However being new to XML I do not know what ths issue is as the file containing the definition (math.xsd) is included well before the references in the parent document.
    Here is the group definition corresponding to the offending reference:
    <xs:group name="Content-expr.class">
    <xs:choice>
    <xs:group ref="ContExpr.class"/>
    <xs:group ref="PresExpr.class"/>
    </xs:choice>
    </xs:group>
    I am also unable to trace which reference is causing the problem as there are several.
    Does anyone have any suggestions as to what could be causing this issue, or how I can obtain further diagnostics?
    Any help much appreciated.
    Robert Honeyman
    *********** New info ***************
    OK. I have tried further to register the schema, and have the following additional information.
    I determined that I thought my problem was cyclic dependencies being resolved ONLY by virtue of the parent file mathml2.xsd. I therefore pasted all the files together in include order so that this was no longer an issue. I then performed the following actions:
    1. I tried to register into Oracle 9iR2 database (9.2.0.4) and received the following error:
    ERROR at line 1:
    ORA-31151: Cyclic definition encountered for group: "Content-expr.class"
    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 line 14
    2. I then tried registering the schema into an Oracle 10G Release 2 database as well, and received the following error:
    ORA-31084: error while creating table "MEDLINE"."math729_TAB" for element
    "math"
    ORA-01792: maximum number of columns in a table or view is 1000
    ORA-02310: exceeded maximum number of allowable columns in table
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 61
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 126
    ORA-06512: at line 14
    My conclusions are as follows:
    1. 9iR2 (the version I was using at least 9.2.0.4) can't handle cyclic dependencies at all, or at least not complex ones.
    2. Neither 9iR2 or 10gR2 can handle cyclic dependencies (or other dependent definitions managed purely by virtue of a parent file with multiple include statements)
    3. 10gR2 can handle cyclic dependencies when they are all defined in the same file or resolved by an explicit include regardless of complexity.
    4. 10gR2 cannot handle highly complex XML Schema definitions due its limit of 1000 columns per table.
    Does anyone have any comments on these conclusions?
    I don't even want to handle Mathml, just another schema definition that imports it. I may try to make my own adjustments.
    Message was edited by:
    rhoneyman
    null

    Thanks, I found the relevant sections in the XML DB 10GR2 documentation (chapter 3 I think). As far as I can tell my options are to either use one of the following:
    - top-down technique creating tables for sub elements in the schema definition
    - bottom-up technique collapsing some of the lower elements into CLOBs (I guess this is semi-structured storage)
    The problem with Mathml is that it seems quite complex, with only one global schema element and many nested elements, hence only one table is created by XMLDB and it logically follows that we run out of columns.
    To get it to work is likely to involve a fair amount of manual schema modification, which incurs a maintenance overhead for me.
    It would be good if Oracle could provide a way of simplifying this maintenance of complex schemas to get them to be registered. I guess this would be increasing the number of columns alllowed for a table or offering some other parametric option for DBMS_XMLSCHEMA.REGISTER_SCHEMA that allowed a threshold and either a top-down or bottom-up approach to be taken automatically.
    For the time being I am using a simplified schema that does not depend on Mathml for my storage needs.

  • Help how to create full set of nested table with given xml schema?

    Hi everyone, I am new to oracle and programming language. Recently I was asked to create nested table with given a complex xml schema. I knew that after the registration of xsd file, oracle will generate few tables( including nested table) and types for the users. But it seems to be not complete set of tables. Can anyone please help me with the problem. Really thanks a lot on the help given. I would like to give extra explanation if what I have given above is not clear enough. Thanks

    How about posting the XML Schema, the code you used to register it, the database version you are using and the list of nested tables that were generated...

  • Registering an XML Schema (schema.xsd is not an XDB schema document)

    Hello there,
    I'm trying to work with XML DB for a few days now, so far i didn't do anything really usefull to me, but i managed to do some general things reading these forums and the documentation. Now however, i encounter this error registering an XML Schema:
    ERROR at line 1:
    ORA-31000: Resource 'www.ariase.com.xsd' is not an XDB schema document
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 82
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 102
    ORA-06512: at line 8I'm registering it with the following code:
    DBMS_XMLSCHEMA.registerSchema('www.ariase.com.xsd', XDBURIType('D:\Stage\Results\XSD_Target\www.ariase.com.xsd').getClob(),TRUE,TRUE,FALSE,TRUE);and this is the schema i'm registering:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true">
         <xs:element name="ariase" xdb:defaultTable="ARIASE">
              <xs:complexType xdb:maintainDOM="false">
                   <xs:sequence>
                        <xs:element name="ligne" type="typeLigne" xdb:SQLName="LIGNE"/>
                        <xs:element name="debit" type="typeDebit" xdb:SQLName="DEBIT"/>
                        <xs:element name="central" type="typeCentral" xdb:SQLName="CENTRAL"/>
                        <xs:element name="technologies" type="typeTechnologies" xdb:SQLName="TECHNOLOGIES"/>
                        <xs:element name="reseaux" type="typeReseaux" xdb:SQLName="RESEAUX"/>
                        <xs:element name="degroupage" type="typeDegroupage" xdb:SQLName="DEGROUPAGE"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <!-- Complex types -->
         <xs:complexType name="typeLigne" xdb:maintainDOM="false" xdb:SQLType="XML_TYPE_LIGNE">
              <xs:sequence>
                   <xs:element name="numero" type="typeNumero"/>
                   <xs:element name="longeur" type="xs:string"/>
                   <xs:element name="affaiblissement" type="xs:string"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="typeDebit" xdb:maintainDOM="false" xdb:SQLType="XML_TYPE_DEBIT">
              <xs:sequence>
                   <xs:element name="adsl2" type="xs:string"/>
                   <xs:element name="adsl" type="xs:string"/>
                   <xs:element name="readsl" type="xs:string"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="typeCentral" xdb:maintainDOM="false" xdb:SQLType="XML_TYPE_CENTRAL">
              <xs:sequence>
                   <xs:element name="code" type="xs:string"/>
                   <xs:element name="nom" type="xs:string"/>
                   <xs:element name="lieu" type="xs:string"/>
                   <xs:element name="lignes" type="xs:string"/>
                   <xs:element name="densite" type="xs:string"/>
                   <xs:element name="dslam" type="xs:string"/>
                   <xs:element name="plaque" type="xs:string"/>
                   <xs:element name="couvertures" type="typeCouvertures"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="typeCouvertures" xdb:maintainDOM="false" xdb:SQLType="XML_TYPE_COUVERTURES">
              <xs:sequence maxOccurs="unbounded">
                   <xs:element name="comunne" type="typeComunne"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="typeComunne" xdb:maintainDOM="false" xdb:SQLType="XML_TYPE_COMUNNE">
              <xs:sequence>
                   <xs:element name="nom" type="xs:string"/>
                   <xs:element name="couverture" type="xs:string"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="typeTechnologies" xdb:maintainDOM="false" xdb:SQLType="XML_TYPE_TECHNOLOGIES">
              <xs:sequence maxOccurs="unbounded">
                   <xs:element name="technologie" type="typeTechnologie"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="typeTechnologie" xdb:maintainDOM="false" xdb:SQLType="XML_TYPE_TECHNOLOGIE">
              <xs:sequence>
                   <xs:element name="nom" type="xs:string"/>
                   <xs:element name="central" type="xs:string"/>
                   <xs:element name="ligne" type="xs:string"/>
                   <xs:element name="reponse" type="xs:string"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="typeReseaux" xdb:maintainDOM="false" xdb:SQLType="XML_TYPE_RESEAUX">
              <xs:sequence maxOccurs="unbounded">
                   <xs:element name="reseau" type="typeReseau"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="typeReseau" xdb:maintainDOM="false" xdb:SQLType="XML_TYPE_RESEAU">
              <xs:sequence>
                   <xs:element name="nom" type="xs:string"/>
                   <xs:element name="adsl" type="xs:string"/>
                   <xs:element name="adsl2" type="xs:string"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="typeDegroupage" xdb:maintainDOM="false" xdb:SQLType="XML_TYPE_DEGROUPAGE">
              <xs:sequence maxOccurs="unbounded">
                   <xs:element name="fournisseur" type="typeFournisseur"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="typeFournisseur" xdb:maintainDOM="false" xdb:SQLType="XML_TYPE_FOURNISSEUR">
              <xs:sequence>
                   <xs:element name="nom" type="xs:string"/>
                   <xs:element name="totale" type="xs:string"/>
                   <xs:element name="tv" type="xs:string"/>
              </xs:sequence>
         </xs:complexType>
         <!-- Simple types -->
         <xs:simpleType name="typeNumero">
              <xs:restriction base="xs:string">
                   <xs:pattern value="[0-9]{10}"/>
              </xs:restriction>
         </xs:simpleType>
    </xs:schema>I'm using Oracle XE 2.1.0.00.39. Does this all look a bit OK, or am i way off here. I already managed to register the schema when it had a different name, and when it was in a different folder, so now i don't know what i'm doing wrong.
    Also i'd like to know what the best way is to insert 10.000s of XML documents in the database, is it possible to 'upload' them to the server, or will i always have to use an INSERT query to do this?
    I hope i gave enough information.
    Regards,
    Stijn

    THis looks wrong to me
    XDBURIType('D:\Stage\Results\XSD_Target\www.ariase.com.xsd').
    xdburitype() is used to reference an XML document that already been loaded into the XDB repository.
    You can load the document using FTP or WEBDAV or BFILENAME to any folder that already exists and you have write access to. By default this will probably be '/public' unless you have loaded the xdb_utilities package which is posted in this forum and create a '/home' folder for your user. For instance if you loaded the XSD into '/public' your code would look something like this..
    xdburitype('/public/www.ariase.com').getClob()
    However that would typically generate an error like this
    'SQL> exec DBMS_XMLSCHEMA.registerSchema('www.ariase.com.xsd', XDBURIType('D:\Stage\Results\XSD_Target\www.ariase.com.xsd').getClob(),TRUE,TR
    UE,FALSE,TRUE);
    BEGIN DBMS_XMLSCHEMA.registerSchema('www.ariase.com.xsd', XDBURIType('D:\Stage\Results\XSD_Target\www.ariase.com.xsd').getClob(),TRUE,TRUE,F
    ALSE,TRUE); END;
    ERROR at line 1:
    ORA-31001: Invalid resource handle or path name
    "D:\Stage\Results\XSD_Target\www.ariase.com.xsd"
    ORA-06512: at "SYS.XDBURITYPE", line 4
    ORA-06512: at line 1
    SQL>The error message you are seeing implies that the schema you are registering contains an import or include element with a schemalocation attribute that references 'www.ariase.com.xsd'
    Eg
    SQL> begin
      2    DBMS_XMLSCHEMA.registerSchema('www.ariase.com1.xsd',
      3  '<?xml version="1.0" encoding="UTF-8"?>
      4  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attri
      5     <xs:include schemaLocation="www.ariase.com.xsd"/>
      6     <xs:element name="root" type="xs:short">
      7             <xs:annotation>
      8                     <xs:documentation>Comment describing your root element</xs:documentation
      9             </xs:annotation>
    10     </xs:element>
    11  </xs:schema>',
    12  TRUE,TRUE,FALSE,TRUE);
    13  end;
    14
    15
    16  /
    begin
    ERROR at line 1:
    ORA-31000: Resource 'www.ariase.com.xsd' is not an XDB schema document
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 3
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 14
    ORA-06512: at line 2
    SQL>

  • Anyone register the full ACORD P&C XML schema in XDB?

    Hi -
    We are attempting to use Oracle’s XDB in a new project and are experiencing some issues. I am wondering if anyone has any experience with the following and could share or enlighten us as to the cause of our troubles.
    We have two test servers set up (10gR1 & 11gR1) and are trying to register the ACORD P&C XML Schema. It is a very large schema and it references a number of other NS and DTD’s.
    The most recent attempts to register this schema have resulted in out of memory errors.
    Has anyone registered the ACORD P&C XML Schema in Oracle Xdb? 10g or 11g?
    Has anyone attempted to register a schema that is 12 to 20MB in size?
    While, the schema is very large, the XML documents will only implement a small portion of it and should be small in size, <1MB. We need to perform Inserts, Updates and Deletes on the XDB data in addition to Selects joining this data to relational tables. It appears that structured storage fits this scenario the best. However, if someone has had some practical experience with both structured and unstructured and can share their thoughts, that would be helpful as well.
    I'm hoping someone has already faced and resolved this issue.
    Thanks in advance for any help!
    Mike
    Edited by: mriley99 on Sep 30, 2009 8:45 AM

    Your best place to ask this question would be the {forum:id=34} forum since that is for XML DB related questions. I would also information regarding how you are registering the schemas and the exact error(s) you are getting.

  • XML Schema: annotation

    Hello everybody,
    here is a minor problem:
    XML Schema allows an annotation as Child of schema:
    <schema
    blockDefault = #all or (possibly empty) subset of {equivClass, extension, list, restriction,
    reproduction} : ''
    finalDefault = #all or (possibly empty) subset of {extension, restriction, reproduction} : ''
    id = ID
    targetNamespace = uri-reference
    version = string>
    Content: ((include | import | annotation)* , ((simpleType | complexType | element | group |
    attributeGroup | notation) , annotation*)+)
    </schema>
    but when I use it as in
    <xsd:schema ...>
    <xsd:annotation>
    <xsd:documentation>
    MusiXML schema for music notation.
    Copyright [1999 - 2000] Gerd Castan.
    </xsd:documentation>
    </xsd:annotation>
    I get a message
    <Line 3, Column 60>: XSD-2027: (Error) Invalid element 'annotation' in 'schema'
    that seeems to be not correct to me.
    Cheers,
    Gerd

    Hi,
    This is a bug and will be fixed in the next release.
    Thanks,
    Oracle XML Team

  • Insert data into the xml schema-based xmltype table problem!

    Hello, there,
    I got problem in inserting data into the xmltype table after registered XML schema and created table. details see below:
    1) xml schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSpy v2007 sp2 (http://www.altova.com) by Constantin Ilea (EMERGIS INC) -->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.emergis.com/eHealth/EHIP/data/meta/profile:v1" targetNamespace="http://www.emergis.com/eHealth/EHIP/data/meta/profile:v1" elementFormDefault="qualified">
         <!-- ************** PART I: BEGIN SIMPLE OBJECT TYPE DEFINITIONS ********************************** -->
         <xs:simpleType name="RoutingType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="Synch"/>
                   <xs:enumeration value="Asynch"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="StatusType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="ACTIVE"/>
                   <xs:enumeration value="VOID"/>
                   <xs:enumeration value="PENDING"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="SenderApplicationType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="PR"/>
                   <xs:enumeration value="CR"/>
                   <xs:enumeration value="POS"/>
                   <xs:enumeration value="CPP"/>
                   <xs:enumeration value="Other"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="ServiceTypeType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="IS"/>
                   <xs:enumeration value="WS"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="RouteDirect">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="Request"/>
                   <xs:enumeration value="Reply"/>
                   <xs:enumeration value="None"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="Indicator">
              <xs:annotation>
                   <xs:documentation>can we also change the value to "ON" and "OFF" instead? in this way this cn be shared by all type of switch indicator</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="YES"/>
                   <xs:enumeration value="NO"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="RuleType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="ControlAct"/>
                   <xs:enumeration value="WSPolicy"/>
                   <xs:enumeration value="AccessControl"/>
                   <xs:enumeration value="Certification"/>
                   <xs:enumeration value="MessageConformance"/>
                   <xs:enumeration value="Variant"/>
                   <xs:enumeration value="Routing"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="HL7Result">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="ACCEPT"/>
                   <xs:enumeration value="REFUSE"/>
                   <xs:enumeration value="REJECT"/>
                   <xs:enumeration value="ACK"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="IIPType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="PUT"/>
                   <xs:enumeration value="GET/LIST"/>
                   <xs:enumeration value="NOTIF"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="ProfileTypeType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="IIPProfile"/>
                   <xs:enumeration value="BizOperationProfile"/>
                   <xs:enumeration value="OrchestrationProfile"/>
                   <xs:enumeration value="DomainObjectProfile"/>
                   <xs:enumeration value="ServiceProfile"/>
                   <xs:enumeration value="ExceptionProfile"/>
                   <xs:enumeration value="CustomizedProfile"/>
                   <xs:enumeration value="SystemProfile"/>
                   <xs:enumeration value="HL7XMLSchemaProfile"/>
                   <xs:enumeration value="EnricherParametersProfile"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="ParameterType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="String"/>
                   <xs:enumeration value="Object"/>
                   <xs:enumeration value="Number"/>
                   <xs:enumeration value="Document"/>
              </xs:restriction>
         </xs:simpleType>
         <!-- ************** PART I: END SIMPLE OBJECT TYPE DEFINITIONS ********************************** -->
         <!-- ************** PART II: BEGIN COMPLEX OBJECT TYPE DEFINITIONS ********************************** -->
         <!-- *********************** begin new added objects, by rshan *************************************** -->
         <xs:complexType name="ProfileType">
              <xs:annotation>
                   <xs:documentation>
              1.Profile IS USED TO BE AN WRAPPER ELEMENT FOR ALL KIND OF PROFILES NO MATTER WHAT KIND OF PROFILE IT IS
              2.ProfileID used to uniquely identify the current profile
              3.ProfileData used to hold all the necessary profile related data
              </xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="ProfileID" type="ProfileIDType">
                        <xs:annotation>
                             <xs:documentation>this will hold all the common attributes, espically the global unique identifier to the profile, no matter what type of profile is</xs:documentation>
                        </xs:annotation>
                   </xs:element>
                   <xs:element name="ProfileData" type="ProfileDataType">
                        <xs:annotation>
                             <xs:documentation>all the non-common profile meta data that attached to each specific profile type such as IIPProfile, OrchestrationProfile, and BizOperationProfile will be placed here</xs:documentation>
                        </xs:annotation>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="ProfileIDType">
              <xs:annotation>
                   <xs:documentation>global unique identifier and all the common attributes across all different profiles, the @ID and @Type together will be used as the primary key to identify the profile data</xs:documentation>
              </xs:annotation>
              <xs:attribute name="ID" type="xs:ID" use="required">
                   <xs:annotation>
                        <xs:documentation>ID is the global unique identifier to the profile, no matter what type of profile it is</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
              <xs:attribute name="Name"/>
              <xs:attribute name="Description"/>
              <xs:attribute name="Version">
                   <xs:annotation>
                        <xs:documentation>version of the profile data</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
              <xs:attribute name="Type" type="ProfileTypeType" use="required">
                   <xs:annotation>
                        <xs:documentation>value to identify the ProfileType type within
                        IIPProfile,BizOperationProfile,OrchestrationProfile,DomainObjectProfile
                        ServiceProfile,ExceptionProfile,SystemProfile,HL7XMLSchemaProfile,
                        EnricherParametersProfile,CustomizedProfile
                        </xs:documentation>
                   </xs:annotation>
              </xs:attribute>
              <xs:attribute name="Status" type="StatusType" default="ACTIVE">
                   <xs:annotation>
                        <xs:documentation>used to show the related profile data status like "ACTIVE","PENDING","VOID"...</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
              <!--
              <xs:sequence>
                   <xs:element name="ProfileReference" type="ProfileIDType" minOccurs="0" maxOccurs="unbounded">
                        <xs:annotation>
                             <xs:documentation>this will be the place to hold the integrity relationship with other profiles like foreign key if existed and necessary to show up</xs:documentation>
                        </xs:annotation>
                   </xs:element>
              </xs:sequence>
              -->
         </xs:complexType>
         <xs:complexType name="ProfileDataType">
              <xs:annotation>
                   <xs:documentation>meta data associated tightly to each specific type of profile</xs:documentation>
              </xs:annotation>
              <xs:choice>
                   <xs:element name="EnricherParametersProfileData" type="EnricherParametersDataType">
                        <xs:annotation>
                             <xs:documentation>Enricher Parameters related profile data
                   1. one instance of this type may contains all the related System metadata.
                   2. idType part may use to identify different version/release/status
                   </xs:documentation>
                        </xs:annotation>
                   </xs:element>
                   <xs:element name="ExtendProfileData" type="ExtendProfileDataType">
                        <xs:annotation>
                             <xs:documentation>If needed, any profile data not defined within the current release scope can be added here </xs:documentation>
                        </xs:annotation>
                   </xs:element>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="ExtendProfileDataType">
              <xs:sequence>
                   <xs:element name="ExtendProfile" type="xs:anyType" minOccurs="0"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="EnricherParametersDataType">
              <xs:sequence>
                   <xs:element name="EnricherParameter" type="EnricherParameter" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="EnricherParameter">
              <xs:sequence>
                   <xs:element ref="Enricher"/>
              </xs:sequence>
              <xs:attribute name="serviceName" type="xs:string" use="required"/>
              <xs:attribute name="interactionID" type="xs:string"/>
         </xs:complexType>
         <xs:element name="Enricher">
              <xs:annotation>
                   <xs:documentation>Comment describing your root element</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Parameters" type="Parameters"/>
                        <xs:element ref="Section" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="ValueType">
              <xs:attribute name="field" use="required"/>
              <xs:attribute name="value"/>
              <xs:attribute name="action"/>
         </xs:complexType>
         <xs:element name="Section">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Value" type="ValueType" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Section" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
                   <xs:attribute name="path" use="required"/>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="Parameters">
              <xs:sequence>
                   <xs:element name="Parameter" minOccurs="0" maxOccurs="unbounded">
                        <xs:complexType>
                             <xs:attribute name="name" use="required"/>
                             <xs:attribute name="reference"/>
                        </xs:complexType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RuleList">
              <xs:annotation>
                   <xs:documentation>an array of rules</xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="Rule" type="RuleProfile" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RuleProfile">
              <xs:attribute name="RName" use="required"/>
              <xs:attribute name="RType" type="RuleType" use="required"/>
              <xs:attribute name="Status" default="ON">
                   <xs:annotation>
                        <xs:documentation>By default is ON (or if is missing)</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
              <xs:attribute name="Order"/>
              <xs:attribute name="Direction" type="RouteDirect">
                   <xs:annotation>
                        <xs:documentation>Request / Reply</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
         </xs:complexType>
         <!-- ************** PART II: END COMPLEX OBJECT TYPE DEFINITIONS *********************************** -->
         <!-- ************** PART III: BEGIN ROOT ELEMENTS DEFINITIONS ********************************* -->
         <!-- 0) Profile wrapper root element
    Profile IS USED TO BE AN WRAPPER ELEMENT FOR ALL KIND OF PROFILES NO MATTER WHAT KIND OF PROFILE IT IS
    -->
         <xs:element name="Profile" type="ProfileType">
              <xs:annotation>
                   <xs:documentation>Profile IS USED TO BE AN WRAPPER ELEMENT FOR ALL KIND OF PROFILES NO MATTER WHAT KIND OF PROFILE IT IS</xs:documentation>
              </xs:annotation>
         </xs:element>
    </xs:schema>
    2)register xml schema:
    SQL> begin
    2 dbms_xmlschema.registerSchema
    3 (
    4 schemaurl=>'http://rac3-1-vip:8080/home/'||USER||'/xsd/EHIPProfile_v00.xsd',
    5 schemadoc=>xdbURIType('/home/'||USER||'/xsd/EHIPProfile_v00.xsd').getClob(),
    6 local=>True,
    7 gentypes=>True,
    8 genbean=>False,
    9 gentables=>False
    10 );
    11 End;
    12 /
    PL/SQL procedure successfully completed.
    SQL>
    SQL>
    3) xml data:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy v2007 sp2 (http://www.altova.com)-->
    <Profile xmlns="http://www.emergis.com/eHealth/EHIP/data/meta/profile:v1">
         <ProfileID Type="EnricherParametersProfile" Status="ACTIVE" ID="EnricherPP.ID.0001" Name="EnricherPP.ID.0001" Description="EnricherPP.ID.0001" Version="01"/>
         <ProfileData>
              <EnricherParametersProfileData>
                   <EnricherParameter serviceName="LRS_BusinessDomainObject.lrs.businessDomainObject.domainObjectBuilder.concrete.ExceptionCreators:createExceptionV50CategoryCanonicalPart" interactionID="">
                   <Enricher>
                        <Parameters>
                             <Parameter name="MESSAGE_ID" reference="test"/>
                        </Parameters>
                        <Section path="HEADER">
                             <Section path="RESPONSE_TYPE">
                                  <Value field="value" value="I"/>
                             </Section>
                             <Section path="HL7_STANDARD_VERSION">
                                  <Value field="value" value="HL7V3"/>
                             </Section>
                             <Section path="DESIRED_ACKNOWLEDGMENT_TYPE">
                                  <Value field="value" value="NE"/>
                             </Section>
                             <Section path="SENDING_NETWORK_ADDRESS">
                                  <Value field="value" value=""/>
                             </Section>
                             <Section path="SENDING_APPLICATION_IDENTIFIER">
                                  <Value field="root" value="2.16.840.1.113883.3.133.1.3"/>
                                  <Value field="extension" value=""/>
                             </Section>
                             <Section path="SENDING_APPLICATION_NAME">
                                  <Value field="value" value="NL HIAL"/>
                             </Section>
                        </Section>
                   </Enricher>
         </EnricherParameter>
              <EnricherParameter serviceName="LRS_BusinessDomainObject.lrs.businessDomainObject.domainObjectBuilder.concrete.DomainObjectCreators:createFindClientsAssociatedIdentifersRequestObject" interactionID="PRPA_IN101105CA">
                   <Enricher>
                        <Parameters>
                             <Parameter name="MESSAGE_ID" reference="test"/>
                        </Parameters>
                        <Section path="HEADER">
                             <Section path="RESPONSE_TYPE">
                                  <Value field="value" value="I"/>
                             </Section>
                             <Section path="HL7_STANDARD_VERSION">
                                  <Value field="value" value="HL7V3"/>
                             </Section>
                             <Section path="PROCESSING_CODE">
                                  <Value field="value" value="T"/>
                             </Section>
                             <!--
                             <Section path="PROCESSING_MODE_CODE">
                                  <Value field="value" value="T"/>
                             </Section>
                             -->                         
                             <Section path="DESIRED_ACKNOWLEDGMENT_TYPE">
                                  <Value field="value" value="NE"/>
                             </Section>
                             <Section path="RECEIVER_NETWORK_ADDRESS">
                                  <Value field="value" value="prsunew.moh.hnet.bc.ca"/>
                             </Section>
                             <Section path="RECEIVER_APPLICATION_IDENTIFIER">
                                  <Value field="root" value="2.16.840.1.113883.3.40.5.1"/>
                                  <Value field="extension" value=""/>
                             </Section>
                             <Section path="SENDING_NETWORK_ADDRESS">
                                  <Value field="value" value=""/>
                             </Section>
                             <Section path="SENDING_APPLICATION_IDENTIFIER">
                                  <Value field="root" value="2.16.840.1.113883.3.133.1.3"/>
                                  <Value field="extension" value=""/>
                             </Section>
                             <Section path="SENDING_APPLICATION_NAME">
                                  <Value field="value" value="NL HIAL"/>
                             </Section>
                        </Section>
                   </Enricher>
         </EnricherParameter>
              <EnricherParameter serviceName="LRS_BusinessDomainObject.lrs.businessDomainObject.domainObjectBuilder.concrete.DomainObjectContentEnrichers:enrichPRRequest" interactionID="">
    <!--Sample XML file generated by XMLSpy v2007 sp2 (http://www.altova.com)-->
    <Enricher>
         <Parameters>
              <Parameter name="MESSAGE_IDENTIFIER" reference="test"/>
         </Parameters>
         <Section path="HEADER">
              <Section path="HL7_STANDARD_VERSION">
                   <Value field="value" value="V3PR2"/>
              </Section>
              <!--POS/CPP populated ?-->
              <!--Not sure if this should be set as a variance within EHIP or if we expect the POS/CPP to provide this value-->
              <Section path="PROCESSING_CODE">
                   <Value field="value" value="T"/>
              </Section>
              <!--POS/CPP populated ?-->
              <Section path="PROCESSING_MODE_CODE">
                   <Value field="value" value="T"/>
              </Section>
              <!--POS/CPP populated ?-->
              <Section path="DESIRED_ACKNOWLEDGMENT_TYPE">
                   <Value field="value" value="NE"/>
              </Section>
              <!-- note:We Expect PRS to give us a web service address -->                    
              <!--<Section path="RECEIVER_NETWORK_ADDRESS">
                   <Value field="value" value="_http://PRSServer/svcName"/>
              </Section>
              -->
              <Section path="RECEIVER_APPLICATION_IDENTIFIER[0]">
                   <Value field="root" value="2.16.840.1.113883.3.40.1.14"/>
                   <Value field="extension" value="SIT1"/>
              </Section>
              <!-- note: values of the fields to be provided by PRS -->
              <Section path="RECEIVER_APPLICATION_NAME[0]">
                   <Value field="value" value="receiverAppName"/>
              </Section>
              <!-- note: RECEIVER_ORGANIZATION has an extra trailing space, as in the Excel mapping spreadsheet -->
              <!-- note: values of the fields to be specified by PRS later -->
              <Section path="RECEIVER_AGENT/RECEIVER_ORGANIZATION/RECEIVER_ORGANIZATION_IDENTIFIER[0]">
                   <Value field="root" value="2.16.840.1.113883.3.40.4.1"/>
                   <Value field="extension" value="receiverOrgId"/>
              </Section>
              <Section path="SENDING_APPLICATION_NAME[0]">
                   <Value field="value" value="NLPRSCLNT"/>
              </Section>
              <!-- note: SENDING_ORGANIZATION has an extra trailing space, as in the Excel mapping spreadsheet -->
              <!-- note: values of the fields to be specified by PRS later -->
              <Section path="SENDING_AGENT/SENDING_ORGANIZATION/SENDING_ORGANIZATION_IDENTIFIER[0]">
                   <Value field="root" value="2.16.840.1.113883.4.3.57"/>
                   <Value field="extension" value="3001"/>
              </Section>
              <Section path="PERFORMER/HEALTHCARE_WORKER_IDENTIFIER[0]">
                   <Value field="root" value="2.16.840.1.113883.4.3.57"/>
                   <Value field="extension" value="HIAL_USR"/>
              </Section>          
         </Section>
         <Section path="PAYLOAD">
              <!--<Section path="QUERY_STATUS_CODE">
                   <Value field="value" value="New"/>
              </Section>-->
              <!-- note: AUDIT has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="AUDIT[0]/AUDIT_INFORMATION">
                   <Value field="code" value="LATEST"/>
                   <Value field="codeSystem" value="PRSAuditParameters"/>
              </Section>
              <!-- note: CONFIDENCE has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="CONFIDENCE/CONFIDENCE_VALUE">
                   <Value field="value" value="100"/>
              </Section>
              <!-- note: HISTORY has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="HISTORY/INCLUDE_HISTORY_INDICATOR">
                   <Value field="value" value="false"/>
              </Section>
              <!-- note: JURISDICTION has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="JURISDICTION/JURISDICTION_TYPE">
                   <Value field="value" value="NL"/>
              </Section>
              <!-- note: RESPONSE_OBJECT has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[0]">
                   <Value field="code" value="GRS_ADDRESS"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[1]">
                   <Value field="code" value="GRS_ELECTRONIC_ADDRESS"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[2]">
                   <Value field="code" value="GRS_IDENTIFIER"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[3]">
                   <Value field="code" value="GRS_ORGANIZATION_NAME"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[4]">
                   <Value field="code" value="GRS_PERSONAL_NAME"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[5]">
                   <Value field="code" value="GRS_REGISTRY_IDENTIFIER"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[6]">
                   <Value field="code" value="GRS_TELEPHONE"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[7]">
                   <Value field="code" value="PRS_CONDITION"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[8]">
                   <Value field="code" value="PRS_CONFIDENTIALITY_INDICATOR"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[9]">
                   <Value field="code" value="PRS_DEMOGRAPHIC_DETAIL"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[10]">
                   <Value field="code" value="PRS_DISCIPLINARY_ACTION"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[11]">
                   <Value field="code" value="PRS_INFORMATION_ROUTE"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[12]">
                   <Value field="code" value="PRS_NOTE"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[13]">
                   <Value field="code" value="PRS_PROVIDER_CREDENTIAL"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[14]">
                   <Value field="code" value="PRS_PROVIDER_EXPERTISE"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[15]">
                   <Value field="code" value="PRS_PROVIDER_RELATIONSHIP"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[16]">
                   <Value field="code" value="PRS_STATUS"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[17]">
                   <Value field="code" value="PRS_WORK_LOCATION"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[18]">
                   <Value field="code" value="PRS_WORK_LOCATION_ADDRESS"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[19]">
                   <Value field="code" value="PRS_WORK_LOCATION_DETAIL"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[20]">
                   <Value field="code" value="PRS_WORK_LOCATION_ELECTRONIC_ADDRESS"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[21]">
                   <Value field="code" value="PRS_WORK_LOCATION_INFORMATION_ROUTE"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[22]">
                   <Value field="code" value="PRS_WORK_LOCATION_TELEPHONE"/>
              </Section>
              <!-- note: ROLE_CLASS has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="ROLE_CLASS /ROLE_CLASS_VALUE">
                   <Value field="value" value="LIC"/>
              </Section>
              <Section path="SORT_CONTROL[0]/SORT_CONTROL_ELEMENT_NAME">
                   <Value field="code" value="PrincipalPerson.name.value.family"/>
              </Section>
              <Section path="SORT_CONTROL[0]/SORT_CONTROL_DIRECTION_CODE">
                   <Value field="value" value="A"/>
              </Section>
         </Section>
    </Enricher>
         </EnricherParameter>
              </EnricherParametersProfileData>
         </ProfileData>
    </Profile>
    the data is valid against the schema through XML Spy tool... and loaded into the XDB repository...
    4) create table and insert data:
    SQL> CREATE TABLE EHIP_PROFILE OF SYS.XMLTYPE
    2 XMLSCHEMA "http://rac3-1-vip:8080/home/EHIPSBUSER1/xsd/EHIPProfile_v00.xsd" ELEMENT "Profile"
    3 ;
    Table created.
    SQL>
    SQL> alter table EHIP_PROFILE
    2 add CONSTRAINT EHIP_PROF_PK PRIMARY KEY(XMLDATA."ProfileID"."ID",XMLDATA."ProfileID"."Type");
    Table altered.
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> select xdbURIType('/home/'||USER||'/ProfileData/EnricherPP.ID.0001.xml').getClob() from dual;
    XDBURITYPE('/HOME/'||USER||'/PROFILEDATA/ENRICHERPP.ID.0001.XML').GETCLOB()
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy
    SQL>
    SQL>
    SQL> insert into ehip_profile values(xmltype.createXML(xdbURIType('/home/'||USER||'/ProfileData/EnricherPP.ID.0001.xml').getClob()));
    insert into ehip_profile values(xmltype.createXML(xdbURIType('/home/'||USER||'/ProfileData/EnricherPP.ID.0001.xml').getClob()))
    ERROR at line 1:
    ORA-21700: object does not exist or is marked for delete
    what's the problem caused the "ORA-21700: object does not exist or is marked for delete" error?
    Thanks in advance for your help?

    Thanks Marco,
    Here're my environment:
    SQL> select INSTANCE_NUMBER, INSTANCE_NAME,HOST_NAME,VERSION from v$instance;
    INSTANCE_NUMBER INSTANCE_NAME HOST_NAME VERSION
    2 rac32 RAC3-2 10.2.0.3.0
    I followed your suggested in the above, and always purge recyclebin, but still got the same problem. because in 10gr2, there's no dbms_xmlschema.purge_schema available,
    and I did checked the recyclebin after force the delete of schema, nothing inside. any other recommendation?

  • XML Schema any element

    I have a list of schema files and they a number of elements in them. But for my data extraction i use only close to 300 tags. When i register the schema I get an error that a table cannot of have more than 1000 columns. My work mate is working on Annotations and I am planning to build a new schema to make extract only these 300 tag names and also make sure the XML file can be validated like it did earlier. Explaining this i came across a complex type element called *<any>* which can be used to allow elements to be available which are not declared within the schema file.
    My Original schema file looks something like below,
    <xsd:complexType name="WfInformation">
    <xsd:all minOccurs="0">
    <xsd:element name="Company" type="WfCompany" minOccurs="0" />
    <xsd:element name="HeadOffice" type="WfOffice" minOccurs="0" />
    <xsd:element name="IndependentOffice" type="WfIOffice" minOccurs="0" />
    <xsd:element name="AffiliateCompany" type ="WfIAOffice" minOccurs="0" />
    <xsd:element name="Number" type="xsd:string" minOccurs="0" />
    <xsd:element name="ReferenceID" type="xsd:string" minOccurs="0" />
    </xsd:all>
    </xsd:complexType>
    of the above list of items i use only elements Company, HeadOffice, Number. After reading through some documentation I wanted to <any> tag like below,
    <xsd:complexType name="WfInformation">
    *<xsd:sequence>*
    <xsd:element name="Company" type="WfCompany" minOccurs="0" />
    <xsd:element name="HeadOffice" type="WfOffice" minOccurs="0" />
    *<xsd:any processContents="lax"/>*
    *<xsd:any processContents="lax"/>*
    <xsd:element name="Number" type="xsd:string" minOccurs="0" />
    *<xsd:any processContents="lax"/>*
    *</xsd:sequence>*
    </xsd:complexType>
    My question is if I am correcting the lines as i mentioned above will be Register schema again fail with same reason that i have 1000 columns. As i understand every element inside an Complex element is stored as a column value. In that case will this redesign work. Or is there any other way to approach re-desgin the XML Schema.

    Thanks. I think that leaves out my option to create a totally new Schema to suit my XML files.
    Only other option we have is to use Annotations.
    I think my colleague - eoin62 would have shared the XML Schema files earlier through your oracle email address.
    Please refer thread - How to register multiple XSD files
    But we received a reply and we knew very little on how to make changes to Admin.xsd and how would that solve our problem. Please correct me if i am incorrect. Because the biggest Schema was estimate.xsd that has close to 800+ elements. I am not sure if my colleague sent you the necessary tag names we use within the Schema. We have close to around 300 tags we use. But our combined XML Schema has close to 1600+ If we have to annotate, i thought it would be better we tell Oracle which tagswe need, which inturn should should help better create XMLtype table against a Schema and work on performance.
    Your earlier reply was,
    Basically in XML Schema Admin.xsd element AdminCompin WorkfileTypeneeds to be stored Out of line..
    Add the annotations xdb:SQLInline=”false” and xdb:defaultTable=”ADMIN_COMP_XML”. to the element..
    if you can share with our XML Schema on how to annotate or if you can share a location that shows how an annotated or non-annotated Schema works that would help us correcting our Schema files.
    Thanks for all your support. We have gone a long way in XML Parsing in the last 6 weeks.
    Edited by: beta32c on Feb 19, 2013 12:09 AM

  • JAXB 1.3 can't parse W3 SOAP 2003-05 envelope XML schema

    Hello,
    I was trying to use JAXB to parse the MMAP schema from the SMS Forum
    (http://www.smsforum.net/schemas/mmap/v1.0/mmap.xsd). I finally
    tracked it down to XJC choking on the included SOAP envelope schema's
    use of the xml:lang attribute for a tag called reasontext. Here's the
    pared-down test case:
    C:\java\src\baz>%JWSDP_HOME%\jaxb\bin\xjc.bat http://www.w3.org/2003/05/soap-envelope/soap-envelope.xsd
    %JWSDP_HOME%\jaxb\bin\xjc.bat http://www.w3.org/2003/05/soap-envelope/soap-envelope.xsd
    parsing a schema...
    [ERROR] src-resolve: Cannot resolve the name 'xml:lang' to a(n) attribute declaration component.
      line 97 of soap-envelope.xsd
    [ERROR] src-ct.0.1: Complex Type Definition Representation Error for type 'reasontext'.  Element 'attribute' is invalid, misplaced, or occurs too often.
      line 97 of soap-envelope.xsd
    Failed to parse a schema.
    C:\java\src\baz>I believe that the relevant portions of the schemas and namespaces in
    question are:
    http://www.w3.org/2003/05/soap-envelope/soap-envelope.xsd
    <xs:complexType name="reasontext">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute ref="xml:lang" use="required" />
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>http://www.w3.org/2001/XMLSchema.xsd
    <xs:complexType name="attribute" mixed="false">
    <xs:complexContent>
    <xs:extension base="xs:annotated">
    <xs:sequence>
    <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType" />
    </xs:sequence>
    <xs:attributeGroup ref="xs:defRef" />
    <xs:attribute name="type" type="xs:QName" />
    <xs:attribute name="use" use="optional" default="optional">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="prohibited" />
    <xs:enumeration value="optional" />
    <xs:enumeration value="required" />
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="default" type="xs:string" />
    <xs:attribute name="fixed" type="xs:string" />
    <xs:attribute name="form" type="xs:formChoice" />
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>http://www.w3.org/2001/XMLSchema.xsd
    <xs:attributeGroup name="defRef">
    <xs:annotation>
    <xs:documentation>for element, group and attributeGroup, which both define and reference</xs:documentation>
    </xs:annotation>
    <xs:attribute name="name" type="xs:NCName" />
    <xs:attribute name="ref" type="xs:QName" />
    </xs:attributeGroup>http://www.w3.org/XML/1998/namespace
    The namespace whose name is http://www.w3.org/XML/1998/namespace is
    bound by definition to the prefix xml: according to Namespaces in XML,
    W3C Recommendation 14 Jan 1999. Note that unlike all other XML
    namespaces, both the name and the prefix are specified; i.e., if you
    want XML 1.0 processors to recognize this namespace, you must use the
    reserved prefix xml:.
    xml:lang and xml:space
    As of the last update of this document, the XML 1.0 Specification
    defines two attribute names in this namespace:
    xml:lang
    Designed for identifying the human language used in the scope of the
    element to which it's attached.
    .I'm no XML schema expert, but it looks to me like "name" and "ref"
    are both valid attributes for an <xs:attribute> tag and that the XML
    namespace standard requires XML processors to recognize the xml:lang
    attribute. Hence, this appears to me to be a bug in JAXB.
    A secondary bug is that the original error message left the name of
    the offending included schema blank:
    C:\java\src\foo>d:\java\jwsdp\jwsdp-1.3\jaxb\bin\xjc.bat http://www.smsforum.net/schemas/mmap/v1.0/mmap.xsd
    parsing a schema...
    [ERROR] src-resolve: Cannot resolve the name 'xml:lang' to a(n) attribute declaration component.
      line 97 of
    [ERROR] src-ct.0.1: Complex Type Definition Representation Error for type 'reasontext'.  Element 'attribute' is invalid, misplaced, or occurs too often.
      line 97 of
    Failed to parse a schema.
    C:\java\src\foo>In case it helps with problem diagnosis, I'm running with J2SDK 1.4.2
    and have copied the endorsed jar files into the JRE lib as instructured
    with JAXB:
    C:\java\src\baz>java -version
    java -version
    java version "1.4.2"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
    Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
    C:\java\src\baz>dir %JAVA_HOME%\jre\lib\endorsed
    dir %JAVA_HOME%\jre\lib\endorsed
    Volume in drive D has no label.
    Volume Serial Number is 70AE-6E52
    Directory of D:\java\j2se\j2sdk1.4.2\jre\lib\endorsed
    03/31/2004  09:41 AM    <DIR>          .
    03/31/2004  09:41 AM    <DIR>          ..
    03/29/2004  01:28 PM            56,619 dom.jar
    03/29/2004  01:28 PM            60,963 sax.jar
    03/29/2004  01:28 PM         2,823,241 xalan.jar
    03/29/2004  01:28 PM         2,667,618 xercesImpl.jar
    10/10/2003  06:36 PM         1,379,810 xsltc.jar
                   6 File(s)      6,989,573 bytes
                   2 Dir(s)   7,889,731,584 bytes free
    C:\java\src\baz>I'm quite interested in the resolution of this issue as I'm stopped in
    my tracks on progress here. Help with resolution, whether in JAXB or
    my usage of it, will be much appreciated. I did a search of existing
    issues but didn't notice a duplicate. Thanks in advance.

    I have also come across a similar problem with validating an xml file with an xml:lang attribute. It seems to be common across the schema validation and dtd validation. I get the following error with both schema and dtd validation:
    Validation Error Msg (0): unexpected attribute "xml:lang"
    Validation Error Location (0): FreeFormText
    The test file extract looks like this:
    <FreeFormText xml:lang="EN">Pelle</FreeFormText>
    The schema defines the node as:
    <xs:complexType name="FreeFormText">
              <xs:simpleContent>
                   <xs:extension base="FreeFormTextType">
                        <xs:attribute name="lang" type="xs:language"/>
                   </xs:extension>
              </xs:simpleContent>
    </xs:complexType>
    and the dtd defines the node as:
    <!ELEMENT FreeFormText
         (#PCDATA)>
    <!ATTLIST FreeFormText xml:lang CDATA #IMPLIED >
    This looks like a bug in JAXB to me aswell. Any help on it would be much appreciated as i am also stuck.

  • Unable to create xml from xml schema

    JDeveloper 10.1.3 EA1
    I am unable to create a new xml file from an xml schema when the starting root element is a complex type (but it works with a simple type). It does not matter if the xml schema is registered within JDeveloper.
    Is this a bug or intended behaviour?
    Error message:
    ''XML Document from XML Schema creation could not be competed succesfully. Make sure the source schema is valid and that you have write permissions to the output directory."
    NB The xml schema is valid and I have write permissions on the specified directory.

    When I do not register this (or other) schema with JDeveloper, I can create an xml document from xml schema. However, when I register this schema and then try to generate an xml document (either from the registered xsd either from a filesystem xsd) with person as starting node it fails with the mentioned error. However, when I use city as starting node it is generated successfully.
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.amis.nl/demo/hrm"
    targetNamespace="http://www.amis.nl/demo/hrm"
    elementFormDefault="qualified">
    <xsd:element name="person">
    <xsd:annotation>
    <xsd:documentation>
    A sample complex element
    </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="name" type="xsd:string"/>
    <xsd:element name="length" type="xsd:int"/>
    <xsd:element name="weight" type="xsd:int" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="city" type="xsd:string">
    <xsd:annotation>
    <xsd:documentation>
    A sample simple element.
    </xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    </xsd:schema>

  • How can I  refer an xml  Schema that was registred in Oracle xml DB

    How can I refer an xml Schema that was registred in Oracle xml DB, from other xml schema?
    I have the follow schema,:
    <?xml version="1.0" encoding="AL32UTF8"?>
    <xsd:schema targetNamespace="schemastipostasa.xsd"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb/XDBSchema.xsd"
    elementFormDefault="unqualified" version="1.0"
    attributeFormDefault="unqualified">
    <xsd:simpleType name="codigosType" xdb:SQLType="NUMBER(4)">
    <xsd:restriction base="xsd:positiveInteger" >
    <xsd:totalDigits value="4" />
    </xsd:restriction>
    </xsd:simpleType >
    <xsd:simpleType name="integerUnoType" xdb:SQLType="NUMBER(1)">
    <xsd:restriction base="xsd:int" >
    <xsd:totalDigits value="1" />
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="condicionType" xdb:SQLType="VARCHAR2(1)">
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="S" >
    <xsd:annotation>
    <xsd:documentation>Condicion si es S</xsd:documentation>
    </xsd:annotation>
    </xsd:enumeration>
    <xsd:enumeration value="N" >
    <xsd:annotation>
    <xsd:documentation>Condicion no es N</xsd:documentation>
    </xsd:annotation>
    </xsd:enumeration>
    </xsd:restriction>
    </xsd:simpleType >
    </xsd:schema>
    I registred the schema written above with the folowwing pl*sql :
    DECLARE
    direc varchar2(2000);
    nombreArch BFILE;
    mens varchar2(2000);
    BEGIN
    direc:=uso_comun.pack_mail.fun_valor_param('TASA','DIR_DBSERVER');
    nombreArch:=bfilename(direc,'schemas_tipos_tasa.xsd');
    DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL => 'http://xmlns.oracle.com/tasa/schemas.tipos.tasa.xsd',
    SCHEMADOC => nombreArch,
    LOCAL => TRUE,
    CSID => nls_charset_id('AL32UTF8'));
    dbms_lob.CLOSE(nombreArch);
    dbms_output.put_line('salio sin cancelar');
    exception
    when others then
    mens:=sqlerrm;
    dbms_lob.CLOSE(nombreArch);
    rollback;
    raise_application_error (-20001,'en registro shcema='||mens);
    END;
    Then, I want to register the following schema, that mention de schema above:
    <?xml version="1.0" encoding="AL32UTF8"?>
    <xsd:schema targetNamespace="schema.repuesto.xsd"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb/XDBSchema.xsd"
    xmlns:tns="http://xmlns.oracle.com/tasa/schemas.tipos.tasa.xsd"
    elementFormDefault="qualified" version="1.0"
    attributeFormDefault="unqualified" >
    <xsd:element name="PRECIORENG" type="preciorepType" />
    <xsd:complexType name="preciorepType" >
    <xsd:sequence minOccurs="1" maxOccurs="unbounded">
    <xsd:element name="CODIGO_MARCA" type="tns:codigosType" />
    <xsd:element name="ORIGEN_PRECIO" type="tns:integerUnoType" />
    <xsd:element name="INGRESO_POR_FALTANTE" type="tns:condicionType" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    But when a run the following script whith the same db-user:
    DECLARE
    direc varchar2(2000);
    nombreArch BFILE;
    mens varchar2(2000);
    BEGIN
    direc:=uso_comun.pack_mail.fun_valor_param('TASA','DIR_DBSERVER');
    -- nombreArch:=bfilename(direc,'prueba_schema_seis.xsd');
    nombreArch:=bfilename(direc,'Schema_repuesto_nuevo.xsd');
    DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL =>'http://xmlns.oracle.com/tasa/schema.repuesto.xsd',
    SCHEMADOC => nombreArch,
    LOCAL => TRUE,
    CSID => nls_charset_id('AL32UTF8'));
    dbms_lob.CLOSE(nombreArch);
    dbms_output.put_line('salio sin cancelar');
    --commit;
    exception
    when others then
    mens:=sqlerrm;
    dbms_lob.CLOSE(nombreArch);
    rollback;
    raise_application_error (-20001,'en registro shcema='||mens);
    END;
    tell me the error: ORA: 01031, insufficient privileges!!!!, what’s wrong??,

    Hi,
    To register schema, you require XDBADMIN system privilege granted to the user.
    Please verify this and retry.
    Rgds,
    Rakesh Tripathi

  • 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>

  • Removing xml schema fails

    When i try to remove an xml schema using the enterprise manager (10.1.0.2.0) console i receive the following error:
    VB0-8051: ...
    ORA-31000: Resource ... is not an xdb-schema document
    ORA-06512: in XDB.DBMS_XMLSCHEMA_INT: row 70
    ORA-06512: in XDB.DBMS_XMLSCHEMA: row 103
    ORA-06512: in row 1
    Thanks for any hint,
    Christian
    What i see in the schema code (see below) is that the <xs:schema>-tag is directly following the comment.
    Even if i register a schema without a comment, i can't remove it from xdb :-((((
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!-- edited with XMLSpy v2005 sp2 U (http://www.altova.com) by --><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:oraxdb="http://xmlns.oracle.com/xdb" oraxdb:flags="279" oraxdb:schemaURL="stdb1296/objects.xsd" oraxdb:schemaOwner="ISMED_XML" oraxdb:numProps="12">
    <xs:element name="objects" oraxdb:propNumber="2408" oraxdb:global="true" oraxdb:SQLName="objects" oraxdb:SQLType="objects137_T" oraxdb:SQLSchema="ISMED_XML" oraxdb:memType="258" oraxdb:defaultTable="objects143_TAB" oraxdb:defaultTableSchema="ISMED_XML">
    <xs:annotation>
    <xs:documentation>Top level element als Klammer über alle Instanzen.</xs:documentation>
    </xs:annotation>
    .....

    Christian,
    I run the following code from sql to remove the schemas I register.
    I've noticed when I try to register schemas multiple times I will get errors.
    I got this code from one of the XML documents or XDB documents. I don't remember where I found it. You may be able to do a search if you want more information.
    declare
    unregistered_schema exception;
    PRAGMA EXCEPTION_INIT( unregistered_schema -31000 );
    begin
    dbms_xmlschema.deleteschema('schemaregisterednamehere',dbms_xmlschema.DELETE_CASCADE_FORCE);
    exception
    when unregistered_schema then
    null;
    end;

Maybe you are looking for

  • ContentType in HTTP Header issue while sending webservice request

    I have a client application deployed on weblogic10.3.4 which access a remote web application (on websphere5.1). The soap request fails because WebSphere5.1 does not accept double quote around utf-8 in ContentType header of HTTP. e.g: Content-Type: te

  • Help! Cant log in to BB App World -changed email and now asking for original user name associated email

    Hi I have a bold 9790. I have changed my BB app world email as I cant access that original email anymore, so changed email address, i registered it online in the bb website, when i go to update apps i try and log in to the appworld with my new email

  • Import Table Statistics to another table

    Hi, Just like to know if I can use dbms_stats.import_table_stats to import table statistics to another table? Scenario: I exported the table statistics of the table (T1) using the command below. exec dbms_stats.export_table_stats('<user>','T1',NULL,'

  • Using java on linux v/s windows

    wondering if anyone could help me out here. can't seem to find a lot of doucumentation on this .. or may be i was just searching using the wrong key words!!!

  • Appending a DocumentFragment to XMLDocument

    I've been having a surprisingly difficult time trying to do this simple thing: append a DocumentFragment to an XMLDocument. Here is my method; there are several print statements in here for debugging: * This method joins two XML elements to form a si