Relational and/or XML DB approach

Hi:
I have some (lots of!) questions regarding the proper use of and mixing of relational aspects of Oracle 9i/10g and the XML DB part.
Assume I have a large amount of free text documents (e.g., emails or something) and those documents contain certain data I am able to parse out (names, addresses, emails addreses, etc.).
I want to store the entire document as a CLOB or something at some level so that I can do an Oracle Text search on any word or phrase and find the documents that contain it. But I also want to be able to make queries like "return address_info where last_name like '%sm%'" or something. What's the best (for search flexibility, maintainability, loading, etc.) way to do this? I have a situation where sometimes I'll just want to search for keywords or phrases where they occur ANYWHERE in the document, and sometimes I'll want to search for a field with a certain value (e.g. LAST_NAME). And for those regular table type queries, I'll of course want to do joins and oother normal DB things.
Here are some options I see. Any comments on them? Am I missing anything?:
1) I can store the structured information in separate tables IN ADDITION to the document as a CLOB. But this means storing certain data twice.
2) I can try and make the document and XML document with the proper "<LAST_NAME>SMITH</LAST_NAME>" type info in it and possibly use Oracle Text with tag searching??
a) But won't I pretty much lose the ability to EFFICIENTLY do joins and things like that as I could if that information is in a regular table?
b) Performance-wise, don't I pretty much need to use an XML Schema backed table? That means I can't just put any old XML in the CLOB, it needs to conform to a certain SCHEMA. When that changes, I have to reload all the XML CLOB data :(
c) If I have different types of documents and put them each in their own XML Schema based tables, then make Oracle Text indexes on each one, can a query that searches multiple Context Indexes be parallelized efficiently by Oracle?
3) What are the performance issues (i.e., is it OK or "don't even think about it") of storing the docs as XML CLOBS and creating Object/Relational views for the relational queries of names, addresses, etc.?
3) What are the ramifications in the different approaches if I have a "large" number of new documents to load each day?

Hi,
Possibly you can your XML DB related queries in the OTN XMLDB forum at the following URL for speedier response: XML DB
-Shefali

