Mapping to XML TABLE

HI Everybody,
Could you help me a bit? I've got an XML schema (.xsd) and a corresponding XML document (.xml) file. I've registered the schema with Oracle XDB and loaded the XML document into XDB Repository using the object-relational storage technique. Fine--I can access it from SQL and PL/SQL using XPath. However, this is to be an integral part of a Java EE application, where I must be able to read specific fragments and nodes from my XML table and use the values in my Java classes for computations and to display them in different views. How to preceed? Which technology should I choose to map the table to classes?
In Toplink, I can unmarshal the document but since it is very big, this is no good practice to keep all data in memory. It should behave like an ordinary lookup table (as it is indeed).
Please state if you have an idea.
Thanks in advance, regards
Miklos HERBOLY

I have designed a simple relational table sturcture that can handle XML, in 4 brief tables. Email me [email protected] if interested.
null

Similar Messages

  • CS3: XML tables cause crashes?

    Hi everyone,
    We've been using XML with InDesign CS3 for a while now, generally with success. However, we have added InDesign XML tables to our work and have encountered an odd problem. We can import XML containing tables and they appear with the correct layout, and text inside the tables is correctly formatted by Map Tags to Styles (on paragraph-level tags inside the table cells, not the Table and Cell tags themselves). However, when we try to cut a selection that includes an XML table, InDesign frequently crashes.
    If we de-tag the tables, the problem goes away, but this is not really an option for us as we want to be able to Export XML once layout is complete.
    Has anyone else ever encountered this crash? What am I doing wrong?
    Many thanks!
    Lester

    Certainly, sorry, I should have done that first! It's in situations like this:
    <text paragraphSequence='200'>Some content text here</text>
    <Table xmlns:aid='http://ns.adobe.com/AdobeInDesign/4.0/' aid:table='table' aid:trows = '2' aid:tcols = '2'>
    <Cell aid:table='cell' aid:crows='1' aid:ccols='1'><text paragraphSequence='201'>Condition</text>
    <text paragraphSequence='202'><textCHRItalic>if</textCHRItalic> + present simple</text>
    </Cell>
    <Cell aid:table='cell' aid:crows='1' aid:ccols='1'><text paragraphSequence='203'>Result </text>
    <text paragraphSequence='204'><textCHRItalic>will/won&#x2019;t</textCHRItalic> + infinitive without <textCHRItalic>to</textCHRItalic></text>
    </Cell>
    <Cell aid:table='cell' aid:crows='1' aid:ccols='1'><text paragraphSequence='205'><textCHRBoldItalic>If </textCHRBoldItalic><textCHRItalic>you</textCHRItalic><textCHRBoldItalic> come</textCHRBoldItalic><textCHRItalic> fifteen minutes before the class starts,</textCHRItalic></text>
    <text paragraphSequence='206'><textCHRBoldItalic>If </textCHRBoldItalic><textCHRItalic>the weather</textCHRItalic><textCHRBoldItalic> is</textCHRBoldItalic><textCHRItalic> fine,</textCHRItalic></text>
    <text paragraphSequence='207'><textCHRBoldItalic>If </textCHRBoldItalic><textCHRItalic>Sam</textCHRItalic><textCHRBoldItalic> passes</textCHRBoldItalic><textCHRItalic> his exams,</textCHRItalic></text>
    <text paragraphSequence='208'><textCHRBoldItalic>If </textCHRBoldItalic><textCHRItalic>Alice</textCHRItalic><textCHRBoldItalic> doesn&#x2019;t eat</textCHRBoldItalic><textCHRItalic> her vegetables,</textCHRItalic></text>
    </Cell>
    <Cell aid:table='cell' aid:crows='1' aid:ccols='1'><text paragraphSequence='209'><textCHRItalic>I</textCHRItalic><textCHRBoldItalic>&#x2019;ll help</textCHRBoldItalic><textCHRItalic> you with your homework.</textCHRItalic></text>
    <text paragraphSequence='210'><textCHRItalic>we</textCHRItalic><textCHRBoldItalic>&#x2019;ll go </textCHRBoldItalic><textCHRItalic>swimming.</textCHRItalic></text>
    <text paragraphSequence='211'><textCHRItalic>his parents </textCHRItalic><textCHRBoldItalic>will buy</textCHRBoldItalic><textCHRItalic> him a car.</textCHRItalic></text>
    <text paragraphSequence='212'><textCHRItalic>she </textCHRItalic><textCHRBoldItalic>won&#x2019;t get</textCHRBoldItalic><textCHRItalic> any sweets.</textCHRItalic></text>
    </Cell>
    </Table>
    <text paragraphSequence='213'>More content text</text>
    Thanks,
    Lester.

  • Parse comma separated value and map with other table to get Name and change it back to comma separate.

    Hi,
    I have one existing view(with around 15 fields), in which I have to add few more fields from table called PI.
    Now these fields have values like (55C4444F-D83B-4F96-A011-367A3755BA6C , F52388E2-485B-49DF-8534-FDF46D23F59E , 722432E1-F063-4CBD-B83D-1B97836E82953) 3 values comma separated.(Sometimes only one value and sometimes 4 or 5 or 7-8 depend on user has entered
    on web page)
    Also I have another table called PHA and this tables has 2 fields Values and Name so I have to map this two tables based on VALUES fields and get Name from this PHA table and show in view and that also Comma separated.
    So basically I have to Parse the PI table's Values field 1st, map it with PHA table to get Name and then Make it comma separated in that existing view.
    To make fields comma separate I used below query,
    (SELECT DISTINCT SUBSTRING
                SELECT ','+ PI.[Name]  AS [text()]
                FROM [DB].[dbo].[Table] PHA1
    Inner Join  [DB].[dbo].[Table] PI
    ON PHA.[Value] = PI.[VALUE]
                WHERE PHA1.PId =PHA2.PId and PHA1.CId = PHA2.CId
                ORDER BY PHA1.PId
                For XML PATH ('')
            ), 2, 1000) 
    FROM [DB].[dbo].[Table] PHA2
    Inner Join [cSharpSite_profiles].[dbo].[PetAllergies] PA
    Inner Join  [DB].[dbo].[Table] PI
    ON PHA.[Value] = PI.[VALUE]
    ) [Name]
    Vicky

    Wait, this sounds wrong. You have a view where you group values into a comma-separated list. While that surely will make some purists cringe, I can see that it makes sense from a presentation perspective.
    But if you want to use these concatenated values as atomic values again, you should go back to the base tables and them from there. Building views on views may sometimes be a good idea, but if you are too keen on reuse you can cause a performance disaster.
    So do it right from the beginning.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • EJB mapping to database tables

    Hi Experts,
    I am moving my application from JBoss server to Netweaver server. For this i have to do all the maaping in ejb-jar and ejb-j2ee engine and persistence xml files. I am wondering the way how can i use my existing database tables for mapping to persistence xml.
    Every example says i have to create java dictionary project but if i go like this then i have to create hundreds of tables again which are already in my SQL database. Please let me know how i can map my database tables to my application fro deploying to Netweaver server.
    Thanks in Advance
    Regards,
    Chirag

    Hello,
    Java Dictionary stores its metainformation in xml - files, it meight be possible to create them on basis of existing tables.
    But: Java Dictionary only supports the default "system" - database that is unterneath NWAS.
    As i understand your problem, you want to connet to an other (existing) database - so you will have to create the mapping in persistence.xml. I would try to use a xml transformation to create persistence.xml
    hope it helps
    Johannes

  • Rendering xml-table into logical filename in SAP R/3

    Hi,
    I am trying to translate an xml-table with bytes into a logical filepath in SAP R3.
    Do I have to use the method gui-download or shall I loop the internal xml-table?
    When I tried to loop the xml-table into a structure, and then transfering the structure into the logical filename, I get problems with the line breaks in my xml-file. How do I get the lines to break exactly the same as I wrote them in my ABAP-code?
    Edited by: Kristina Hellberg on Jan 10, 2008 4:24 PM

    I believe you posted in the wrong forum.
    This forum is dedicated to development and deployment of .Net applications that connect and interact with BusinessObjects Enterprise, BusinessObjects Edge, or Crystal Reports Server. This includes the development of applications using the BusinessObjects Enterprise, Report Application Server, Report Engine, and Web Services SDKs.
    Ludek

  • How to map lookup main table field in another main table using MDM 7.1?

    We created a new SAP MDM 7.1 repository with multiple main tables.  The first main table is called ProductMaster table which contains Products information.  The ProductCode is the primary key and the only display field for the table during data loading process. The second main table is ProductByRegion table which has a main table lookup field ProductCode and a RegionId field.  These two fields (ProductCode and RegionId) combine as the PK for this main table.  Both main tables have key mapping enabled. 
    I was able to load ProductMaster table using Import Manager.  But Iu2019m having trouble to load data into ProductByRegion table using MDM Import Manager.  Although I have met all the 5 requirements below (excerpted from MDM Import Manager Reference Guide P.222), the ProductCode wonu2019t show up on the destination value pane.  If I mapped all productCode to NULL field, ProductCode wonu2019t load.  If I u2018Addu2019 all ProductCode to Destination Value pane, the Import Manager added duplicated rows to Product Master table while only loading 1 record to ProductByRegion table.  I canu2019t get ProductCode show up in Matching Destination Field list.  When I checked ProductMaster records in MDM Data Manager, I right-clicked on one of records, chose Edit Key Mappings, it didnu2019t show anything.  However, if I right-clicked on one of those duplicated rows, Edit Key Mapping shows remote system and key correctly.
    Where did I do wrong?  How can I fix the problem?
    Thank you for help in advance.
    From: SAP MDM Import Manager Reference Guide:
    Mapping to Main Table Lookup Destination Fields
    Import Manager handles main table lookup fields (Lookup [Main])
    differently than other MDM lookup fields. Specifically, Import Manager
    does not display the complete set of display field values of the records
    of the underlying lookup table. Instead, the values it displays for a main
    table lookup field are limited by both the key mappings for the lookup
    table and the values in the source file.
    Also, Import Manager does not automatically display the values of a
    Lookup [Main] destination field in the Destination Values grid when you
    select the field in the Destination Fields grid. Instead, for a main table
    lookup field value to appear in the Destination Values grid, all of the
    following conditions must be met:
    u2022 The lookup table must have key mapping enabled
    u2022 The lookup field must be mapped to a source field
    u2022 The source field must contain key values for the lookup table
    u2022 The destination value must have a key on the current remote system
    u2022 The destination valueu2019s key must match a source field value
    NOTE ►► The current remote system is the remote system that was
    selected in Import Manageru2019s Connect to Source dialog (see
    u201CConnecting to a Remote Systemu201D on page 416 for more information).
    Vicky

    Hi Michael,
    Thank you very much for your response.  I'm new to SAP MDM, I need some clarification and help regarding your solution. 
    I did use two maps to load ProductMaster and ProductByRegion separately.  Here were my steps:
    1. create main table ProductMaster with key mapping enabled at the table level and set ProductCode as unique and writable once (primary key).
    2. create a map to load ProductMaster record from a staging table located an oracle database.  But Key mapping didn't show anything when I looked at them using Data Manager.
    3. create main table ProductByRegion with a lookup field looking at ProductMaster table.  This field and RegionId combines as a unique field for ProductByRegion table. 
    4. create a map to load ProductByRegion table.  But ProductCode records only shows on the source pane not destination pane and can't be mapped properly.
    My questions:
    1. How can I "Ensure that you add key mapping info for all ProductMaster records" besides enabling Key Mapping on the table level?
    2. How can I define a concatenation of ProductCode and RegionId as a REMOTE KEY"?
    Thanks a lot for your help!
    Vicky

  • Mapping the Fact table to different levels of a dimension

    Hi,
    I have a fact table which stores the data for 4 levels of the dimensions. The aggregation method was taken care by PL/SQL and the fact table will have the data for all the 4 levels. When im trying to map all the levels to a column in the fact table using the OEM, it is generating the F KEY constraints referncing the columns mapped for the various levels of the dimension.
    The problem is that im using a denormalised table for maintaing the values of the dimension. So the columns mapped for the levels(Except for the lowest) can't have the unique key defined on it. The cube is not getting created because of the error in creating the F KEY.
    Can u please suggest how to map this fact table.
    Thnks,
    Manohar Vanama

    I am not exactly clear on your schema but I believe you are trying to map tables which are not strict star or snowflake. This means that you cannot use CWM1 (and OEM), unless you change the structure of the tables. You might be able to map the tables with CWM2. The document below will assist you:
    Oracle9i OLAP User's Guide
    Chapter 4. Designing Your Database for OLAP
    Chapter 5. Creating OLAP Catalog Metadata

  • Execution Errors while running a mapping having external table operator

    when I am executing a mapping with external table operator, I am getting the following error:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout ORA-29400: data cartridge error KUP-04040: file testdoc.txt in CONN_FLAT_FILE not found
    Here CONN_FLAT_FILE is the connector.
    The flat file location has been registered with the user name (as used for Windows login), password (as used for Windows Login) and host name as the name that is used for accessing my machine in the network. The path to the file name is given from the root folder like C:\.....
    Please let me know things that I need to check.
    Regards

    If you're using an external table check if you can see the data by querying that table. Possible errors: wrong directory or wrong file structure.
    Regards,
    Jörg

  • Migrate B-Tree Indexes of XML O-R Table to XMLIndex on Binary XML Table

    We need slight help on how to migrate existing B-TREE Indexes from XML Obj-Rel Tables to XMLIndex on new XML Binary Tables
    We use searches on Nested Collection Elements (defined unbounded in XSD)
    and related DDL for XML Obj-Rel Tables is shown below:
    CREATE TABLE TNMAB_AGREEMENT_XML
    AGREEMENT_XML xmltype,
    CREATE_BY     VARCHAR2(15) NULL ,
    CREATE_DT_GMT     TIMESTAMP NULL ,
    CREATE_CLIENT_ID VARCHAR2(65) NULL ,
    UPDATE_BY     VARCHAR2(15) NULL ,
    UPDATE_DT_GMT     TIMESTAMP NULL ,
    UPDATE_CLIENT_ID VARCHAR2(65) NULL ,
    PIC_VERSION_NUM     NUMBER(20) NULL
    XMLTYPE COLUMN AGREEMENT_XML XMLSCHEMA "AB_Agreement_V1_XMLDB.xsd" ELEMENT "Agreement"
    VARRAY AGREEMENT_XML.XMLDATA."SHIPPING_PARTY_GROUPS"
    STORE AS TABLE SHIPPING_PARTY_GROUPS_NT
    (PRIMARY KEY (NESTED_TABLE_ID, ARRAY_INDEX) ENABLE)
    VARRAY SHIPPING_PARTIES
    STORE AS TABLE SHIPPING_PARTIES_NT
    (PRIMARY KEY (NESTED_TABLE_ID, ARRAY_INDEX) ENABLE)
    VARRAY AGREEMENT_XML.XMLDATA."SALES_OFFICE_CODES"."STRING_WRAPPERS"
    STORE AS TABLE SALES_OFFICE_CODES_NT
    (PRIMARY KEY (NESTED_TABLE_ID, ARRAY_INDEX) ENABLE)
    TABLESPACE TNMAB_XMLDB_ME_DATA;
    Table has PK and Unique Index which for the Binary XML Table, it will be setup on Virtual Columns (to enforce
    Unique Constraints)
    We have 6 more Normal Indexes on this Table, some created on Nested Elements as shown below:
    -- 4 Normal B-TREE Indexes on Leaf level Elements
    create index TNMAB_AGREEMENT_XML_IDX1 on TNMAB_AGREEMENT_XML (AGREEMENT_XML.XMLDATA."AGREEMENT_VERSION")
    tablespace TNMAB_XMLDB_ME_INDX;
    create index TNMAB_AGREEMENT_XML_IDX2 on TNMAB_AGREEMENT_XML (AGREEMENT_XML.XMLDATA."LAST_UPDATED_BY")
    tablespace TNMAB_XMLDB_ME_INDX;
    create index TNMAB_AGREEMENT_XML_IDX3 on TNMAB_AGREEMENT_XML (AGREEMENT_XML.XMLDATA."LAST_UPDATED")
    tablespace TNMAB_XMLDB_ME_INDX;
    create index TNMAB_AGREEMENT_XML_IDX4 on TNMAB_AGREEMENT_XML (AGREEMENT_XML.XMLDATA."CREATION_DATE")
    tablespace TNMAB_XMLDB_ME_INDX;
    --2 Indexes created on Nested Table (Collection)
    create index TNMAB_AGREEMENT_XML_NT_IDX1 on SALES_OFFICE_CODES_NT NT(NT.STR_VAL, NT.NESTED_TABLE_ID)
    tablespace TNMAB_XMLDB_ME_INDX;
    create index TNMAB_AGREEMENT_XML_NT_IDX2 on SHIPPING_PARTIES_NT NT(NT.CUSTOMER_HOLDER.SAP_ID, NT.NESTED_TABLE_ID)
    tablespace TNMAB_XMLDB_ME_INDX;
    Could you please let us know how we should migrate above Indexes to XMLIndex format.
    Specifically, not sure how the last 2 Indexes on Nested Tables is to be defined.
    Any help or resources pointing to this would be greatly appreciated.
    Thanks for the help,
    Auro

    Can't tell due to using XMLDATA pseudocolumn. Would need a sample XML document structure that can be used to define the XPATH structure and ALSO need the database version you are using (ALL digits) to see if you would need / can use STRUCTURED or UNSTRUCTURED XMLINDEX indexes.
    See the XML Index section (http://www.liberidu.com/blog/?page_id=441) on for guidance and/or of course the XMLDB Developers Guide for your database version
    http://www.liberidu.com/blog/?page_id=441
    XMLIndex (part 1) – The Concepts
    XMLIndex (Part 2) – XMLIndex Path Subsetting
    XMLIndex (Part 3) – XMLIndex Syntax Dissected
    XMLIndex Performance and Fuzzy XPath Searches
    Structured XMLIndex (Part 1) – Rules of Numb
    Structured XMLIndex (Part 2) – Howto build a structured XMLIndex
    Structured XMLIndex (Part 3) – Building Multiple XMLIndex Structures

  • Why Isn't xmlindex being used in slow query on binary xml table eval?

    I am running a slow simple query on Oracle database server 11.2.0.1 that is not using an xmlindex. Instead, a full table scan against the eval binary xml table occurs. Here is the query:
    select -- /*+ NO_XMLINDEX_REWRITE no_parallel(eval)*/
          defid from eval,
          XMLTable(XMLNAMESPACES(DEFAULT 'http://www.cigna.com/acme/domains/eval/2010/03',
          'http://www.cigna.com/acme/domains/derived/fact/2010/03' AS "ns7"),
          '$doc/eval/derivedFacts/ns7:derivedFact' passing eval.object_value as "doc" columns defid varchar2(100) path 'ns7:defId'
           ) eval_xml
    where eval_xml.defid in ('59543','55208'); The predicate is not selective at all - the returned row count is the same as the table row count (325,550 xml documents in the eval table). When different values are used bringing the row count down to ~ 33%, the xmlindex still isn't used - as would be expected in a purely relational nonXML environment.
    My question is why would'nt the xmlindex be used in a fast full scan manner versus a full table scan traversing the xml in each eval table document record?
    Would a FFS hint be applicable to an xmlindex domain-type index?
    Here is the xmlindex definition:
    CREATE INDEX "EVAL_XMLINDEX_IX" ON "EVAL" (OBJECT_VALUE)
      INDEXTYPE IS "XDB"."XMLINDEX" PARAMETERS
      ('XMLTable eval_idx_tab XMLNamespaces(DEFAULT ''http://www.cigna.com/acme/domains/eval/2010/03'',
      ''http://www.cigna.com/acme/domains/derived/fact/2010/03'' AS "ns7"),''/eval''
           COLUMNS defId VARCHAR2(100) path ''/derivedFacts/ns7:derivedFact/ns7:defId''');Here is the eval table definition:
    CREATE
      TABLE "N98991"."EVAL" OF XMLTYPE
        CONSTRAINT "EVAL_ID_PK" PRIMARY KEY ("EVAL_ID") USING INDEX PCTFREE 10
        INITRANS 4 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT
        1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1
        FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE
        DEFAULT) TABLESPACE "ACME_DATA" ENABLE
      XMLTYPE STORE AS SECUREFILE BINARY XML
        TABLESPACE "ACME_DATA" ENABLE STORAGE IN ROW CHUNK 8192 CACHE NOCOMPRESS
        KEEP_DUPLICATES STORAGE(INITIAL 106496 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS
        2147483645 PCTINCREASE 0 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
        CELL_FLASH_CACHE DEFAULT)
      ALLOW NONSCHEMA ALLOW ANYSCHEMA VIRTUAL COLUMNS
        "EVAL_DT" AS (SYS_EXTRACT_UTC(CAST(TO_TIMESTAMP_TZ(SYS_XQ_UPKXML2SQL(
        SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03"; (::)
    /eval/@eval_dt'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2),'SYYYY-MM-DD"T"HH24:MI:SS.FFTZH:TZM') AS TIMESTAMP
    WITH
      TIME ZONE))),
        "EVAL_CAT" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";/eval/@category'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        "ACME_MBR_ID" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";/eval/@acmeMemberId'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        "EVAL_ID" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";/eval/@evalId'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50)))
      PCTFREE 0 PCTUSED 80 INITRANS 4 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
        INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0
        FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
        CELL_FLASH_CACHE DEFAULT
      TABLESPACE "ACME_DATA" ; Sample cleansed xml snippet:
    <?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?><eval createdById="xxxx" hhhhMemberId="37e6f05a-88dc-41e9-a8df-2a2ac6d822c9" category="eeeeeeee" eval_dt="2012-02-11T23:47:02.645Z" evalId="12e007f5-b7c3-4da2-b8b8-4bf066675d1a" xmlns="http://www.xxxxx.com/vvvv/domains/eval/2010/03" xmlns:ns2="http://www.cigna.com/nnnn/domains/derived/fact/2010/03" xmlns:ns3="http://www.xxxxx.com/vvvv/domains/common/2010/03">
       <derivedFacts>
          <ns2:derivedFact>
             <ns2:defId>12345</ns2:defId>
             <ns2:defUrn>urn:mmmmrunner:Medical:Definition:DerivedFact:52657:1</ns2:defUrn>
             <ns2:factSource>tttt Member</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>boolean</ns2:type>
                <ns2:value>true</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
          <ns2:derivedFact>
             <ns2:defId>52600</ns2:defId>
             <ns2:defUrn>urn:ddddrunner:Medical:Definition:DerivedFact:52600:2</ns2:defUrn>
             <ns2:factSource>cccc Member</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>string</ns2:type>
                <ns2:value>null</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
          <ns2:derivedFact>
             <ns2:defId>59543</ns2:defId>
             <ns2:defUrn>urn:ddddunner:Medical:Definition:DerivedFact:52599:1</ns2:defUrn>
             <ns2:factSource>dddd Member</ns2:factSource>
             <ns2:origInferred_dt>2012-02-11T23:47:02.645Z</ns2:origInferred_dt>
             <ns2:factValue>
                <ns2:type>string</ns2:type>
                <ns2:value>INT</ns2:value>
             </ns2:factValue>
          </ns2:derivedFact>
                With the repeating <ns2:derivedFact> element continuing under the <derivedFacts>The Oracle XML DB Developer's Guide 11g Release 2 isn't helping much...
    Any assitance much appreciated.
    Regards,
    Rick Blanchard

    odie 63, et. al.;
    Attached is the reworked select query, xmlindex, and 2ndary indexes. Note: though namespaces are used; we're not registering any schema defns.
    SELECT /*+ NO_USE_HASH(eval) +/ --/*+ NO_QUERY_REWRITE no_parallel(eval)*/
    eval_xml.eval_catt, df.defid FROM eval,
    --df.defid FROM eval,
    XMLTable(XMLNamespaces( DEFAULT 'http://www.cigna.com/acme/domains/eval/2010/03',
                            'http://www.cigna.com/acme/domains/derived/fact/2010/03' AS "ns7" ),
            '/eval' passing eval.object_value
             COLUMNS
               eval_catt VARCHAR2(50) path '@category',
               derivedFact XMLTYPE path '/derivedFacts/ns7:derivedFact')eval_xml,
    XMLTable(XMLNamespaces('http://www.cigna.com/acme/domains/derived/fact/2010/03' AS "ns7",
                              DEFAULT 'http://www.cigna.com/acme/domains/eval/2010/03'),
            '/ns7:derivedFact' passing eval_xml.derivedFact
             COLUMNS
               defid VARCHAR2(100) path 'ns7:defId') df
    WHERE df.defid IN ('52657','52599') AND eval_xml.eval_catt LIKE 'external';
    --where df.defid = '52657';
    SELECT /*+ NO_USE_HASH(eval +/ --/*+ NO_QUERY_REWRITE no_parallel(eval)*/
    eval_xml.eval_catt, df.defid FROM eval,
    --df.defid FROM eval,
    XMLTable(XMLNamespaces( DEFAULT 'http://www.cigna.com/acme/domains/eval/2010/03',
                            'http://www.cigna.com/acme/domains/derived/fact/2010/03' AS "ns7" ),
            '/eval' passing eval.object_value
             COLUMNS
               eval_catt VARCHAR2(50) path '@category',
               derivedFact XMLTYPE path '/derivedFacts/ns7:derivedFact')eval_xml,
    XMLTable(XMLNamespaces('http://www.cigna.com/acme/domains/derived/fact/2010/03' AS "ns7",
                              DEFAULT 'http://www.cigna.com/acme/domains/eval/2010/03'),
            '/ns7:derivedFact' passing eval_xml.derivedFact
             COLUMNS
               defid VARCHAR2(100) path 'ns7:defId') df
    WHERE df.defid IN ('52657','52599') AND eval_xml.eval_catt LIKE 'external';
    --where df.defid = '52657'; create index defid_2ndary_ix on eval_idx_tab_II (defID);
         eval_catt VARCHAR2(50) path ''@CATEGORY''');
    create index eval_catt_2ndary_ix on eval_idx_tab_I (eval_catt);The xmlindex is getting picked up but a couple of problesm:
    1. In the developemnt environment, no xml source records for defid '52657' or '52599' are being displayed - just an empty output set occurs; in spite of these values being present and stored in the source xml.
    This really has me stumped, as can query the eval table to see the actual xml defid vaues '52657' and '52599' exist. Something appears off with the query - which didn't return records even before the corrresponding xml index was created.
    2. The query still performs slowly, in spite of using the xmlindex. The execution plan shows a full table scan of eval occurring whether or not a HASH JOIN or MERGE JOIN (gets used in place of the HASH JOIN when the NO_USE_HASH(eval) int is used.
    3. Single column 2ndary indexes created respectively for eval_catt and defid are not used in the execution plan - which may be expected upon further consideration.
    In the process of running stats at this moment, to see if performance improves....
    At this point, really after why item '1.' is occurring?
    Edited by: RickBlanchardSRSCigna on Apr 16, 2012 1:33 PM

  • How to achieve transport of value mapping replication cache table values ?

    During the migration of our interface from XI3.0 to PI 7.11,
    I need to transport the value mapping replication cache table values present in cache monitoring of runtime workbench in
    XI 3.0 PRD  to PI 7.11 DEV .
    Please let me know the ways to acheive this so that I can have the same values present in PI 7.11 Value Mapping Cache table as maintained in XI 3.0.
    Please point me into correct direction.
    Regards
    PS

    Click on "Tools" option, select "Export Configuration Objects" -> "Individual Objects" -> Choose the "Value Mapping Group" type, and then select the value mappings you want to transport.

  • Mapping flat xml file to xml Structure

    Hi all,
    i have to map an xml file, wich is incoming via a RFC call in a flat import field, to a xml-Structure. The xml Structure has the same Structure except that it is not flat but even as a xml-Structure in the Repository. Ist ther a way to make a 1:1 - Mapping?
    Regards Mathias

    Hi,
    This can be done very easily using Java Mapping.
    Parse the flat xml String using Dom4j and directly set this as the target structure.
    eg code:
    public void execute(InputStream in, OutputStream out) throws StreamTransformationException{
    String flatXml = "the flat xml string";
    Document doc = DocumentHelper.parseText(flatXml) ;
    out.write(doc.asXML().getBytes());
    Regards,
    P.Venkat

  • How to insert single colon xml text in the xml table

    Dear Sir,
    how to insert special characters like single colon text example (don't) xml text in to the xml table
    please see the following example its giving me error quoted string is not ended properly
    SQL> insert into ftr_ctl values (1,
    2 xmltype('<po:root xmlns:po="http://www.oracle.com/FC.xsd"
    3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    4 xsi:schemaLocation="http://www.oracle.com/FC.xsd
    5 http://www.oracle.com/FC.xsd">
    6 <row>
    7 <UniqueIdentifier>urn:x-gcs:def:featureType:GFDD::FT_DFDD_100565</UniqueIdentifier>
    8 <AlphaCode>ZB032</AlphaCode>
    9 <Name>Baseline Point</Name>
    10 <Status>Submitted</Status>
    11 <Definition>A location that serves as a point on, and which partially defines a segment
    of, a national boundary baseline.</Definition>
    12 <Description>May be monumented or unmonumented. A national boundary baseline is used fo
    r defining the landward edge or margin of a nation's various contiguous zones such as the 3 and 12 n
    autical mile limits and the Exclusive Economic Zone (EEZ).</Description>
    13 </row>
    14 </po:root>'));
    ERROR:
    ORA-01756: quoted string not properly terminated
    how to solve single quotation like (nation's) in xml data insertion
    please give me reply as soon as possible
    Thanks
    Kabeer

    Hi,
    Use &#x7B;code} tags to post formatted code on the forum.
    That way, your code will be more readable for everyone, and more importantly here, everyone will be able to clearly see what's bothering you :
    &apos;sThe single quote was encoded with the character entity reference "&amp;apos;".
    The conversion is not mandatory but it happens Oracle is doing it in this case.
    It shouldn't be a problem though.
    If you want to extract the value afterwards, it'll come as expected :
    SQL> create table ftr_ctl (id number, doc xmltype);
    Table created
    SQL> insert into ftr_ctl values (1,
      2  xmltype('<po:root xmlns:po="http://www.oracle.com/FC.xsd"
      3  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      4  xsi:schemaLocation="http://www.oracle.com/FC.xsd
      5  http://www.oracle.com/FC.xsd">
      6  <row>
      7  <UniqueIdentifier>urn:x-gcs:def:featureType:GFDD::FT_DFDD_100565</UniqueIdentifier>
      8  <AlphaCode>ZB032</AlphaCode>
      9  <Name>Baseline Point</Name>
    10  <Status>Submitted</Status>
    11  <Definition>A location that serves as a point on, and which partially defines a segment of, a national boundary baseline.</Definition>
    12  <Description>May be monumented or unmonumented. A national boundary baseline is used for defining the landward edge or margin of a nation''s various contiguous zones such as the 3 and 12 nautical mile limits and the Exclusive Economic Zone (EEZ).</Description>
    13  <Alias xsi:nil="true"></Alias>
    14  <SourceItemIdentifier>100565</SourceItemIdentifier>
    15  <SourceReference>DGIWG DFDD BL 2011-1.00</SourceReference>
    16  <SourceURL>https://www.dgiwg.org/FAD/fdd/view?i=100565</SourceURL>
    17  </row>
    18  </po:root>'));
    1 row inserted
    SQL> select extractvalue(doc, '/po:root/row/Description','xmlns:po="http://www.oracle.com/FC.xsd"')
      2  from ftr_ctl
      3  where id = 1
      4  ;
    EXTRACTVALUE(DOC,'/PO:ROOT/ROW/DESCRIPTION','XMLNS:PO="HTTP://WWW.ORACLE.COM/FC.
    May be monumented or unmonumented. A national boundary baseline is used for defi
    ning the landward edge or margin of a nation's various contiguous zones such as
    the 3 and 12 nautical mile limits and the Exclusive Economic Zone (EEZ).
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to map javax.xml.datatype.XMLGregorianCalendar to java.util.Calendar

    Hi ,
    How to map javax.xml.datatype.XMLGregorianCalendar to java.util.Calendar so that i can use pass String parameter in YYYY-MM-DD format to my Web service.
    I generated the schema classes using Jaxb 2.1.5.
    Please give suggestion
    Thanks in Advance.

    toGregorianCalendar().getTime()

  • Errors creating indexes on Binary XML Tables

    Hi,
    Oracle details are as follows:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE 11.2.0.2.0 Production"
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    I'm currently having an issue when attempting to create a suitable index on a binary xml table. I have a Binary xml table that stores a number of xml documents. I have created an index on this table as follows:
    create index TEST_WQI_idx_1 on TEST_WEB_QUOTE_INDX1(OBJECT_VALUE)
    INDEXTYPE IS XDB.XMLINDEX
    PARAMETERS ('PATHS (INCLUDE
    (/webPolicy/QuoteId))');
    Querying the table with the following:
    SQL> l
    1 select xmlcast(xmlquery('/webPolicy/Sections/interopSection[1]/PolicyItems/item/Version/text()' PASSING OBJECT_VALUE RETURNING CONTENT)
    2 as number) "VERSION",
    3 xmlcast(xmlquery('/webPolicy/QuoteId/text()' PASSING OBJECT_VALUE RETURNING CONTENT)
    4 as number) "QUOTEID"
    5 FROM TEST_WEB_QUOTE_INDX1
    6 where xmlcast(xmlquery('/webPolicy/QuoteId/text()' PASSING OBJECT_VALUE RETURNING CONTENT)
    7* as number) = 22824
    SQL> /
    VERSION QUOTEID
    1 22824
    Execution Plan
    Plan hash value: 3559428808
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 545 | 1071K| 1030 (1)| 00:00:19 |
    | 1 | SORT AGGREGATE | | 1 | 3022 | | |
    |* 2 | TABLE ACCESS BY INDEX ROWID | SYS895336_TEST_WQI__PATH_TABLE | 1 | 3022 | 2 (0)| 00:00:01 |
    |* 3 | INDEX RANGE SCAN | SYS895336_TEST_WQI__PIKEY_IX | 1 | | 1 (0)| 00:00:01 |
    |* 4 | FILTER | | | | | |
    | 5 | TABLE ACCESS FULL | TEST_WEB_QUOTE_INDX1 | 545 | 1071K| 4 (0)| 00:00:01 |
    | 6 | SORT AGGREGATE | | 1 | 3022 | | |
    |* 7 | TABLE ACCESS BY INDEX ROWID| SYS895336_TEST_WQI__PATH_TABLE | 1 | 3022 | 2 (0)| 00:00:01 |
    |* 8 | INDEX RANGE SCAN | SYS895336_TEST_WQI__PIKEY_IX | 1 | | 1 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter(SYS_XMLI_LOC_ISTEXT("SYS_P0"."LOCATOR","SYS_P0"."PATHID")=1)
    3 - access("SYS_P0"."RID"=:B1 AND "SYS_P0"."PATHID"=HEXTORAW('5E6C') )
    4 - filter(CAST( (SELECT "SYS"."STRAGG"("SYS_P2"."VALUE") FROM
    "WEB_STAGING"."SYS895336_TEST_WQI__PATH_TABLE" "SYS_P2" WHERE "SYS_P2"."PATHID"=HEXTORAW('5E6C') AND
    "SYS_P2"."RID"=:B1 AND SYS_XMLI_LOC_ISTEXT("SYS_P2"."LOCATOR","SYS_P2"."PATHID")=1) AS number)=22824)
    7 - filter(SYS_XMLI_LOC_ISTEXT("SYS_P2"."LOCATOR","SYS_P2"."PATHID")=1)
    8 - access("SYS_P2"."RID"=:B1 AND "SYS_P2"."PATHID"=HEXTORAW('5E6C') )
    Note
    - dynamic sampling used for this statement (level=2)
    - Unoptimized XML construct detected (enable XMLOptimizationCheck for more information)
    However, I also need to add an additional field to this index to allow appropriate queries against the data in the table, version number. This field can be seen from the statement above (VERSION) which runs OK and returns the data I’d expect. However, when I attempt to add this index using the following statement I get an error returned and the index becomes corrupted:
    alter index TEST_WQI_idx_1 rebuild
    parameters ('PATHS (INCLUDE ADD
    (/webPolicy/Sections/interopSection[1]/PolicyItems/item/Version))');
    After some investigation, the issue seems to revolve around the use of the [1] condition in the statement /interopSection[1]. I can create the index by removing the [1] condition, but this does not return the expected result. In actual fact, as there are 2 interopSection elements in the xml file, both with a version number of 1, the statement returns 11, which would appear to be the two version numbers concatenated together. I need to be able to reference the version number from the first interopSection in the queries against the table, and I need to be able to index this column correctly for performance issues.
    I'm unsure why this xpath statement is not working correctly in the alter index statement, but returns ok when used within the query against the table and was wondering if you would be able to help me to have a working index against this element.
    Thanks in advance for any help you can provide in relation to this.

    Sorry, here is the error:
    Error starting at line 20 in command:
    alter index TEST_WQI_idx_1 rebuild
    parameters ('PATHS (INCLUDE ADD
    (/webPolicy/Sections/interopSection[1]/PolicyItems/item/Version))')
    Error report:
    SQL Error: ORA-29858: error occurred in the execution of ODCIINDEXALTER routine
    ORA-64131: XMLIndex Metadata: failure during the looking up of the dictionary
    ORA-30968: invalid XPATH or NAMESPACE option for XML Index
    29858. 00000 - "error occurred in the execution of ODCIINDEXALTER routine"
    *Cause:    Failed to successfully execute the ODCIIndexAlter routine.
    *Action:   Check to see if the routine has been coded correctly.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for