Dynamic Reference to Registered XSD

I generate docs from SELECT like this,
<span style="color:red;">(I do not store this type of doc in DB/XDB)</span>:
<div style="color:blue;">
SELECT '&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;' || chr(10) ||
xmlelement
(&quot;ReinsuranceXfer&quot;,
xmlattributes
    ('http://blah.com/blah2/types/common' AS &quot;xmlns&quot;,
     'http://www.w3.org/2001/XMLSchema-instance' AS &quot;xmlns:xsi&quot;,
     'http://blah.com/blah2/types/common http://blah3/xmlschemas/Sales_v1.xsd'
     AS &quot;xsi:schemaLocation&quot;),
 xmlelement
    (&quot;SalesTransactions&quot;,
     xmlattributes('DirectTransactions' AS &quot;xsi:type&quot;).......
</div>
the schema &quot;Sales_v1.xsd&quot; is XDB-registered.
In stead of hard-coding <strong>&quot;Sales_v1.xsd&quot;</strong> in PL/SQL or View definition
I want to DYNAMICALLY reference the value, so when I switch to
version 2, registering the new schema (deleting the old one)
the value <strong>&quot;Sales_v2.xsd&quot;</strong>
can be dynamically referenced.
Is there a better/&quot;smarter&quot; way to achieve the dynamic reference
than this ?
<div style="color:blue;">
SELECT substr(any_path, instr(any_path, '/', -1) + 1) xsd
    FROM resource_view
   WHERE any_path LIKE '%Sales%.xsd';
</div>
thanks
10gr2

You can't invoke methods on bits of String as if they were references to objects. (Java isn't like PHP in this regard.)
You can, however, use arrays as db suggested.
Let's say I have a hundred toggle buttons. I might give them names like "okButton" "exitButton" etc. Or I might make them elements of an array of buttons, buttonArr.
And I have a method toggle(int) that accepts an integer as input and verifies that the argument is within the range 1 to 100, throwing an exception if it is not. This method is intended to select the toggle button that corresponds to the integer it receives as input as selected. So the method would be implemented as
buttonArr.setSelected(true);

Similar Messages

  • Service Registry XSD dynamic reference not working

    Hi ,
    I have published an employee canonical schema to service registry. I have referenced it in my BPEL in my wsdl file as follows
    <schema xmlns="http://www.w3.org/2001/XMLSchema">
                   <import namespace="http://systinet.com/uddi/demo/employeeList" schemaLocation="employees.xsd" id="uddi:company:HR:EmployeeCanonical" />
              </schema>
    I have deployed the BPEL and is working fine. When I updated the service registry to point to the lastest version of canonical file , the BPEL is not reflecting to the new version. I have bounced both bpel server and reg. service but still no difference.
    please let me know how I can dynamically reference the xsd in service registry.
    appreciate your help.
    thanks
    Srini

    Hi
    I am having trouble making the BPEL and Systinet to work together. I have Systinet and BPEL installed separately on 2 different servers. I deployed my web services and registered them in UDDI. I created a new BPEL process and added a partner link to refer to one of the web service I have registered in UDDI. When I create the partner link, it is forcing me to give the wsdl and it also gives an error message " There are no partner link types defined in current wsdl. Do you want create that will by default create partner link type for you?". If I say "NO' then deployment fails. If I say "Yes", then it creates a new wsdl file on the local server etc and gives "<Faulthttp://schemas.xmlsoap.org/soap/envelope/>
    <faultcode>soapenv:Server.userException</faultcode>
    <faultstring>com.oracle.bpel.client.delivery.ReceiveTimeOutException: Waiting for response has timed out. The conversation id is 75164a0815ea471a:-3be8c246:117cc377894:-537b. Please check the process instance for detail.</faultstring>". Any help is appreciated.

  • PI 7.1: Importing a wsdl file with references to other xsd files

    Hi Experts,
    I am trying to import a wsdl file that has got references to other xsd files. When i do this with SOAP UI, i can get the full message structure for the other xsd files. But when i try to import the same wsdl in the ESR, i only get to the messages and not the referenced xsd.
    Any ideas!
    Thank you in Advance,
    Danny

    Hi,
    First convert your main WSDL in to XSD,use Stylus or any XML editors to convert the same,thecn check the genarated XSD refering sun XSD tsrutures.then zip the all xsd in to one File and import in PI,then select you main xsd in the folder,and select root element.
    Normally withour converting in to XSD only if you group al import it in to PI,it wil work.
    or
    if you have some good knowledge about XSD then convert WSDL in to XSD and remove referece tags and include XSD content of sub xsds in to main XSD,and validate that one,and imnprt one XSD.
    Regards,
    Raj

  • XML validation against registered XSD

    I have registered XSD into oracle database, while validating xml against this xsd I got stuck with non-mandatory tags.
    Below is the tag-XSD structure:
    Status field as String:
    <xs:element name="Status" nillable="false"> <xs:annotation> <xs:documentation>Values are 'N' or 'E'</xs:documentation>
    </xs:annotation>
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="1"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    idnumber tag field as Integer:
    <xs:element name="idnumber" type="xs:int" nillable="false">
    <xs:annotation>
    <xs:documentation>id value </xs:documentation>
    </xs:annotation>
    </xs:element>
    As status tag is of string type and I have mentioned it as nillable = "False", but even though when I am passing this tag as <status/>, then also its validating xml.... but as i mentioned nillable property as false then it should not validate it ..... please correct me if i m wrong..
    In case of idnumber tag it is of int type. In this case <idnumber/> will not work in either case even it is nillable = true or false. Means we cannt pass null values in integer field..... right?
    Please suggest me how to make tag of string datatype as not nillable.
    Is there any significance of using nillable = "false" in int datatype tag. Means if we want to make it as optional then need to mention it as minoccurs = 0..... is it correct?
    Requirement is simple:
    Just want to make some tag as optional and some as mandatory, tag can be of integer or string type.
    Thanks in advance.....
    Edited by: 959352 on 15-Oct-2012 00:45

    As status tag is of string type and I have mentioned it as nillable = "False", but even though when I am passing this tag as <status/>, then also its validating xml.... but as i mentioned nillable property as false then it should not validate it ..... please correct me if i m wrong.. The nillable attribute doesn't work that way. It's easy to look that up in any tutorial.
    nillable = "true" means you allow the element to have a NULL content (different from empty string) by specifying an explicit null attribute :
    <Status xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>nillable = "false" is the default behaviour.
    Please suggest me how to make tag of string datatype as not nillable.
    Is there any significance of using nillable = "false" in int datatype tag. Means if we want to make it as optional then need to mention it as minoccurs = 0..... is it correct?
    Requirement is simple:
    Just want to make some tag as optional and some as mandatory, tag can be of integer or string type. You have to be careful about the vocabulary.
    In my mind, an "optional" element means you can omit it entirely in the instance document (minOccurs="0"), whereas an empty element means the start tag and end tag are there but with no content.
    There are multiple ways to allow for empty or non-empty elements.
    e.g. for a non-empty string :
    <xs:minLength value="1"/>or, as in your example, if the content is actually constrained to a list of values, use enumerations.
    xs:int datatype doesn't allow empty values (unless you use xsi:nil).
    A possible solution is to build a new type by unioning (xs:union) an xs:int and an empty string type.

  • Dynamically reference :old.column_ name in trigger

    Hi all,
    I am writing an application for which i would like to include a limited audit trail.
    I have a form that is based on a table with approx 100 columns and wish to write the :old.column_name value on fields that have been updated, along with userid and date/time to an "audit" table.
    I think that I can do this by using the Before_update trigger and then the IF UPDATING ('column name') condition. However, for maintenance and readabiility, I wish to be able to dynamically reference the :old.column_name value, which I cannot get working.
    I know it can be done with a large IF statement, but due to the number of columns involved, this can lead to a maintenance nightmare. Also, if I can get this working, I want to include the procedure in a library for other applications, thus the need for dynamically referencing the table and column names.
    My proposed logic for the before_update trigger is:
    Declare Vcolumn_name Varchar2(50)
    Get column names for table (using select cursor)
    loop through cursor
    Vcolumn_name := column name
    IF UPDATING (Vcolumn_name) then
    insert userid, timestamp, :old.Vcolumn_name into audit table
    end IF
    next cursor row
    :old.Vcolumn_name is where I am having trouble.
    Is this possible?
    Thanks
    Peter

    The pre-update trigger won't store the value of the old.column . If you are querying the data and then updating then use the POST-QUERY trigger to store the current values in global variables. In the PRE-UPDATE trigger assign the global variables to the columns of the audit tables.
    For instance in the PRE-FORM trigger initialize the global variables :
    :GLOBAL.VAR1 := ' ';
    :GLOBAL.VAR2 := ' ';
    In the POST-QUERY trigger
    :GLOBAL.VAR1 := :BLOCK.COLUMN1;
    :GLOBAL.VAR2 := :BLOCK.COLUMN2;
    In the PRE-UPDATE trigger
    INSERT INTO AUDIT_TABLE (COL1, COL2)
    VALUES(:GLOBAL.VAR1, :GLOBAL.VAR2);
    Hope this helps.

  • How do i dynamically reference the contents of an item in a where clause

    I have a select statement that references an item i.e. 'where sysdate=:diary.day1' at the moment, however i want to use this select to loop through every day of the week, so on the fist record it will change depending on where you are in the loop either 'where sysdate=:diary.day1' or 'where sysdate=:diary.day2' etc. I tried using a variable for this but it just uses the characters ':diary.day1' and not the contents of this item.

    Not sure what you want but dynamic reference the content of an item may be done with NAME_IN builtin.
    WHERE sysdate = TO_DATE( NAME_IN(var), 'fmt')
    where var is a variable which contain item name, for example 'DAIRY.DAY1'
    P.S. SYSDATE function contain not only date but time portion too.
    So very little chances that this equation will be true

  • Register XSD-Files which includes Other XSD-Files

    Hallo
    i have two XML-Schemata. One is included by the other.
    Here is an example:
    This is the XSD, which is included by the other (metadata.xsd):
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
         <!-- Metadatenbereich für das xml-Dokument selbst-->
         <xs:element name="metadata" type="metadataType">
              <xs:annotation>
                   <xs:documentation>ROOT ELEMENT von Metadata</xs:documentation>
              </xs:annotation>
         </xs:element>
         <!-- Glossar: Metadatenbereich + Glossarinhalt als Liste von Glossareinträgen -->
         <xs:complexType name="metadataType">
              <xs:sequence>
                   <xs:element ref="identifier"/>
                   <xs:element ref="category"/>
                   <xs:element ref="creator"/>
                   <xs:element ref="creation_date"/>
                   <xs:element ref="publisher"/>
                   <xs:element ref="language"/>
                   <xs:element ref="title"/>
                   <xs:element ref="basic_year"/>
                   <xs:element ref="statistic"/>
    This is the XSD, which include the other XSD (lexikon.xsd):
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="unqualified" attributeFormDefault="unqualified">
         <!-- Includieren der Metadaten-->
         <xs:include schemaLocation="metadata.xsd"/>
         <!-- ROOT Element von Lexikon-->
         <xs:element name="lexikon" type="lexikonType" xdb:defaultTable="LEXIKON">
              <xs:annotation>
                   <xs:documentation>ROOT ELEMENT</xs:documentation>
              </xs:annotation>
         </xs:element>
         <xs:complexType name="lexikonType">
              <xs:sequence>
                   <xs:element ref="metadata"/>
                   <xs:element ref="lexikonEntries"/>
              </xs:sequence>
              <xs:attribute name="lexikonKat" type="xs:integer">
                   <xs:annotation>
                        <xs:documentation>für spezielle UnterkategorienTypen zu den Lexikas</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
         </xs:complexType>
         <!---->
         <!-- GLOSSAR-ELEMENTE -->
         <!---->
         <!-- ExplicationTxt-->
         <xs:element name="explicationTxt" type="explicationType"/>
         <xs:complexType name="explicationType">
              <xs:choice>
                   <xs:element ref="verweis"/>
                   <xs:element ref="txt"/>
                   <xs:element ref="para"/>
    Both documents have i copied to a webdav-folder. Now i want register the documents.
    BEGIN
    DBMS_XMLSchema.registerSchema(
    schemaurl=>'http://190.1.1.148:8080/home/DEV/xsd/lexikon.xsd',
    schemadoc=>sys.UriFactory.getUri('/home/DEV/xsd/lexikon.xsd'));
    END;
    The following error-message is displayed:
    ERROR at line 1:
    ORA-31000: Resource 'metadata.xsd' is not an XDB schema document
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 166
    ORA-06512: at line 2
    I made the XSD-Files by XMLSpy. The Documents are well-formated and valid.
    When i make a new XML-File based ONLY (of course) on lexikon.xsd everything works fine with XMLSpy.
    How must i register these documents? Is it possible? Or can´t i register XSD-Files which includes others?
    Thank you very much
    cu
    Heidi

    Heidi,
    register the metadata.xsd first inthe same way and then register the lixikon.xsd.
    it should work.

  • Dynamic reference to buttons

    Hi all,
    I'd like to make dynamic references to togglebuttons (I'm using netbeans). In pseudo code, I would like to be able to do something like:
    For(int i = 1, i<10, i++){
    buttonName = toggleButton;
    buttonName.concat(numToString(i));
    convert buttonName to handler 'handle'
    handle.setSelected(true);
    With classes, it seems to me that I could use Class.forName, but I have no idea how to make this work for an interface element, and I can't find it on the web.
    Any help is welcome, thanks!
    Edited by: jefke33 on Jun 20, 2009 1:12 PM
    Edited by: jefke33 on Jun 20, 2009 1:13 PM

    You can't invoke methods on bits of String as if they were references to objects. (Java isn't like PHP in this regard.)
    You can, however, use arrays as db suggested.
    Let's say I have a hundred toggle buttons. I might give them names like "okButton" "exitButton" etc. Or I might make them elements of an array of buttons, buttonArr.
    And I have a method toggle(int) that accepts an integer as input and verifies that the argument is within the range 1 to 100, throwing an exception if it is not. This method is intended to select the toggle button that corresponds to the integer it receives as input as selected. So the method would be implemented as
    buttonArr.setSelected(true);

  • Error while registering xsd and inserting xml

    1) while inserting it is mentioning , no schema definition available for citeinfo
    2) while registering it is mentioning, with changes that i have made that it is not valid xdb schema
    how to register the xsd schema correctly.?
    SQL> desc register2;
    Name Null? Type
    TABLE of SYS.XMLTYPE(XMLSchema "fgdc-std-001-19981.xsd" Element "metadata") STORAGE Object-relationa
    SQL> alter session set events ='31156 trace name context forever, level 2'
    2 /
    Session altered.
    SQL> INSERT INTO register2
    2 VALUES (XMLType(bfilename('XMLDIR','metadata.xml'),
    3 nls_charset_id('AL32UTF8')));
    INSERT INTO register2
    ERROR at line 1:
    ORA-30937: No schema definition for 'citeinfo' (namespace '##local') in parent
    '/metadata/idinfo'
    SQL> BEGIN
    2 DBMS_XMLSCHEMA.registerSchema(
    3 SCHEMAURL => 'fgdc-std-001-199812.xsd',
    4 SCHEMADOC => bfilename('XMLDIR','fgdc-std-001-199812.xsd'),
    5 CSID => nls_charset_id('AL32UTF8'));
    6 END;
    7 /
    BEGIN
    ERROR at line 1:
    ORA-31000: Resource 'fgdc-std-001-1998-sect012.xsd' is not an XDB schema
    document
    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 2
    this is the xsd document
    <?xml version="1.0" encoding="utf-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" blockDefault="#all">
    <xsd:element name="idinfo" type="idinfoType"/>
    <xsd:complexType name="idinfoType">
         <xsd:sequence>
              <xsd:element ref="citeinfo"/>
              <xsd:element ref="descript"/>
              <xsd:element ref="timeperd"/>
              <xsd:element ref="status"/>
              <xsd:element ref="spdom"/>
              <xsd:element ref="keywords"/>
              <xsd:element ref="accconst"/>
              <xsd:element ref="useconst"/>
              <xsd:element ref="ptcontac" minOccurs="0"/>
              <xsd:element ref="browse" minOccurs="0" maxOccurs="unbounded"/>
              <xsd:element ref="datacred" minOccurs="0"/>
              <xsd:element ref="secinfo" minOccurs="0"/>
              <xsd:element ref="native" minOccurs="0"/>
         </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="citeinfo" type="citeinfoType">
    <xsd:complexType name="citeinfoType">
    <xsd:sequence>
    <xsd:element ref="origin">
         <xsd:element ref="pubdate">
         <xsd:element ref="pubtime">
         <xsd:element ref="title">
    <xsd:element ref="edition">
         <xsd:element ref="geoform">
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="origin" type="originType"/>
    <xsd:simpleType name="originType">
         <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    <xsd:element name="pubdate" type="pubdateType"/>
    <xsd:simpleType name="pubdateType">
         <xsd:restriction base="xsd:date"/>
    </xsd:simpleType>
    <xsd:element name="pubtime" type="pubtimeType"/>
    <xsd:simpleType name="pubtimeType">
         <xsd:restriction base="xsd:time"/>
    </xsd:simpleType>
    <xsd:element name="title" type="titleType"/>
    <xsd:simpleType name="titleType">
         <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    <xsd:element name="edition" type="editionType"/>
    <xsd:simpleType name="editionType">
         <xsd:restriction base="xsd:double"/>
    </xsd:simpleType>
    <xsd:element name="geoform" type="geoformType"/>
    <xsd:simpleType name="geoformType">
         <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    <xsd:element name="descript" type="descriptType"/>
    <xsd:complexType name="descriptType">
         <xsd:sequence>
              <xsd:element ref="abstract"/>
              <xsd:element ref="purpose"/>
              <xsd:element ref="supplinf" minOccurs="0"/>
         </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="abstract" type="abstractType"/>
    <xsd:simpleType name="abstractType">
         <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    this is the xml document
    <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE metadata SYSTEM "http://www.fgdc.gov/metadata/fgdc-std-001-1998.dtd"><metadata>
    <idinfo>
    <citation>
    <citeinfo>
    <origin>Jiohn</origin>
    <pubdate>Unknown</pubdate>
    <pubtime>Unknown</pubtime>
    <title>isolation_valve</title>
    <edition>we</edition>
    <geoform>vector digital data</geoform>
    <serinfo>
    <sername>trial</sername>
    <issue>akls</issue>
    </serinfo>
    <pubinfo>
    <pubplace>india</pubplace>
    <publish>rolta</publish>
    </pubinfo>
    <othercit>afdf</othercit>
    <onlink>\\gedora09\prfd\3.Input\O&amp;M\15Feb10\Rolta O&amp;M Data\103 shape files updated on 12.01.2009\Points\isolation_valve.shp</onlink>
    <lworkcit>
    <citeinfo>
    <origin>aedf</origin>
    <pubdate>20041203</pubdate>
    <pubtime>00290055</pubtime>
    <title>test xml</title>
    <edition>ert</edition>
    <geoform>audio</geoform>
    <onlink>ad</onlink>
    </citeinfo>
    </lworkcit>
    </citeinfo>
    </citation>
    <descript>
    <abstract>asdf</abstract>
    <purpose>asdf</purpose>
    <supplinf>werty</supplinf>
    </descript>
    <timeperd>
    <timeinfo>

    "Events" are not there just for fun - they have a purpose. Most of the time they should only be used when asked by Oracle support or when you know what you are doing...
    I assume you aren't using 11gR2 as suggested by Mark in an earlier thread...?

  • Ora-00600 error when registering xsd with large enumeration

    I am trying to register the xsd:
    http://212.130.77.78/StandatWS/StandatXSD.asmx/GetSchema?SchemaFile=std00019.xsd
    It contains a very large enumerated type like this:
    <xsd:simpleType name="std00019">
    <xsd:annotation>
    <xsd:documentation>Stofparametre</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="0000">
    <xsd:annotation>
    <xsd:documentation></xsd:documentation>
    </xsd:annotation>
    </xsd:enumeration>
    <xsd:enumeration value="0001">
    <xsd:annotation>
    <xsd:documentation>Syn</xsd:documentation>
    </xsd:annotation>
    </xsd:enumeration>
    The file is more than 7000 lines of xml. If I try to cut it down to less than 4000 lines or so, then I can register it. Otherwise it give me an error like this:
    1 begin
    2 dbms_xmlschema.registerURI(
    3 'http://212.130.77.78/StandatWS/StandatXSD.asmx/GetSchema?SchemaFile=std00019.xsd',
    4 'http://212.130.77.78/StandatWS/StandatXSD.asmx/GetSchema?SchemaFile=std00019.xsd'
    5 );
    6* end;
    SQL> /
    begin
    FEJL i linie 1:
    ORA-00600: intern fejlkode, argumenter: [qmxiCreateColl2], [11], [], [], [],
    ORA-06512: ved "XDB.DBMS_XMLSCHEMA_INT", linje 0
    ORA-06512: ved "XDB.DBMS_XMLSCHEMA", linje 185
    ORA-06512: ved linje 2
    I am using 9.2.0.6.0
    Do you know if there is a maximum length of an enumeration in oracle?

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

  • How can I dynamically reference a sheet based upon the contents of a cell

    I'm using Numbers to store specifications for various products. Each sheet stores specifications in a standard manner (i.e. same table and cell names) and the sheet is named according to the name of the product.
    On another sheet I've got a dropdown list containing the names of the product tabs. I'd like to dynamically pull data for a particular product when it's sheet is selected in the dropdown list by using the dropdown cell in a reference like:
    =B1::STC::A4, where B1 is the dropdown list and STC::A4 is the product specification table and cell reference.
    When I use this, the B1 reference fails.
    Any suggestions would be greatly appreciated.
    Thanks.

    Amos,
    you will have to use the indirect function to convert the string you are creating into a valid reference.
    Note:  The Sheet names, Table names and cell references must all match exacty.
    If the sheets are named "B1", "C1" and "D1" and the popup menu is in the cell A1 and contains the strings:
    B1
    C1
    D1
    The table name is "STC"
    then you can create a valid reference like this:
    = indirect(A1&"::STC::A4")
    if the table name were also dynamic and were stored in cell A2 you could create the reference like this:
    = indirect(A1&"::"&A2&"::A4")

  • Using xmlns in schemas that reference Oracle registered schema

    I have two schemas: a.xsd and b.xsd. b.xsd uses an xmlns to reference a.xsd. But when I call dbms_xmlschema.registerSchema, the a.xsd schema works ok, but the b.xsd schema fails with the following error:
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00023: unknown namespace URI "http://xmlns/a"
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
    ORA-06512: at line 2
    I've tried with and without an xsi:schemaLocation in b.xsd and both fail with the same error.
    Has anyone had any luck using this multiple schema reference functionality? I'm on the latest Oracle 9i (9.2.0.3.0) 64-bit on Solaris 2.8.
    Thanks,
    -Darren
    Here's the output of my sqlplus session:
    SQL*Plus: Release 8.1.6.0.0 - Production on Wed May 14 13:43:56 2003
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.3.0 - Production
    SQL> set long 10000
    SQL> SELECT user FROM dual
    2 /
    USER
    XDB
    SQL> SELECT getDocument('xsd/a.xsd') FROM dual
    2 /
    GETDOCUMENT('XSD/A.XSD')
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema targetNamespace="http://xmlns/a" xmlns="http://xmlns/a" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="a">
    <xs:simpleType>
    <xs:restriction base="xs:string">
         <xs:maxLength value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:schema>
    GETDOCUMENT('XSD/A.XSD')
    SQL> BEGIN
    2 dbms_xmlschema.registerSchema(
    3      schemaURL => 'http://xmlns/a',
    4      schemaDoc => getDocument('xsd/a.xsd'),
    5      local => false);
    6 END;
    7 /
    PL/SQL procedure successfully completed.
    SQL> COMMIT
    2 /
    Commit complete.
    SQL> SELECT owner, schema_url FROM all_xml_schemas WHERE schema_url = 'http://xmlns/a'
    2 /
    OWNER
    SCHEMA_URL
    XDB
    http://xmlns/a
    SQL> SELECT getDocument('xsd/b.xsd') FROM dual
    2 /
    GETDOCUMENT('XSD/B.XSD')
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema targetNamespace="http://xmlns/b" xmlns="http://xmlns/b" xmlns:a="http://xmlns/a" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="b">
    <xs:complexType>
    <xs:sequence>
         <xs:element name="c">
         <xs:simpleType>
         <xs:restriction base="xs:string">
         <xs:maxLength value="200"/>
         </xs:restriction>
         </xs:simpleType>
         </xs:element>
         <xs:element ref="a:a"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    SQL> BEGIN
    2 dbms_xmlschema.registerSchema(
    3      schemaURL => 'http://xmlns/b',
    4      schemaDoc => getDocument('xsd/b.xsd'),
    5      local => false);
    6 END;
    7 /
    BEGIN
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00023: unknown namespace URI "http://xmlns/a"
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
    ORA-06512: at line 2
    SQL> SELECT getDocument('xsd/b-with-location.xsd') FROM dual
    2 /
    GETDOCUMENT('XSD/B-WITH-LOCATION.XSD')
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema
         targetNamespace="http://xmlns/b"
         xmlns="http://xmlns/b"
         xmlns:a="http://xmlns/a"
         xmlns:xs="http://www.w3.org/2001/XMLSchema"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns/a http://xmlns/a">
    <xs:element name="b">
    <xs:complexType>
    <xs:sequence>
         <xs:element name="c">
         <xs:simpleType>
         <xs:restriction base="xs:string">
         <xs:maxLength value="200"/>
         </xs:restriction>
         </xs:simpleType>
         </xs:element>
         <xs:element ref="a:a"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    SQL> BEGIN
    2 dbms_xmlschema.registerSchema(
    3      schemaURL => 'http://xmlns/b',
    4      schemaDoc => getDocument('xsd/b-with-location.xsd'),
    5      local => false);
    6 END;
    7 /
    BEGIN
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00023: unknown namespace URI "http://xmlns/a"
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
    ORA-06512: at line 2
    SQL> COMMIT
    2 /
    Commit complete.
    SQL> SELECT owner, schema_url FROM all_xml_schemas
    2 WHERE schema_url = 'http://xmlns/a' OR schema_url = 'http://xmlns/b'
    3 /
    OWNER
    SCHEMA_URL
    XDB
    http://xmlns/a
    SQL> QUIT
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.3.0 - Production

    This is resolved.

  • Unable to register XSD into Oracle using trigger / procedure

    Hi,
    I am using Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production.
    I have a table which stores XSD and i need to register this XSD. I am able to register the XSD if dbms_schema is executed from PLSQL anonymous block. But if i mention the same code in trigger / procedure is not working . Getting the error as insufficient privileges.
    Table, trigger and procedure are in same schema. This schema has all the privs required for XSD registration globally.
    create table t_vkk ( n number, xsd xmltype)
    alter table t_vkk add active varchar2(1)
    create sequence seq_vkk start with 1 increment by 1
    CREATE OR REPLACE TRIGGER TRG_t_vkk_xsd
    AFTER INSERT OR UPDATE
    ON t_vkk
    REFERENCING OLD AS old NEW AS new
    FOR EACH ROW
    BEGIN
    IF INSERTING AND :new.active = 'Y'
    THEN
    prc_reg_xsd(:new.n, :new.xsd);
    END IF;
    -- Applied when updating rows in the table
    IF UPDATING
    THEN
    IF :new.active = 'Y' -- XSD re-registration since template id is still active
    THEN
    prc_reg_xsd(:old.n, :old.xsd);
    ELSIF :new.active = 'N' -- XSD de-registration
    THEN
    BEGIN
    dbms_xmlschema.deleteschema (
    schemaurl => :old.n
    , delete_option => dbms_xmlschema.delete_cascade_force
    EXCEPTION
    WHEN OTHERS
    THEN
    NULL; -- This XSD was not registered
    END;
    END IF;
    END IF;
    END TRG_t_vkk_xsd;
    This fails -
    insert into t_vkk
    values (0,XMLTYPE(
    '<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:books" xmlns:bks="urn:books">
    <xsd:element name="books" type="bks:BooksForm"/>
    <xsd:complexType name="BooksForm">
    <xsd:sequence>
    <xsd:element name="book" type="bks:BookForm" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="BookForm">
    <xsd:sequence>
    <xsd:element name="author" type="xsd:string"/>
    <xsd:element name="title" type="xsd:string"/>
    <xsd:element name="genre" type="xsd:string"/>
    <xsd:element name="price" type="xsd:float"/>
    <xsd:element name="pub_date" type="xsd:date"/>
    <xsd:element name="review" type="xsd:string"/>
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:string"/>
    </xsd:complexType>
    </xsd:schema>'
    ), 'Y')
    This works :
    After inserting the record into t_vkk (Trigger is disabled)
    declare
    begin
    for x in (select * from t_vkk)
    loop
    dbms_output.put_line (x.xsd.getstringval());
    BEGIN
    dbms_xmlschema.deleteschema (
    schemaurl => x.n
    , delete_option => dbms_xmlschema.delete_cascade_force
    EXCEPTION
    WHEN OTHERS
    THEN
    NULL; -- This XSD was not registered
    END;
    dbms_xmlschema.registerschema (schemaurl => x.n
    , schemadoc => x.xsd
    , local => false);
    end loop;
    end;
    This Fails:
    create or replace procedure prc_reg_xsd
    as
    begin
    for x IN (select * from t_vkk)
    loop
    BEGIN
    dbms_xmlschema.deleteschema (
    schemaurl => x.n
    , delete_option => dbms_xmlschema.delete_cascade_force
    EXCEPTION
    WHEN OTHERS
    THEN
    NULL; -- This XSD was not registered
    END;
    dbms_xmlschema.registerschema (schemaurl => x.n
    , schemadoc => x.xsd
    , local => false);
    end loop;
    end;
    BEGIN
    prc_reg_xsd;
    END;
    -Vinod K

    Thanks everyone. I got the solution from one of my colleague. I can invoke dbms_xmlschema.registerschema through my standalone procedure by using current_user authid.
    create or replace procedure prc_reg_xsd
    (in_id IN NUMBER
    , in_xsd IN XMLTYPE)
    authid current_user
    as
    begin
    dbms_output.put_line (' startd');
    BEGIN
    dbms_xmlschema.deleteschema (
    schemaurl => in_id
    , delete_option => dbms_xmlschema.delete_cascade_force
    EXCEPTION
    WHEN OTHERS
    THEN
    dbms_output.put_line (' Failed'); -- This XSD was not registered
    END;
    dbms_xmlschema.registerschema (schemaurl => in_id
    , schemadoc => in_xsd
    , local => false);
    dbms_output.put_line (' done');
    end;
    DECLARE
    x number:=9;
    t xmltype := XMLTYPE(
    '<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:books" xmlns:bks="urn:books">
    <xsd:element name="books" type="bks:BooksForm"/>
    <xsd:complexType name="BooksForm">
    <xsd:sequence>
    <xsd:element name="book" type="bks:BookForm" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="BookForm">
    <xsd:sequence>
    <xsd:element name="author" type="xsd:string"/>
    <xsd:element name="title" type="xsd:string"/>
    <xsd:element name="genre" type="xsd:string"/>
    <xsd:element name="price" type="xsd:float"/>
    <xsd:element name="pub_date" type="xsd:date"/>
    <xsd:element name="review" type="xsd:string"/>
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:string"/>
    </xsd:complexType>
    </xsd:schema>');
    BEGIN
    prc_reg_xsd(x,t);
    END;
    This worked for me. The procedure is in the same schema which has XDBADMIN role. So i am able to register the XSD.
    Vinod

  • Clusters as dynamic events being registered

    I am trying to define each of these controls as changevalue events programmatically where I register andd unregister each of the controls that are part of the cluster objects as evenets to the same structure.  I can wire the clusters as references into the register events object fine, but when I try to wire them in direct, I get a conflict error.
    Can someone explain to me why this is?
    Attachments:
    twoclustersasevents.vi ‏49 KB

    I am not able to open your vi as it is lacking at least one of the clusters. Try savinging it "Save with Options", "Development distribution", to include all the missing parts.
    P.M.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • How can I extract structure information from registered XSDs ?

    Hello,
    I am trying to extract hierarchy and type information from registered XML schemas which include other XML Schemas, in a single SQL query.
    In essence I would love to be able to write a query of the form
    SELECT *
      FROM XMLTABLE('//xs:element'
                    PASSING <the root schema object goes here>
                    COLUMNS   ELEM_NAME       VARCHAR2(63) PATH '@name'
                            , ELEM_REF        VARCHAR2(62) PATH '@ref'
                            , ELEM_TYPE       VARCHAR2(63) PATH '@type'
                            , MIN_OCCUR       VARCHAR2(15) PATH '@minOccurs'
                            , MAX_OCCUR       VARCHAR2(15) PATH '@maxOccurs'
                            , ANNOTATIONS     SYS.XMLTYPE  PATH 'xs:annotation'
                            , FXD_LENGTH      VARCHAR2(10) PATH '/xs:length/@value'
                            , MAX_LENGTH      VARCHAR2(10) PATH '/xs:maxLength/@value'
                            , MIN_INCLUSIVE   VARCHAR2(10) PATH '/xs:minInclusive/@value'
                            , MAX_INCLUSIVE   VARCHAR2(10) PATH '/xs:maxInclusive/@value'
                            , MIN_EXCLUSIVE   VARCHAR2(10) PATH '/xs:minExclusive/@value'
                            , MAX_EXCLUSIVE   VARCHAR2(10) PATH '/xs:minExclusive/@value'
                            , TOTAL_DIGITS    VARCHAR2(10) PATH '/xs:totalDigits/@value'
                            , FRACTION_DIGITS VARCHAR2(10) PATH '/xs:fractionDigits/@value'
                   )together with an indicator if each element is a leaf or not as well as its level and position information, by suitably expanding the appropriate type information from the (possibly) included XML Schemas (via schemaLocation).
    Does anybody know if there is a way to do this ?
    I will provide my sample XSD files if needs be ...
    Best Regards
    Filippos

    Have a look at the xdbutilities.zip packages... Probably all the info needed can be found in the code used there:
    http://www.oracle.com/technology/tech/xml/xmldb/Current/xdbutilities.zip

Maybe you are looking for

  • Configuring a Mac Pro

    Apple's commericals have worn me down. I am switching from my PC to a Mac Pro and would like to have recommendations from those who extensively use Adobe's Design CS4 Suite. I will often have InDesign, Illustrator, and Photoshop opened at the same ti

  • Front Panel Power Leds

    Hello Community! It has been a couple of weeks now that I have been experiencing the following issue: The on/off power button does not light anymore, neither in blue (operating) nor in orange (stand-by). My PC is working properly, no further issue. W

  • Ipod mini scrolls trough all the songs in the playlist!!!

    My ipod mini was working fine until now. When i play one song, it plays for less then 1 second and goes to the next song in the playlist, and then it does the same for the next... so i basically only get to hear less than 1 second of every song! I've

  • Can't open Exchange toolbox

    hello everybody ; i want help to open exchange toolbox in exchange 2013 , error message say " MMC has detected an error in a snap-in and will unload it" , every thing working normally except exchange toolbox , i need help please.

  • Slow Inernet speeds and navigation

    Hello.. I am a newbie so hope I can explain my problem accurately. My Desktop PC is really slow espcially  when I am accessing websites using either Chrome or IE.- Even Youtube is very choppy- ( Note..I have the latest version of both browsers but th