Similar Messages

  • Bridge between a relational DB and an XML based DB

    Hi:
    Iam implementing a repository which acts as a bridge between a relational db and an xml db, has any work already been done in this area ?

    It seems to me you have 3 choices...
    1. Re-invent the wheel from the ground up. Having been involved in both iFS and XML DB I can only comment that creating an repository on top of relational data is a non-trivial task, even when you have access to the database source code....
    2. Abandon database independance and create a solution that leverages the features of Oracle XML DB. This will give you the quickest time to market.
    3. Consider creating a facade over the Oracle XML DB resource API. Your facade would hand processing off to Oracle XML DB when the underlying database was 9iR2. In the case of earlier or non oracle databases you would need to implement more of the logic in the application layer.

  • Removing tags and joining xml to a relational table

    db ver 11.2
    New to do the whole XML thing so trying hard to figure it out.
    I want to join from cdata value to a relational table
    the XML is
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
      <RN>1</RN>
      <EMP_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete</FNAME>
        <ADDRESS>x1 rd</ADDRESS>
       </EMP_ROW_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete</FNAME>
        <ADDRESS>x1 rd</ADDRESS>
       </EMP_ROW_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete2</FNAME>
        <ADDRESS>x2 rd</ADDRESS>
       </EMP_ROW_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete3</FNAME>
        <ADDRESS>x4 rd</ADDRESS>
       </EMP_ROW_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete</FNAME>
       </EMP_ROW_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete3</FNAME>
        <ADDRESS>x4 rd</ADDRESS>
       </EMP_ROW_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>2</RN>
      <EMP_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete</FNAME>
       </EMP_ROW_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>3</RN>
      <EMP_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete3</FNAME>
        <ADDRESS>x4 rd</ADDRESS>
       </EMP_ROW_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>4</RN>
      <EMP_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete4</FNAME>
        <ADDRESS>a str</ADDRESS>
       </EMP_ROW_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete3</FNAME>
        <ADDRESS>b str</ADDRESS>
       </EMP_ROW_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>5</RN>
      <EMP_ROW>
       <EMP_ROW_ROW>
        <FNAME>bob1</FNAME>
        <ADDRESS>c str</ADDRESS>
       </EMP_ROW_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>6</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>7</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>8</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>9</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>10</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>11</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>12</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>13</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>14</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>15</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>16</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>17</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>18</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>19</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>20</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    </ROWSET>the relational table is:
    create table t(
    rn  number primary key
    with 20 rows 1 to 20the results should be in a relational table
    RN               XML
    1        <EMP_ROW>
              <EMP_ROW_ROW>
            <FNAME>pete</FNAME>
           <ADDRESS>x1 rd</ADDRESS>
         </EMP_ROW_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete</FNAME>
        <ADDRESS>x1 rd</ADDRESS>
       </EMP_ROW_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete2</FNAME>
        <ADDRESS>x2 rd</ADDRESS>
       </EMP_ROW_ROW>
         <EMP_ROW_ROW>
          <FNAME>pete3</FNAME>
          <ADDRESS>x4 rd</ADDRESS>
         </EMP_ROW_ROW>
         <EMP_ROW_ROW>
          <FNAME>pete</FNAME>
         </EMP_ROW_ROW>
         <EMP_ROW_ROW>
          <FNAME>pete3</FNAME>
          <ADDRESS>x4 rd</ADDRESS>
         </EMP_ROW_ROW>
        </EMP_ROW>
    2       <EMP_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete</FNAME>
       </EMP_ROW_ROW>
      </EMP_ROW>I am wanting to join on the <RN> to the RN in the relational table.
    Been trying at this for a bit .. seems like xmltable and xquery should get me there but have problems.

    I guess since there are many and duplicate <RN> in the XML the function returns one row
    <RN>1</RN><RN>2</RN><RN>3</RN><RN>4</RN><RN>5</RN><RN>6</RN><RN>7</RN><RN>8</RN><RN>9</RN><RN>10</RN><RN>11</RN><RN>12</RN><RN>13</RN><RN>14</RN><RN>15</RN><RN>16</RN><RN>17</RN><RN>18</RN><RN>19</RN><RN>20</RN>     "<?xml version="1.0"?>
    <ROWSET>
    <ROW>
      <RN>1</RN>
      <EMP_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete</FNAME>
        <ADDRESS>x1 rd</ADDRESS>
       </EMP_ROW_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete</FNAME>
        <ADDRESS>x1 rd</ADDRESS>
       </EMP_ROW_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete2</FNAME>
        <ADDRESS>x2 rd</ADDRESS>
       </EMP_ROW_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete3</FNAME>
        <ADDRESS>x4 rd</ADDRESS>
       </EMP_ROW_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete</FNAME>
       </EMP_ROW_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete3</FNAME>
        <ADDRESS>x4 rd</ADDRESS>
       </EMP_ROW_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>2</RN>
      <EMP_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete</FNAME>
       </EMP_ROW_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>3</RN>
      <EMP_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete3</FNAME>
        <ADDRESS>x4 rd</ADDRESS>
       </EMP_ROW_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>4</RN>
      <EMP_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete4</FNAME>
        <ADDRESS>a str</ADDRESS>
       </EMP_ROW_ROW>
       <EMP_ROW_ROW>
        <FNAME>pete3</FNAME>
        <ADDRESS>b str</ADDRESS>
       </EMP_ROW_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>5</RN>
      <EMP_ROW>
       <EMP_ROW_ROW>
        <FNAME>bob1</FNAME>
        <ADDRESS>c str</ADDRESS>
       </EMP_ROW_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>6</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>7</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>8</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>9</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>10</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>11</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>12</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>13</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>14</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>15</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>16</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>17</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>18</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>19</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    <ROW>
      <RN>20</RN>
      <EMP_ROW>
      </EMP_ROW>
    </ROW>
    </ROWSET>
    "

  • Best way to read and parse XML to multiple tables

    This is first time using XML input file for JDev ADF 10.1.3.3 application. We are trying to develop an XML API that the application will read and process. A simple XML record would have field tags for table AA which has 1 to many tags for table BB. Table BB contains 0 to many tags for tables: CC, DD, and EE. Naturnally, the database is relational and there exist Foreign Keys for the Master-Detail relationships that are represents as View Objects in the JDev application.
    What is the best way for us to design and code this API?

    Hi,
    I don't really see any better options for SharePoint. SharePoint use other production called 'Office Web App' to allow users to view/edit Microsoft Office documents (word, excel etc.). But the web version of excel doesn't support that much records as well
    as there's size limitations (probably the default max size is 10MB).
    Regarding second problem, I think you need some custom solutions (like a SharePoint timer job/webpart ) to read and present data.
    However, if you can reduce the excel file records to something near 16k (which is supported rows in web version of excel) then you can use SharePoint Excel service to refresh data automatically in the excel file in SharePoint from some external sources.
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • How to write and read Xml file from database if possible?

    Hi all,
    I need to read the .Xml file when receives from Source systems and write the data into the table as well as write in the.xml file thru reading the data from table as per the client needs. I am stranger to this area. Since, please provide some examples how to approach the same.
    Thanks in advance !!
    Regards.
    Vissu.....

    The XML DB forum is better suited to your question.
    It also has a FAQ which details how to read and shred XML into tables as well as other common XML based questions...
    XML DB FAQ

  • Help on creating and deleting xml child elements using Toplink please.

    Hi there,
    I am trying to build a toplink xml demo illustrating toplink acting as the layer between my java code and an xml datasource.
    After pulling my custom schema into toplink and following the steps in http://www.oracle.com/technology/products/ias/toplink/preview/10.1.3dp3/howto/jaxb/index.htm related to
    Click on Mapping Workbench Project...Click on From XML Schema (JAXB)...
    I am able to set up java code which can run get and sets against my xml datasource. However, I want to also be able create and delete elements within the xml data for child elements.
    i.e. in a simple scenario I have a xsd for departments which has an unbounded element of type employee. How does toplink allow me to add and or remove employees in a department on the marshalled xml data source? Only gets and sets for the elements seem accessible.
    In my experience with database schema based toplink demos I have seen methods such as:
    public void setEmployeesCollection(Collection EmployeesCollection) {
         this.employeesCollection = employeesCollection;
    Is this functionality available for xml backended toplink projects?
    cheers
    Nick

    Hi Nick,
    Below I'll give an example of using the generated JAXB object model to remove and add a new node. The available APIs are defined in the JAXB spec. TopLink also supports mapping your own objects to XML, your own objects could contain more convenient APIs for adding or removing collection members
    Example Schema
    The following XML Schema will be used to generate a JAXB model.
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
         elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="department">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="employee" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="employee">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>---
    Example Input
    The following document will be used as input. For the purpose of this example this XML document is saved in a file called "employee-data.xml".
    <department>
         <employee>
              <name>Anne</name>
         </employee>
         <employee>
              <name>Bob</name>
         </employee>
    </department>---
    Example Code
    The following code demonstrates how to use the JAXB APIs to remove the object representing the first employee node, and to add a new Employee (with name = "Carol").
    JAXBContext jaxbContext = JAXBContext.newInstance("your_context_path");
    Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
    File file = new File("employee-data.xml");
    Department department = (Department) unmarshaller.unmarshal(file);
    // Remove the first employee in the list
    department.getEmployee().remove(0);
    // Add a new employee
    ObjectFactory objectFactory = new ObjectFactory();
    Employee newEmployee = objectFactory.createEmployee();
    newEmployee.setName("Carol");
    department.getEmployee().add(newEmployee);
    Marshaller marshaller = jaxbContext.createMarshaller();
    marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
    marshaller.marshal(department, System.out);---
    Example Output
    The following is the result of running the example code.
    <department>
         <employee>
              <name>Bob</name>
         </employee>
         <employee>
              <name>Carol</name>
         </employee>
    </department>

  • Relations and failover / restart

    Hi -
    I'd be grateful if someone could point me in the right direction - it feels like I'm missing something here.
    If an agent in the EPN correlates between two streams by introducing relations and joining on them, how should we handle node restarts?
    For example, if a relation stores the last hour's set of events on a stream, how do we best repopulate it when the node is restarted?
    As we are running on a cluster, just the single node, or the entire cluster may be restarted.
    Background
    We run CEP on a cluster (not HA mode). There is surplus capacity in the cluster - if we lose a server or a JVM, the Coherence data mastered there will repartition to another node. The 'insertion' of a row into a local Coherence backing store is the trigger for the events into the CEP - so data repartitioning to a node will cause the CEP on that node to process the data through the EPN (usually reprocess it because it's already been processed elsewhere).
    I am trying to understand how to use relations (and continuous queries, which have similar properties) in this type of environment - how to maintain or rebuild state after a restart.
    -thanks, Barney

    Hi Barney,
    Technically what you want is an "upstream backup" - this can be achieved by using coherence as a durable source of events and replay the events from Coherence in the case of a restart. If your relation moves in time then the other approach is to use servers in parallel to maintain continuity - in the simple case you have two servers processing the same set of events but only one outputing results (co-ordinated by any one of the HA adapters that we ship). If you restart one of these then the other node will output the correct sequence until the relation window has been rebuilt in the newly started server, at that point you can restart the other server.
    andy

  • Converting Relational query to XML

    set serveroutput on
    This is the code of a query to convert a relational query to xml. This code runs fine when I place the where condition at the end. e.g. where h.hospital_id=1. however when i place no such condition it begins returning errors such as
    set serveroutput on
    set long 10000000
    set linesize 50000
    set lines 20000
    set pagesize 0
    set pages 5
    set feedback off
    set head off
    SET TRIMSPOOL ON
    set long 200000000
    set linesize 32000
    set pagesize 0
    set pages 0
    set feedback off
    set head off
    Select XMLELEMENT("have:HospitalStatus",XMLAttributes('urn:oasis:names:tc:emergency:EDXL:HAVE:1.0 edxl-have_cs01.xsd' AS
                                      "xsi:schemaLocation",
                                              'urn:oasis:names:tc:emergency:EDXL:HAVE:1.0' AS
                                      "xmlns:have",
                                    'http://www.georss.org/georss' AS
                                      "xmlns:n3",
                                    'http://www.opengis.net/gml' AS
                                      "xmlns:gml",
                                    'http://www.w3.org/2001/XMLSchema-instance' AS
                                      "xmlns:xsi",
                                    'urn:oasis:names:tc:ciq:xal:3' AS
                                      "xmlns:xal",
                                    'urn:oasis:names:tc:ciq:xnl:3' AS
                                      "xmlns:xnl",
                                    'urn:oasis:names:tc:ciq:xpil:3' AS
                                      "xmlns:xpil"                                        
         xmlagg(                    
         xmlelement("have:Hospital",
         xmlforest
              (     h.hospital_id,          
                   xmlforest(
                   xmlforest(
                   h.name,               
                   h.info,          
                   h.addresses     ,          
                   h.contact_numbers) as "OrganizationInformation",     
                   xmlforest(
                   h.geo_location) as "OrganizationGeoLocation",
                   h.comments) as "Organization"
                   xmlelement("have:EmergencyDepartmentStatus",
                   (select xmlagg(
                   xmlforest(
                             eds.date_updated,
                   xmlforest(
                             eds.ems_traffic_status,
                             eds.ems_traffic_reason) as "EMSTraffic",          
                   xmlforest(
                             tcl.url,
                             tc.date_updated,
                             tc.code_value,
                             tc.ems_capacity
                        ) as "EMSCapacity",     
                   xmlforest(
                             tcl.url,
                             tc.date_updated,
                             tc.code_value,
                             tc.ems_census) as "EMSCensus",
                             xmlforest(
                             eds.ems_amb_offload_status,
                             eds.ems_amb_offload_min) as "EMSAmbulanceStatus",
                             xmlforest(
                             eds.ems_air_offload_status,
                             eds.ems_air_offload_min )as "EMSAirTransportStatus"
                   from EmergencyDepartmentStatus eds,TriageCode tc,TriageCodeListURN tcl
                   where eds.hospital_id = h.hospital_id and tc.hospital_id = h.hospital_id and tcl.hospital_id = h.hospital_id)),     
                             xmlelement("have:HospitalBedCapacityStatus",
                   (select xmlagg(xmlelement("have:BedCapacity",
                   xmlforest(
                             mb.date_updated,
                             mb.bed_no,
                             mb.bed_type,
                             xmlforest(
                             mb.capacity_status,
                             mb.available_count,
                             mb.baseline_count,
                             mb.additional_24hr,
                             mb.additional_72hr) as "Capacity",
                             mb.comments
                   from MainBeds mb
                   where mb.hospital_id = h.hospital_id and mb.bed_no NOT IN(select mb.bed_no from MainBeds mb, SubBeds sb where mb.bed_no=sb.bed_no )
                   (select xmlagg(xmlelement("have:BedCapacity",
                   xmlforest(
                             mb.date_updated,
                             mb.bed_no ,
                             mb.bed_type,
                             xmlforest(
                             mb.capacity_status
                                                 ) as "Capacity",
                             mb.comments
                                  ),(select xmlagg(
                   xmlforest(
                                  sb.date_updated,
                                  sb.bed_no,
                                  sb.sub_bed_no,
                                  xmlforest(
                                  sb.capacity_status,
                                  sb.available_count,
                                  sb.baseline_count,
                                  sb.additional_24hr,
                                  sb.additional_72hr) as "Capacity",
                                  sb.comments
                                  )from SubBeds sb  where mb.bed_no = sb.bed_no and sb.bed_no=h.hospital_id )
                   from MainBeds mb
                   where mb.hospital_id = h.hospital_id and mb.bed_no in (select unique mb.bed_no from MainBeds md, SubBeds sb where sb.bed_no=mb.bed_no))
                   xmlelement("have:ServiceCoverageStatus",
                   (select xmlagg(
                   xmlforest(
                             scs.date_updated,
                             scs.burn,
                             xmlelement("CardiologySubType",
                                  xmlforest(scs.cardiology_invasive,
                                  scs.cardiology_non_invasssive)) as "CardiologyIndicator",
                             scs.dialysis,
                             scs.emergency_dept,
                             scs.hyperbaric_chamber,
                             scs.infectious_diseases,
                             scs.neonatology,
                             xmlforest(xmlforest(
                                  scs.neurology_invassive,
                                  scs.neurology_non_invasssive) as "NeurologySubType") as "NeurologyIndicator",
                             xmlforest(xmlforest(
                                  scs.obgyn_with_labor,          
                                  scs.obgyn_without_labor) as "OBGYNSubType")as "OBGYNIndicator",
                             scs.opthalmology,
                             scs.orthopedic,
                             scs.pediatrics,
                             xmlforest(
                                  xmlforest(scs.psychiatry_adult_general,
                                  scs.psychiatry_pediatric) as"PsychiatrySubType")as "PsychiatryIndicator",
                             xmlforest(
                                  xmlforest(
                                  sst.date_updated,
                                  sst.general_ward,
                                  sst.adult_general,
                                  sst.pediatrics,
                                  sst.orthopedics,
                                  sst.nuero_surgery,
                                  sst.facial,
                                  sst.cardio_thoracic,
                                  sst.hand,
                                  sst.reimplantation,
                                  sst.spinal,
                                  sst.vascular,
                                  sst.anesthesia) as "SurgerySubTypes") as "SurgeryIndicator",
                             xmlforest(xmlforest(
                             scs.ambulance_services,
                             scs.air_transport_services) as "TransportServicesSubType") as "TransportServicesIndicator",
                             xmlforest(xmlforest(
                             scs.trauma_service,
                             scs.trauma_service_level) as "TraumaCenterServicesSubType")as "TraumaCenterServicesIndicator"
                   from ServiceCoverageStatus scs, SurgerySubTypes sst
                   where scs.hospital_id = h.hospital_id and sst.hospital_id = h.hospital_id)),
                   xmlelement("have:HospitalFacilityStatus",
                   (select xmlagg(     
                   xmlforest(
                             hfs.date_updated,               
                             hfs.hospital_eoc_status,
                             hfs.hospital_eoc_plan,          
                             hfs.clinical_status,
                             xmlforest(
                                  dc.date_updated,
                                  dc.decon_capacity_status,
                                  dc.amb_patients_capacity,
                                  dc.non_amb_patients_capacity) as "DeconCapacity",
                             xmlforest(
                             mc.date_updated,
                             mc.morgue_capacity_status,
                             mc.morgue_capacity_units) as "MorgueCapacity",
                             hfs.facility_status,               
                             hfs.security_status,     
                             xmlforest(
                                  ah.date_update,
                                  ah.admissions,
                                  ah.discharges,
                                  ah.deaths) as "Activity24hr",
                             hfs.comments,
                             hfs.clinical_operations,     
                             hfs.resources_information
                   from HospitalFacilityStatus hfs,Activity24hr ah,MorgueCapacity mc,DeconCapacity dc
                   where hfs.hospital_id = h.hospital_id and ah.hospital_id = h.hospital_id and mc.hospital_id = h.hospital_id
                   and dc.hospital_id = h.hospital_id)),     
                   xmlelement("have:HospitalResourceStatus",
                   (select xmlagg(
                   xmlforest(
                             hr.date_updated,
                             hr.staffing,
                             hr.facility_operations,
                             hr.clinical_operations,     
                             hr.comments
                   from HospitalResourceStatus hr
                   where hr.hospital_id = h.hospital_id)),
              xmlforest(h.last_update_time) as "UpdateTime"
              ))).extract('/*')
    from hospital h;__________________________________________________________________________________________________________
    ERROR:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00225: end-element tag "HOSPITAL_EOC_STATUS" does not match start-element tag "have:HospitalStatus"
    Error at line 1
    ORA-06512: at "SYS.XMLTYPE", line 111
    Edited by: 872489 on 14-Jul-2011 03:59
    Edited by: 872489 on Jul 14, 2011 9:11 AM
    Apologies for lack of formatting earlier

    Please repost this and use the tag with some decent formatting.
    See the FAQ Posting Guidelines on the main page of this XMLDB OTN Forum                                                                                                                                                                                                                                                                                               

  • Cannot trigger an update using simple relation and Change Tracking

    I have a three entity master-detail setup. E3 has a domain key to E2 that has a domain key to E1. What I will like to see is a cascading attribute from the top (E1) being available (in the UI) for filtering in all three entities. In E1 no problem. In E2
    no problem, using domain key relation and a BR for updating a secondary attribute from E1 to E2. Now, bringing the attribute further from E1 to E3 (via E2) is the issue.
    1) if I make a BR in E3 that "equals" my shadow attribute in E3 to the E2.attribute, it populates the current value of the attribute, which is fine. But if the original attribute in E1 is updated the change is not reflected in E2/E3.
    2) then I include the relevant attributes in E1, E2 in a change tracking group in order to catch the issue mentioned in 1). I have created a BR using "Has Changed" in CT group. But now the attributes is no longer updated at all. It is like the
    first BR is being ignored. If I flag it as "Excluded", it works like in 1) again.
    To me it seems like an attribute can only be updated using one "trigger", is that right? Any suggestions to how to populate a value based on the change of another attribute in the same entity as well as on an cascading update in the "parent"
    entity?
    This must a simple scenario for most people using multiple linked entities. Am I overcomplicating stuff here or is there a more simple approach? Any input is most appreciated.
    On a side note, when is Change Tracking BR's executed? the records are flagged, but do I have to "apply BR" manually or use "validate version" for it to run? I would expect CT BT to execute in the background.
    /Stig

    >What I will like to see is a cascading attribute from the top (E1) being available (in the UI) for filtering in all three entities.
    Why not just create a hierarchy and use that in the UI?
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Entity include with relative path in XML using JAXB

    Moving this from the Java Technologies for Web Services forum to this one.
    With the jwsdp jars I'm trying to use JAXB to load in several specified XML files. This works fine. The XML files are read in from a relative link "/templates/mainXML.xml" and the xml string read in and passed to the unmarshaller as a StreamSource:
    BufferedReader reader = new BufferedReader(new InputStreamReader(getClass().getResource(xmlPath_).openStream()));
    while ( (line = reader.readLine()) != null) {
    buff.append(line.trim()+"\n");
    String xml = buff.toString();
    u.unmarshall(new StreamSource(new StringReader(xml)))
    But my XML files are becoming rather large with some repitition across the files so I'd like to use the entity incude in the header of the XML to abstract some of the XML into addMe.xml e.g:
    <!DOCTYPE StrategyTemplate [
    <!ENTITY IncludeTimeComponent SYSTEM "file:///templates/addMe.xml">]>
    with &IncludeTimeComponent;
    But it gives this error:
    Caused by: java.io.FileNotFoundException: \templates\addMe.xml (The system cannot find the path specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at java.io.FileInputStream.<init>(FileInputStream.java:66)
    at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
    at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
    at java.net.URL.openStream(URL.java:1007)
    at weblogic.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:836)
    at weblogic.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:767)
    at weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(XMLDocumentFragmentScannerImpl.java:1095)
    at weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1513)
    at weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
    at weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
    at weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
    at weblogic.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
    at weblogic.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
    at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
    at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:152)
    at com.lb.cmte.oms.interpreter.jaxb.impl.runtime.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:140)
    ... 11 more
    It works fine if I put the file in the working directory or supply the full path e.g.
    <!DOCTYPE StrategyTemplate [
    <!ENTITY IncludeTimeComponent SYSTEM "file:///C:/dev/templates/addMe.xml">]>
    with &IncludeTimeComponent;
    I've tried using jwsdp2.0 jars rather than 1.4 I was using previously, but with the same result.
    But I don't want to do that, because I don't know where that might be. I'd like to be able to supply the xml file's path as it would be shown within a JAR as I do currently for the mainXML.xml files. Thanks in advance for any help!

    Oh, I see why. When XML talks about a "relative path" that means relative to the URL the XML was loaded from. But when the parser doesn't have such a URL -- for example in cases like yours where you are parsing from a String -- then it falls back to assuming the XML was loaded from the current working directory.
    This is almost never a good assumption, but what else can it do?
    Looking at your code, I don't understand why you are parsing from a String anyway. All of that code that reads from an input stream, ignoring the line endings and putting back new line endings, seems pointless to me. You should just marshal directly from getClass().getResource(xmlPath_) as far as I can see. Then your relative paths would work just fine.

  • Unable to add Content-Type=multipart/related; type="text/xml";

    hi all
    am trying to add the following to my soap message that include attachment
    but its not working
    Content-Type=multipart/related; type="text/xml";
    boundary="----=_Part_0_14732323.1039686671216";
    Content-Length=4259;
    can any body help plzzzzzzzz

    Hello again,
    My solution works and does not work. Content type is ok, but strange characters appear to the end of the attachment data.
    Like this
    ...</E1EDS01></IDOC></ORDERS01>H úãž6×½ ã½5Õ×¼ÛgžÛNÝ}þ[ëMu201E
    Where did these come from? I tested in a way that I changed the ContentType back to application/xml and attachment is fine again.
    Regards,
    Pekka

  • Generating and Viewing XML Output without rdf

    Howdy,
    I have been dev Oracle Forms/Reports for over 10 years. We are now migrating all of our reports to BIP.
    To date when I have been developing these reports I have been using the old rdf files to "generate to a file" and thus get a nice, quick and dirty XML output file (what I am calling a “datafile”). Using this makes it substantially easier to then dev the format template. However going forward I/we would like to completely remove the Designer 2000 tool entirely when it comes to report development.
    How can we as developers can get our hands on the XML "datafiles" that are generated by the data templates in BIP? Are these stored anywhere on the server for the viewing? Is there another tool I can pop my Data template and SQL into and generate XML ‘with’ the correct groupings, ect.?
    Thanks in advance for any assistance/guidance you can provide.
    ScottC

    Or, from the browser see Note:394631.1
    1.Using System Administrator responsibility
    Nav:Profile->System
    query Viewer: Text, set this to Browser and save
    2. Using your Receivables responsibility
    Run the the XML report that is failing, note the request_id
    when it finishes, even with errors do this,
    View->Requests
    query this request_id
    click on Diagnostic button->View XML
    save the file to your PC by doing File->Save As
    3. Upload this XML data file.

  • XSLT Generation from input and output XML

    Is it possible to generate an XSL mapping file in Java if we have input and output XML.
    If yes, then how to achieve this when user defined functions are used during mapping?

    Hi Prateek,
    check the following links for Business connectors and adapter:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/92/3bc0401b778031e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/4fb240ac052817e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/3f93404f673028e10000000a1550b0/frameset.htm
    Hope these help you.
    Regards,
    Anuradha.B

  • Need to load multiple skins with only a single .swf and config.xml

    Hello
    These are part of some instructions that were of a AS3 Mp3 Store I purcased
    Well guys the new AS3 flash cart system can have skins hot swapped in and out with out having to recompile the actionscript code.
    You can even have multiple skins on the same cart and use different ones in different places of your website.
    This is all because the flash cart system itself runs seperate from the graphical user interface that the customer visits.
    When you purchase a new cart skin, or if you edit your own custom skin, you can place the swf file for it in the "skins" directory of your flash cart installation directory. Then in the config file where you "embed" the cart on your website you include the name of the skin you'd like to use (the skin MUST be available in your skins directory).
    The other plus to using the skin system is you can keep the cart application seperate from your site. No longer do you have to have all that ugly php code and cramped swf files floating along side your website html files. No instead you create an install directory then simply embed the cart from where ever it is. The only litigation is that the cart must exist on the same server as the website you are showing it publicly on.
    So right now I have a website with the store set up and working, allowing the buyer  to listen to the tracks, add to cart and checkout after which they are given an instant download link to the purcased files.
    What I want to do now though is break up the songs into differents carts/skins within a dropdown list in my website as quoted in the instructions above, according to genre.
    So I have published 4 different skins  as
    MusicSkin 1.fla
    MusicSkin 2.fla
    MusicSkin 3.fla
    MusicSkin 4.fla
    and have placed these on my server
    The cart works by Index.html > loads the Main.swf >loads MusicSkin.fla which is called by via config.xml 
    (<?xml version="1.0"?>
    -<config><skin src="MusicSkin"/><db src="/" sandbox="false" type="sql"/></config>
    I am having trouble configuring how to call on 4 different Skins into different pages on my site if I only have ONE index.html, Main.swc and config.xml files which according to the instructions is possible!
    Hope this makes sense, I get how it works on one skin but not how it works/or to make it work with multple ones on a website.

    Is this possible...anyone!!!!!!!!!!!!!!!!
    Really hoping to getting this working soon.
    I am wondering if i have to copy the instances of the different skins into the config file above and each swf and html file loads the corresponding on in the list, or does each instance require it's own config file, which would then be a problem I think, because I could not have 4 config.xml files in the same directory which is what the Action Script is calling on.

  • Purchase Order to Purchase Order using BPEL and/or XML Gateway

    Hi,
    Is there a way to do create a duplicate Purchase Order in another instance using BPEL and/or XML Gateway? We're looking to do A2A transactions, namely duplicating data from one instance to another (of course the functional setups would have to be the same). Thanks!!

    this is the perfect usace for the upcoming ESB (shuffling data with transforming from A to B) - but this can be done with BPEL too .. there are some solutions to this
    1) on a database level (db to db)
    2) having events setup'ed in the master instance, that fire a process that get's the data
    3) and then using the functions from iRep
    hth clemens

Maybe you are looking for

  • XI and R/3 System connection settings for IDOC to File scenerio.

    Hi SAP champs,                            I am working on a IDOC to File XI scenerio. But I am confused while configuring connection settings at XI system and R/3 system. I am finding problem in transaction IDX2 to maintain the IDOC metadata. Please

  • How to replace adobe photoshop 7 without disc with similar on 2nd computor

    I am not  very good with technology so pleease treat me as a total beginner. I have used adobe photoshop 7 on my old desktop pc for many years. I am now changing to a new laptop and have become aware I cannot have adobe 7 anymore.  What is the closes

  • Getting started with java is dead link

    otn home page > click 'Java' under 'Technologies' in left frame. > click 'Java' in the 'getting started box'. That link is broken.

  • Weblogic Assertion Error

    Hello, I have run into the following problem. When running a very long lasting bean transaction on one BEA Weblogic 6.1 SP2 application server I get no errors, but on the other one that in fact should be quite similar to the first one, I get: EJB Exc

  • Program to download on Non Unix Server location using SFTP

    Hi, What commands/function modules can use for download the file on Non Unix Server location using SFTP. Thanks, Fract