.xsd in XML Schema in 'Create Data Definition' window

I need to know the following about .xsd file while definining it in the XML Schema in 'Create Data Definition' window:
1. Why to use this file?
2. How to create this file ?
3. Is .xsd file should be different for each different report?
4. Is this file creation is one-time activity for each report?
5. Any details about .xsd file.
Thanks.

The XML Schema is only required if you are using a PDF template (the template file itself is PDF) with field-mapping. For other template types the schema is optional.
The XML Schema is used to define a "class" of XML documents, so to speak. The define the semantics and structure of the XML documents more thoroughly.
If you have closely related reports, you could use a single schema to standardize (in a sense) the XML to be output from the class of related reports. In that case you could have a single schema file uploaded to multiple reports/data-definitions.
The W3C has good documentation on XML Schema.
If you want to see samples, you can use tools such as dtd2xs to create sample schemas from your DTD.

Similar Messages

  • XML Schema file in data definition

    Hi,
    I am creating a custom RTF template for a seeded data definition in the eBusiness Suite. The data definition has an XML Schema file loaded however this does not include all the data required for the template. Running the report to just generate the XML (i.e. no template) I can see that the additional data is available at this level just not included in the XSD.
    I have built the template including the additional elements from the XML and expected to have to create a custom data definition as well to add the additional elements to the XSD. However the template is working against the seeded definition and successfully picking up the elements that are not included in the XSD.
    Has anybody else come across this situation? And are there any potential issues? I could create a custom data definition as well to load an amended XSD but this would be a more invasive change as it would involve end dating the seeded data definition which I would prefer not to do. The report is not being generated from a concurrent request so I cannot just create a custom request and leave the seeded report untouched.
    Thanks,
    Sarah

    The XML Schema is only required if you are using a PDF template (the template file itself is PDF) with field-mapping. For other template types the schema is optional.
    The XML Schema is used to define a "class" of XML documents, so to speak. The define the semantics and structure of the XML documents more thoroughly.
    If you have closely related reports, you could use a single schema to standardize (in a sense) the XML to be output from the class of related reports. In that case you could have a single schema file uploaded to multiple reports/data-definitions.
    The W3C has good documentation on XML Schema.
    If you want to see samples, you can use tools such as dtd2xs to create sample schemas from your DTD.

  • Can't i use xml schema and oledb data connection at the same time?

    Hello to all and thanks in advance.I use xml schema and oledb data connection at the same time and the problem is that when I try to export the xml, the outcome is not what i expect.Without the oledb connection everything is ok (just the schema) and the xml complies with the schema.
    Can't i have both schema and oledb and the exported xml be as i want it?

    You can use both at the same time, but not gor Internet access if that's what you're asking.
    Now there is a thing called Link Aggregation, which combines a number of interfaces for speed/redundancy, but it really only works locally, and then only with ALL special equipment in the route, and most likely OSX Server involved.
    Sorry.

  • Register xml schema and store data

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

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

  • How to see structure under schema when Create External Definition

    Hi ...we have scenario like RFC<>XI<>SOAP
    The request payload(SOAPIN) for SOAP is:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <AddressValidator xmlns="http://tempuri.org/geostan3/AddressValidator">
          <LicenseFile>string</LicenseFile>
           <Z9Path>string</Z9Path>
          <House>string</House>
          <Street>string</Street>
            </soap:Body>
    </soap:Envelope>
    and we are expecting response message from SOAP:
    diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
    - <AddressCheck xmlns="">
    - <Address diffgr:id="Address1" msdata:rowOrder="0" diffgr:hasChanges="inserted">
      <Addline1>220 W MAIN ST</Addline1>
      <Addline2 />
      <URB />
      <Lastline>LOUISVILLE, KY 40202-1395</Lastline>
      <Location>-85754010, 38256144</Location>
      <OutBlock>211110049001067</OutBlock>
      <OutCBSA>31140</OutCBSA>
      <MatchCode>SE0</MatchCode>
      <LocationCode>AS0</LocationCode>
      <DPVConfirm />
      <FootNote1 />
      <FootNote2 />
      <FootNote3 />
      <Msg>OK</Msg>
      </Address>
      </AddressCheck>
    so when we created external definition  using  wsdl file into XI, it showing only schema as SOAPOUT  (I couldn't see those fields in XI/under schema).
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <AddressValidatorResponse xmlns="http://tempuri.org/geostan3/AddressValidator">
          <AddressValidatorResult>
            <xsd:schema>schema</xsd:schema>xml</AddressValidatorResult>
        </AddressValidatorResponse>
      </soap:Body>
    </soap:Envelope>
    SXMB_MONI showing(Response):
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:AddressValidatorResponse xmlns:ns0="http://tempuri.org/geostan3/AddressValidator">
    - <ns0:AddressValidatorResult>
      <ns1:schema xmlns:ns1="http://www.w3.org/2001/XMLSchema" />
      </ns0:AddressValidatorResult>
      </ns0:AddressValidatorResponse>
    So my question is how do I map response fields to RFC response? Auctully this schema is like table structure which is having all response fields.
    I could see all response structure with data in sxmb_moni-->Response Msg ID > inbound message>payloads(main document). Is there any way to send this response to RFC ?
    or can you suggest me any other way to send this response to RFC.
    Thanks,
    Edited by: PILearn on Jun 2, 2008 10:21 PM

    Here you go..
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://tempuri.org/geostan3/AddressValidator" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://tempuri.org/geostan3/AddressValidator" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
      <wsdl:types>
        <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/geostan3/AddressValidator">
          <s:import namespace="http://www.w3.org/2001/XMLSchema" />
          <s:element name="AddressValidator">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="LicenseFile" type="s:string" />
                <s:element minOccurs="0" maxOccurs="1" name="LicensePassword" type="s:string" />
                <s:element minOccurs="0" maxOccurs="1" name="SearchPath" type="s:string" />
                <s:element minOccurs="0" maxOccurs="1" name="Z9Path" type="s:string" />
                <s:element minOccurs="0" maxOccurs="1" name="House" type="s:string" />
                <s:element minOccurs="0" maxOccurs="1" name="Street" type="s:string" />
                <s:element minOccurs="0" maxOccurs="1" name="AddLine2" type="s:string" />
                <s:element minOccurs="0" maxOccurs="1" name="AddLastLine" type="s:string" />
                <s:element minOccurs="0" maxOccurs="1" name="URB" type="s:string" />
                <s:element minOccurs="0" maxOccurs="1" name="Matchmode" type="s:string" />
                <s:element minOccurs="0" maxOccurs="1" name="Datum" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
          <s:element name="AddressValidatorResponse">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="AddressValidatorResult">
                  <s:complexType>
                    <s:sequence>
                      <s:element ref="s:schema" />
                      <s:any />
                    </s:sequence>
                  </s:complexType>
                </s:element>
              </s:sequence>
            </s:complexType>
          </s:element>
          <s:element name="DataSet" nillable="true">
            <s:complexType>
              <s:sequence>
                <s:element ref="s:schema" />
                <s:any />
              </s:sequence>
            </s:complexType>
          </s:element>
        </s:schema>
      </wsdl:types>
      <wsdl:message name="AddressValidatorSoapIn">
        <wsdl:part name="parameters" element="tns:AddressValidator" />
      </wsdl:message>
      <wsdl:message name="AddressValidatorSoapOut">
        <wsdl:part name="parameters" element="tns:AddressValidatorResponse" />
      </wsdl:message>
      <wsdl:message name="AddressValidatorHttpGetIn">
        <wsdl:part name="LicenseFile" type="s:string" />
        <wsdl:part name="LicensePassword" type="s:string" />
        <wsdl:part name="SearchPath" type="s:string" />
        <wsdl:part name="Z9Path" type="s:string" />
        <wsdl:part name="House" type="s:string" />
        <wsdl:part name="Street" type="s:string" />
        <wsdl:part name="AddLine2" type="s:string" />
        <wsdl:part name="AddLastLine" type="s:string" />
        <wsdl:part name="URB" type="s:string" />
        <wsdl:part name="Matchmode" type="s:string" />
        <wsdl:part name="Datum" type="s:string" />
      </wsdl:message>
      <wsdl:message name="AddressValidatorHttpGetOut">
        <wsdl:part name="Body" element="tns:DataSet" />
      </wsdl:message>
      <wsdl:message name="AddressValidatorHttpPostIn">
        <wsdl:part name="LicenseFile" type="s:string" />
        <wsdl:part name="LicensePassword" type="s:string" />
        <wsdl:part name="SearchPath" type="s:string" />
        <wsdl:part name="Z9Path" type="s:string" />
        <wsdl:part name="House" type="s:string" />
        <wsdl:part name="Street" type="s:string" />
        <wsdl:part name="AddLine2" type="s:string" />
        <wsdl:part name="AddLastLine" type="s:string" />
        <wsdl:part name="URB" type="s:string" />
        <wsdl:part name="Matchmode" type="s:string" />
        <wsdl:part name="Datum" type="s:string" />
      </wsdl:message>
      <wsdl:message name="AddressValidatorHttpPostOut">
        <wsdl:part name="Body" element="tns:DataSet" />
      </wsdl:message>
      <wsdl:portType name="AddressCheckSoap">
        <wsdl:operation name="AddressValidator">
          <wsdl:input message="tns:AddressValidatorSoapIn" />
          <wsdl:output message="tns:AddressValidatorSoapOut" />
        </wsdl:operation>
      </wsdl:portType>
      <wsdl:portType name="AddressCheckHttpGet">
        <wsdl:operation name="AddressValidator">
          <wsdl:input message="tns:AddressValidatorHttpGetIn" />
          <wsdl:output message="tns:AddressValidatorHttpGetOut" />
        </wsdl:operation>
      </wsdl:portType>
      <wsdl:portType name="AddressCheckHttpPost">
        <wsdl:operation name="AddressValidator">
          <wsdl:input message="tns:AddressValidatorHttpPostIn" />
          <wsdl:output message="tns:AddressValidatorHttpPostOut" />
        </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="AddressCheckSoap" type="tns:AddressCheckSoap">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
        <wsdl:operation name="AddressValidator">
          <soap:operation soapAction="http://tempuri.org/geostan3/AddressValidator/AddressValidator" style="document" />
          <wsdl:input>
            <soap:body use="literal" />
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal" />
          </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
      <wsdl:binding name="AddressCheckHttpGet" type="tns:AddressCheckHttpGet">
        <http:binding verb="GET" />
        <wsdl:operation name="AddressValidator">
          <http:operation location="/AddressValidator" />
          <wsdl:input>
            <http:urlEncoded />
          </wsdl:input>
          <wsdl:output>
            <mime:mimeXml part="Body" />
          </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
      <wsdl:binding name="AddressCheckHttpPost" type="tns:AddressCheckHttpPost">
        <http:binding verb="POST" />
        <wsdl:operation name="AddressValidator">
          <http:operation location="/AddressValidator" />
          <wsdl:input>
            <mime:content type="application/x-www-form-urlencoded" />
          </wsdl:input>
          <wsdl:output>
            <mime:mimeXml part="Body" />
          </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="AddressCheck">
        <wsdl:port name="AddressCheckSoap" binding="tns:AddressCheckSoap">
          <soap:address location="http://sap-ccs-geo02/geostan3/AddressValidator.asmx" />
        </wsdl:port>
        <wsdl:port name="AddressCheckHttpGet" binding="tns:AddressCheckHttpGet">
          <http:address location="http://sap-ccs-geo02/geostan3/AddressValidator.asmx" />
        </wsdl:port>
        <wsdl:port name="AddressCheckHttpPost" binding="tns:AddressCheckHttpPost">
          <http:address location="http://sap-ccs-geo02/geostan3/AddressValidator.asmx" />
        </wsdl:port>
      </wsdl:service>
    </wsdl:definitions>

  • R12 Check Printing Need XML output for seeded data definition--urgent

    Hi--
    I really need to get ahold of the XML output from the checks running off the data definition called "Oracle Payments Funds Disbursement Payment Instruction Extract 1.0" in Oracle R12 quickly--particulary the XML tag that holds the MICR string (should be the concatenation of Check Number, Routing and Acct number).
    I found an entry here in the forums about running a query of:
    SELECT XMLType.getClobVal(instruction)
    FROM IBY_XML_FD_INS_1_0_V
    WHERE rownum =1 ;
    to get the entire XML output. I have an open SR but haven't really gotten anywhere with it yet.
    However, all we get back is an error about datatype. Could someone please help out with this--it is quite urgent as I need to finish this last piece of the checks and work with the bank on formatting this week.
    Thanks--I'd really appreciate any assistance!
    Kate

    SELECT XMLType.getClobVal(instruction)
    INTO x_extract_doc
    FROM iby_xml_fd_ins_1_0_v
    WHERE payment_instruction_id = p_payment_instruction_id;
    or you can use
    SELECT document FROM iby_trxn_documents order by creation_date desc;
    provided that the last run was urs.

  • Standard XML schema for Vendor data exchange between SAP and other system

    Is there a SAP standard way of XML schema that we exchange between SAP and other system? Please let me know.
    Thanks.

    See SAP Interface Repository (http://ifr.sap.com).
    My proposal is to leave old SAP connectors staff and use SAP Exchange Infrastructure. There is a support of industry XML standards in XI 3.0 like xCBL.

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

  • Problem inserting and querying XML data with a recursive XML schema

    Hello,
    I'm facing a problem with querying XML data that is valid against a recursive XML Schema. I have got a table category that stores data as binary XML using Oracle 11g Rel 2 on Windows XP. The XML Schema is the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="bold_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="keyword_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
                   <xs:element name="plain_text" type="xs:string"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="emph_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="text_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="parlist_type">
              <xs:sequence>
                   <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded" type="listitem_type"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="listitem_type">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="parlist" type="parlist_type"/>
                   <xs:element name="text" type="text_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:element name="category">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name"/>
                        <xs:element name="description">
                                  <xs:complexType>
                                            <xs:choice>
                                                           <xs:element name="text" type="text_type"/>
                                                           <xs:element name="parlist" type="parlist_type"/>
                                            </xs:choice>
                                  </xs:complexType>
                        </xs:element>
                                                                </xs:sequence>
                                                                <xs:attribute name="id"/>
                                            </xs:complexType>
                        </xs:element>
    </xs:schema>I registered this schema and created the category table. Then I inserted a new row using the code below:
    insert into category_a values
    (XMlElement("category",
          xmlattributes('categoryAAA' as "id"),
          xmlforest ('ma categ' as "name"),
          (xmlelement("description", (xmlelement("text", 'find doors blest now whiles favours carriage tailor spacious senses defect threat ope willow please exeunt truest assembly <keyword> staring travels <bold> balthasar parts attach </bold> enshelter two <emph> inconsiderate ways preventions </emph> preventions clasps better affections comes perish </keyword> lucretia permit street full meddle yond general nature whipp <emph> lowness </emph> grievous pedro')))    
    The row is successfully inserted as witnessed by the results of row counting. However, I cannot extract data from the table. First, I tried using SqlPlus* which hangs up and quits after a while. I then tried to use SQL Developer, but haven't got any result. Here follow some examples of queries and their results in SQL Developer:
    Query 1
    select * from category
    Result : the whole row is returned
    Query 2
    select xmlquery('$p/category/description' passing object_value as "p" returning content) from category
    Result: "SYS.XMLTYPE"
    now I tried to fully respect the nested structure of description element in order to extract the text portion of <bold> using this query
    Query 3
    select  xmlquery('$p/category/description/text/keyword/bold/text()' passing object_value as "p" returning content) from  category_a
    Result: null
    and also tried to extract the text portion of element <text> using this query
    Query 4
    select  xmlquery('$p/category/description/text/text()' passing object_value as "p" returning content) from  category_a
    Result: "SYS.XMLTYPE".
    On the other hand, I noticed, from the result of query 1, that the opening tags of elements keyword and bold are encoded as the less than operator "&lt;". This explains why query 3 returns NULL. However, query 4 should display the text content of <text>, which is not the case.
    My questions are about
    1. How to properly insert the XML data while preserving the tags (especially the opening tag).
    2. How to display the data (the text portion of the main Element or of the nested elements).
    The problem about question 1 is that it is quite unfeasible to write a unique insert statement because the structure of <description> is recursive. In other words, if the structure of <description> was not recursive, it would be possible to embed the elements using the xmlelement function during the insertion.
    In fact, I need to insert the content of <description> from a source table (called category_a) into a target table (+category_b+) automatically .
    I filled category_a using the Saxloader utility from an flat XML file that I have generated from a benchmark. The content of <description> is different from one row to another but it is always valid with regards to the XML Schema. The data is properly inserted as witnessed by the "select * from category_a" instruction (500 row inserted). Besides, the opening tags of the nested elements under <description> are preserved (no "&lt;"). Then I wrote a PL/SQL procedure in which a cursor extracts the category id and category name into varchar2 variables and description into an XMLtype variable from category_a. When I try to insert the values into a category_b, I get the follwing error:
    LSX-00213: only 0 occurrences of particle "text", minimum is 1which tells that the <text> element is absent (actually it is present in the source table).
    So, my third question is why are not the tags recognized during the insertion?
    Can anyone help please?

    Hello,
    indded, I was using an old version of Sqlplus* (8.0.60.0.0) because I had a previous installation (oracle 10g XE). Instead, I used the Sqlplus* shipped with the 11g2database (version 11.2.0.1.0). All the queries that I wrote work fine and display the data correctly.
    I also used the XMLSERIALIZE function and can now display the description content in SQL Developer.
    Thank you very much.
    To answer your question Marco, I registered the XML Schema using the following code
    declare
      doc varchar2(4000) := '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="bold_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="keyword_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
                   <xs:element name="plain_text" type="xs:string"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="emph_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="text_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="parlist_type">
              <xs:sequence>
                   <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded" type="listitem_type"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="listitem_type">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="parlist" type="parlist_type"/>
                   <xs:element name="text" type="text_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:element name="category">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name"/>
                        <xs:element name="description">
                                  <xs:complexType>
                                            <xs:choice>
                                                           <xs:element name="text" type="text_type"/>
                                                           <xs:element name="parlist" type="parlist_type"/>
                                            </xs:choice>
                                  </xs:complexType>
                        </xs:element>
                                                                </xs:sequence>
                                                                <xs:attribute name="id"/>
                                            </xs:complexType>
                        </xs:element>
    </xs:schema>';
    begin
      dbms_xmlschema.registerSchema('/xmldb/category_auction.xsd', doc,     LOCAL      => FALSE, 
            GENTYPES   => FALSE,  GENBEAN    => FALSE,   GENTABLES  => FALSE,
             FORCE      => FALSE,
             OPTIONS    => DBMS_XMLSCHEMA.REGISTER_BINARYXML,
             OWNER      => USER);
    end;then, I created the Category table as follows:
    CREATE TABLE category_a of XMLType XMLTYPE store AS BINARY XML
        XMLSCHEMA "xmldb/category_auction.xsd" ELEMENT "category";Now, there still remains a problem of how to insert the "description" content which I serialized as a CLOB data into another table as XML. To this purpose, I wrote a view over the Category_a table as follows:
    CREATE OR REPLACE FORCE VIEW "AUCTION_XWH"."CATEGORY_V" ("CATEGORY_ID", "CNAME", "DESCRIPTION") AS
      select category_v."CATEGORY_ID",category_v."CNAME",
      XMLSerialize(content ( xmlquery('$p/category/description/*' passing object_value as "p" returning content)) as clob) as "DESCRIPTION"
      from  auction.category_a p, 
    xmltable ('$a/category' passing p.Object_Value as "a"
    columns  category_id varchar2(15) path '@id',
              cname varchar2(20) path 'name') category_v;Then, I wrote a procedure to insert data into the Category_xwh table (the source and target tables are slightly different: the common elements are just copied wereas new elements are created in the target table). The code of the procedure is the following:
    create or replace PROCEDURE I_CATEGORY AS
    v_cname VARCHAR2(30);
    v_description clob ;
    v_category_id VARCHAR2(15);
    cursor mycursor is select category_id, cname, description from category_v;
    BEGIN
    open mycursor;
      loop
      /*retrieving the columns*/
      fetch mycursor into v_category_id, v_cname, v_description ;
      exit when mycursor%notfound;
      insert into category_xwh values
      (XMlElement("category",
          xmlattributes(v_category_id as "category_id"),
          xmlelement("Hierarchies", xmlelement("ObjHierarchy", xmlelement ("H_Cat"),
                                                               xmlelement ("Rollsup",
                                                                                  (xmlelement("all_categories",
                                                                                   xmlattributes('allcategories' as "all_category_id")))
        xmlforest (
                  v_cname as "cat_name",
                  v_description as "description")    
    end loop;
      commit;
      close mycursor;
    END I_CATEGORY;When I execute the procedure, I get the following error:
    LSX-00201: contents of "description" should be elements onlyso, I just wonder if this is because v_description is considered as plain text and not as XML text, even if its content is XML. Do I need to use a special function to cast the CLOB as XML?
    Thanks for your help.
    Doulkifli

  • RuleAuthor : error importing XML Schemas into Data Model

    Hi,
    I have problems during import XML Schema in my Data Model.
    I'm following these steps:
    1) Click Definitions tab;
    2) Click XMLFact;
    3) Click Create
    4) I enter the path for the schema and the directory to store JAXB-generated classes. In this directory every user has all permission (777).
    In the next step when I click on "Add Shemas" I have this error:
    java.io.IOException: Not enough space at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:53) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at java.lang.ProcessBuilder.start(ProcessBuilder.java:451) at java.lang.Runtime.exec(Runtime.java:591) at java.lang.Runtime.exec(Runtime.java:429) at java.lang.Runtime.exec(Runtime.java:326) at oracle.rules.sdk.datamodel.impl.DataModelUtil.compileJavaFile(DataModelUtil.java:479) at oracle.rules.sdk.datamodel.DataModelManager.addXMLSchemaPath(DataModelManager.java:984) at oracle.rules.sdk.mapper.RuleObjectHelper.addSchemapath(RuleObjectHelper.java:2759) at oracle.rules.ra.uix.mvc.SchemaSelectorEH.addSchema(SchemaSelectorEH.java:138) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at oracle.rules.ra.uix.mvc.BeanEH.genericHandleEvent(BeanEH.java:869) at oracle.rules.ra.uix.mvc.BeanEH.handleEvent(BeanEH.java:838) at oracle.cabo.servlet.event.TableEventHandler.handleEvent(Unknown Source) at oracle.cabo.servlet.event.TableEventHandler.handleEvent(Unknown Source) at oracle.cabo.servlet.event.BasePageFlowEngine.handleRequest(Unknown Source) at oracle.cabo.servlet.AbstractPageBroker.handleRequest(Unknown Source) at oracle.cabo.servlet.ui.BaseUIPageBroker.handleRequest(Unknown Source) at oracle.cabo.servlet.PageBrokerHandler.handleRequest(Unknown Source) at oracle.cabo.servlet.UIXServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)
    I cannot find the solution!
    Can someone help me?
    Thanks.

    Do you still have enough disk space available on your file system to store the different xml-facts the RuleAuthor will create for you?

  • Oracle Apps R2 requires XSD in data definition?

    Do you need an XSD file when setting up your data definition?
    Message was edited by:
    user456127

    The XML Schema is NOT required, but optional. You can still upload your XML output example in the other two fields and it works fine :-).
    Message was edited by:
    user456127

  • Mapping with xml-schema XML-data to relational tables

    Hello,
    is it possible to map data from xml documents to relational tables with xml-schema?
    I mean not in nested tables but in relational tables with primary and foreign keys!
    With SQL Server 2005 it is very easy, I dont believe that Oracle couldn't do this!
    I searched but i cant find anything about that!
    Thx
    user445232

    indeed, oracle does this for xml schema based xmltype data, however, these underlying tables are not accessable to the application. Maybe It should for next version, so folks who like to use relational model can use it without mapping it manually.
    Actually, nested tables, are the same, their underlying tables (segments) are indeed relational tables, oracle manages them internally and not visiable to the application. You can find them in the user_segments, user_objects views though.

  • Is JAXB the best solution to store XML schema in databse

    Hi, i have a doubt regarding which is better way to store XML schema to database.
    I have looked on JAXB, DOM, SAX.
    I should be able to modify the database and store back the changes in XML schema..
    i am really consfused about this.
    plz suggest me
    thanx

    Thank you for your reply
    As per as I know JAXB take XML schema as basis to
    create tables in database and store the XML data
    according to that . I want to store the XML Data in
    the database structured according to XML schema
    defined by me.I'm not sure how a schema would impact this. Schema is a data definition that constraints a given XML data document. The XML itself is stored as a string. Databases like Oracle now have XML column types and allow you to use XML querying languages and x-Path in normal SQL queries.
    There are 2 types of mapping from XML to datbase
    Table space and object relational
    A tablespace is conceptually similar to a namespace. Object relational mappers go from objects to relational databases and back. I do not see how either of these two concepts are mutually exclusive. And the latter makes no sense if you talking about an object database. There is no O/R mapping because there is no relational database, it's an object database.
    I want to do object-relational mapping from XML to
    o object oriented database . and the modifications
    done on the datbase want to store again in XML. As
    per as I know JAXB give us classes as per the XML
    schema and we can write DDL to store the data in
    databse
    JAXB is for marshalling and unmarshalling Java objects to and from XML. The XML itself can be stored in any LOB database column.
    Is it the right approach or do you have any better
    idea?I still do not really understand what you are trying to do. It seems like you have a bit too much technology soup to consume. What are the actual requirements?
    - Saish

  • Xml Schema xs:choice element in dynamic forms

    Hi all,
    I'm developing an xml schema for creating the data model of a form. I connect LC Designer-8.2ES to this schema.
    In the schema I do have mutually exclusive elements implemented with a <xs:choice> element. A very comparable situation was described in this thread : http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=123 in 2007.
    The problem, as related in this thread, is that only the very first element of the choice is displayed in the generated pdf and I don't know how to display all parts as a real choice.  So what's the best way to let user fill in one part or the other of the choice?
    Does it need to be implemented with scripting (xfa...myform.presence = visible | hidden)?
    I want that only the filled element of the choice be exported from the form, the resulting xml being valid according the schema. I seems to work, but as of now, only for the first element...
    BTW, what's the best document describing what parts of xml schema are usable in dynamic XFA forms?  Is it 100% compatible?  I've observed that the constraints in my schema are not validated in the forms.  Shouldn't xml schema generate validating script in LCD? Does it apply for a subset of xml schema?
    Thanks in advance,
    jgrd

    Hi all,
    finally, I understand that we cannot use "anonymous" sequences neither in LiveCycle (like this following example where person might have many email)
        <xs:element name="person">
            <xs:complexType>
                <xs:sequence maxOccurs="unbounded">
                    <xs:element name="email" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
    valid instance with 3 emails :
    <person xsi:noNamespaceSchemaLocation="Untitled39.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <email>String</email>
        <email>String</email>
        <email>String</email>
    </person>
    In LC Designer, element with same name (<email>) are not used AFAK.  Maybe I'm wrong?
    The same hands with <xs:choice> where only first choice appears in pdf although being present in LC Designer.
    As for sequences, my idea is to produce <email1>, <email2>, etc. in a static schema, before connecting schema's data to LCD.
    Hope someone can show up and tell it's the right way or not.
    Regards
    jgrd

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

Maybe you are looking for