Copy change schema evolution fails

Oracle 11 g 2 on Linux VM
 SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 22 13:51:28 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name: jmendez
Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0      Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
I was able to get schema evolution to work without data in the table (does not help much). When I have given in the table, I get the following error message:
 BEGIN
  2    DBMS_XMLSCHEMA.copyEvolve(
  3      xdb$string_list_t('http://localhost/xsd/test/collection_test_3.xsd'),
  4      XMLSequenceType(XDBURIType('/u01/app/xsd/test/collection_evolve_3.xsd').getXML()),
  5      XMLSequenceType(XDBURIType('/u01/app/xsd/test/collection_evolve_3.xsl').getXML()));
  6  END;
  7  /
BEGIN
*
ERROR at line 1:
ORA-30942: XML Schema Evolution error for schema
'http://localhost/xsd/test/collection_test_3.xsd' table
"JMENDEZ"."COLLECTION_TEST" column 'XML_DATA'
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: '()'
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 153
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 221
ORA-06512: at line 2
I saved the schema and loaded stylesheets xsl and revised in the database schema. Before I try the schema evolution I create the appropriate xml and context indexes and queries a little with the sample data. It works very well. I drop the index before the evolution of the schema and run the above command. It fails every time.
 CREATE TABLE collection_test
  (
    NAID     NUMBER not null enable, 
    opa_counter     number, 
    xml_data      XMLType not null enable, 
    desc_type      varchar2(25 byte),
    constraint "PK_CL_NAID" Primary key ("NAID")
  )
  XMLTYPE COLUMN "XML_DATA" STORE AS BASICFILE CLOB
  XMLSCHEMA "http://localhost/xsd/test/collection_test_3.xsd" ELEMENT "collection";

INSERT INTO COLLECTION_TEST(naid,XML_DATA) VALUES (111112,XMLTYPE('<collection>
      <collectionIdentifier>AAS</collectionIdentifier>
      <dataControlGroup>ou\=NW,ou\=groups,dc\=das,dc\=nara,dc\=gov</dataControlGroup>
      <dateApproved>
         <day>3</day>
         <month>12</month>
         <year>2001</year>
      </dateApproved>
      <dateEntered>
         <day>3</day>
         <month>12</month>
         <year>2001</year>
      </dateEntered>
      <descriptionType>6021989</descriptionType>
      <inclusiveEndDate>
         <year>1926</year>
      </inclusiveEndDate>
      <inclusiveStartDate>
         <year>1923</year>
      </inclusiveStartDate>
      <isUnderEdit>false</isUnderEdit>
      <naId>766</naId>
      <organizationalDonorArray>
         <organizationName>
            <naId>6505115</naId>
         </organizationName>
      </organizationalDonorArray>
      <title>American Antiquarian Society Collection</title>
      <variantControlNumberArray>
         <variantControlNumber>
            <number>AAS</number>
            <variantControlNumberType>
               <naId>6044072</naId>
            </variantControlNumberType>
         </variantControlNumber>
      </variantControlNumberArray>
   </collection>'));
I used mapforce to generate my XSL files.
I can't find the right resource online for my problem. Any help or a redirect is greatly appreciated. Thank you

jjm-

Published by: jjmdb on February 22, 2012 10:51

Ok.

If you still have questions after trying 1.0, could you give 'ArchivalTypes.xsd' so that we can test the whole process on our side?

Tags: Database

Similar Questions

  • InPlace schema evolution error: ORA-31166: error code internal etc...

    Hello

    I have a table in which I will be storing an XMLTYPE column based on an XML schema. I use the following version of the database:
    SQL*Plus: Release 11.2.0.1.0 Production on Thu Aug 23 18:20:12 2012
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Now, when I run my test InPlace Schema Evolution, I get the following error message:

    < font color = "red" >
    ORA-31166: internal error code to handle ignorable attributes
    < / make >

    I built a re-producable case of test for the purpose of this post on the forum. For starters, I have a database scheme grants the following privileges:
    DIRECTLY GRANTED SYSTEM PRIVS
    =============================
    CREATE TRIGGER
    ALTER SESSION
    CREATE TABLE
    
    EXECUTE PRIVS (SYS-OWNED PACKAGES)
    =============
    EXECUTE ON DBMS_XMLSCHEMA
    
    ROLES GRANTED
    =============
    CONNECT
    DATA_ROLE
    
    DATA_ROLE DDL
    =============
    create role DATA_ROLE not identified;
    grant create database link to DATA_ROLE;
    GRANT CREATE MATERIALIZED VIEW TO DATA_ROLE;
    grant create procedure to DATA_ROLE;
    grant create sequence to DATA_ROLE;
    GRANT CREATE SYNONYM TO DATA_ROLE;
    grant create table to DATA_ROLE with admin option;
    grant create trigger to DATA_ROLE;
    grant create view to DATA_ROLE;
    grant select any dictionary to DATA_ROLE;
    All other scripts are run as the database schema. For the purposes of clarity, let's call the {*} TEST_DB_SCHEMA {*}. I follow the steps below in this scheme:

    H3. 1. run this PL/SQL script to record the Version 1 of my XML schema:
    PROMPT -------------------------------;
    PROMPT INITIAL XML SCHEMA REGISTRATION;
    PROMPT -------------------------------;
    
    SET SERVEROUTPUT ON
    SET FEEDBACK OFF
    
    DECLARE
       l_xsd_url_con CONSTANT VARCHAR2(60) := 'http://home/xsd/test_binXML_v1.xsd';
       
       l_xml_schema VARCHAR2(32767);
       
       E_XSD_ALREADY_REGISTERED EXCEPTION;
       PRAGMA EXCEPTION_INIT(E_XSD_ALREADY_REGISTERED, -31085);
    BEGIN
       l_xml_schema :=
          '<xs:schema'||CHR(10)||
          'xmlns:xs="http://www.w3.org/2001/XMLSchema"'||CHR(10)||
          'xmlns:xdb="http://xmlns.oracle.com/xdb"'||CHR(10)||
          'version="1.0"'||CHR(10)||
          'xdb:storeVarrayAsTable = "true">'||CHR(10)||
          ' <xs:element name="TransactionBatch" type="TransactionBatchType" xdb:defaultTable="XSD_TEST_BATCH_BINXML1"/>'||CHR(10)||
          ' <xs:complexType name="TransactionBatchType">'||CHR(10)||
          '  <xs:sequence>'||CHR(10)||
          '   <xs:element name="Transaction" type="TransactionType" minOccurs="1" maxOccurs="unbounded" xdb:defaultTable="XSD_TEST_TRANSACTION_BINXML1"/>'||CHR(10)||
          '  </xs:sequence>'||CHR(10)||
          ' </xs:complexType>'||CHR(10)||
          ' <xs:complexType name="TransactionType">'||CHR(10)||
          '  <xs:sequence>'||CHR(10)||
          '   <xs:element name="Portal" type="PortalType" minOccurs="1" maxOccurs="1" />'||CHR(10)||
          '   <xs:element name="CustomerId" type="CustomerIdType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '   <xs:element name="TransactionQuantity" type="TransactionQuantityType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '   <xs:element name="AppTransactionId" type="AppTransactionIdType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '   <xs:element name="TransactionDetails" type="TransactionDetailType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '   <xs:element name="Username" type="UsernameType" minOccurs="1" maxOccurs="1" />'||CHR(10)||
          '  </xs:sequence>'||CHR(10)||
          ' </xs:complexType>'||CHR(10)||
          ' <xs:simpleType name="PortalType">'||CHR(10)||
          '  <xs:restriction base="xs:string">'||CHR(10)||
          '   <xs:minLength value="1"/>'||CHR(10)||
          '   <xs:maxLength value="30"/>'||CHR(10)||
          '   <xs:enumeration value="TEST1"/>'||CHR(10)||
          '   <xs:enumeration value="TEST2"/>'||CHR(10)||
          '  </xs:restriction>'||CHR(10)||
          ' </xs:simpleType>'||CHR(10)||
          ' <xs:simpleType name="CustomerIdType">'||CHR(10)||
          '  <xs:restriction base="xs:string"/>'||CHR(10)||
          ' </xs:simpleType>'||CHR(10)||
          ' <xs:simpleType name="TransactionQuantityType">'||CHR(10)||
          '  <xs:restriction base="xs:integer">'||CHR(10)||
          '   <xs:minExclusive value="0"/>'||CHR(10)||
          '  </xs:restriction>'||CHR(10)||
          ' </xs:simpleType>'||CHR(10)||
          ' <xs:simpleType name="AppTransactionIdType">'||CHR(10)||
          '  <xs:restriction base="xs:string">'||CHR(10)||
          '   <xs:minLength value="1"/>'||CHR(10)||
          '   <xs:maxLength value="20"/>'||CHR(10)||
          '  </xs:restriction>'||CHR(10)||
          ' </xs:simpleType>'||CHR(10)||
          ' <xs:simpleType name="TransactionDetailType">'||CHR(10)||
          '  <xs:restriction base="xs:string">'||CHR(10)||
          '   <xs:minLength value="1"/>'||CHR(10)||
          '  </xs:restriction>'||CHR(10)||
          ' </xs:simpleType>'||CHR(10)||
          ' <xs:simpleType name="UsernameType">'||CHR(10)||
          '  <xs:restriction base="xs:string">'||CHR(10)||
          '   <xs:minLength value="1"/>'||CHR(10)||
          '   <xs:maxLength value="30"/>'||CHR(10)||
          '  </xs:restriction>'||CHR(10)||
          ' </xs:simpleType>'||CHR(10)||
          '</xs:schema>';
       
       DBMS_XMLSCHEMA.REGISTERSCHEMA(
          schemaurl       => l_xsd_url_con,
          schemadoc       => l_xml_schema,
          local           => TRUE,                             -- XSD must only be visible to the Owner DB Schema in which this script is run.
          genTypes        => FALSE,                            -- Don't want to generate object types, as we're using Binary XML.
          force           => FALSE,                            -- Raise all errors on creation
          owner           => USER,                             -- XML Schema will belong to the currently executing user.
          options         => DBMS_XMLSCHEMA.REGISTER_BINARYXML -- We wish to register the XSD as Binary XML.
       );
       
    EXCEPTION
       WHEN E_XSD_ALREADY_REGISTERED
       THEN
          DBMS_OUTPUT.PUT_LINE('XML Schema '||l_xsd_url_con||' is already registered.');
          
    END;
    /
    
    SET FEEDBACK ON
    H3. 2. create a bunch of Table with an XMLTYPE column based on version 1 of my XML schema:
    PROMPT ----------------------;
    PROMPT ONE-OFF DDL STATEMENTS;
    PROMPT ----------------------;
    
    DROP TABLE test_batch;
    DROP SEQUENCE seq_test_batch_id;
    
    CREATE TABLE test_batch
    (
       batch_id        NUMBER(20),
       batch_timestamp TIMESTAMP   DEFAULT SYSTIMESTAMP,
       batch_xml       XMLTYPE,
       CONSTRAINT tbh_batch_id_nn        CHECK(batch_id IS NOT NULL),
       CONSTRAINT tbh_batch_timestamp_nn CHECK(batch_timestamp IS NOT NULL),
       CONSTRAINT tbh_batch_xml_nn       CHECK(batch_xml IS NOT NULL)
    )
    XMLTYPE COLUMN batch_xml STORE AS SECUREFILE BINARY XML
    XMLSCHEMA "http://home/xsd/test_binXML_v1.xsd"
    ELEMENT "TransactionBatch"
    PARTITION BY RANGE(batch_timestamp)
    INTERVAL (NUMTOYMINTERVAL(1, 'MONTH'))
    (
       PARTITION P_TEST_BATCH_201208 VALUES LESS THAN (TO_DATE('01-SEP-2012', 'DD-MON-YYYY')) TABLESPACE &&TABLSPACE_OF_YOUR_CHOICE
    );
    
    CREATE UNIQUE INDEX idx_tbh_batch_id ON test_batch(batch_id)
    TABLESPACE TXTREME_IDX_XLG;
    
    ALTER TABLE test_batch
       ADD CONSTRAINT tbh_batch_id_pk PRIMARY KEY (batch_id) USING INDEX idx_tbh_batch_id;
    
    CREATE SEQUENCE seq_test_batch_id
    START WITH 1
    INCREMENT BY 1
    MAXVALUE 99999999999999999999
    CYCLE
    NOCACHE
    NOORDER;
    H3. 3. fill this table with the test data.
    PROMPT --------------------------;
    PROMPT CREATING INITIAL TEST DATA;
    PROMPT --------------------------;
    
    TRUNCATE TABLE TEST_BATCH;
    
    SET TIMING ON
    DECLARE
       l_batch_count_con CONSTANT NUMBER(4) := 200;
       
       l_transaction_count   PLS_INTEGER;
       l_total_transactions  PLS_INTEGER DEFAULT 0;
       l_transaction_xmlclob CLOB;
       l_transaction_xmldoc  XMLTYPE;
    BEGIN
       FOR idx IN 1..l_batch_count_con
       LOOP
          l_transaction_count := TRUNC(DBMS_RANDOM.VALUE(1,100));
          
          -- Initialise XML CLOB String. 
          l_transaction_xmlclob := '<?xml version="1.0"?>'||CHR(10)||'<TransactionBatch>';
          
          -- Insert the contents of the XML CLOB String.
          FOR idx IN 1 .. l_transaction_count
          LOOP
             l_transaction_xmlclob := l_transaction_xmlclob||CHR(10)||
                                      '  <Transaction>'||CHR(10)||
                                      '    <Portal>TEST1</Portal>'||CHR(10)||
                                      '    <CustomerId>1234567891</CustomerId>'||CHR(10)||
                                      '    <TransactionQuantity>4</TransactionQuantity>'||CHR(10)||
                                      '    <AppTransactionId>1232K89C</AppTransactionId>'||CHR(10)||
                                      '    <TransactionDetails>This is another long free text field</TransactionDetails>'||
                                      '    <Username>Jimbo2</Username>'||CHR(10)||
                                      '  </Transaction>';
          END LOOP;
          
          --Terminate XML CLOB String.
          l_transaction_xmlclob := l_transaction_xmlclob||CHR(10)||'</TransactionBatch>';
          
          -- Create XMLTYPE XML Document.
          l_transaction_xmldoc := XMLTYPE.createXML(l_transaction_xmlclob);
          
          -- Populate the TEST_BATCH Table.
          INSERT INTO test_batch
            ( batch_id,
              batch_timestamp,
              batch_xml
            )
          VALUES
            ( SEQ_TEST_BATCH_ID.NEXTVAL,
              SYSTIMESTAMP,
              l_transaction_xmldoc
            );
            
          l_total_transactions := l_total_transactions + l_transaction_count;
       END LOOP;
       
       DBMS_OUTPUT.PUT_LINE('Inserted a total of '||l_total_transactions||' transaction XML pieces across '||l_batch_count_con||' Test Batches.');
       COMMIT;
       DBMS_OUTPUT.PUT_LINE('Commit complete.');
    END;
    /
    
    SET TIMING OFF
    H3. 4. save the Version 2 of my XML schema
    PROMPT -----------------------------------------------------------------------------------;
    PROMPT NEW XML SCHEMA REGISTRATION - IDENTICAL TO OLD SCHEMA EXCEPT FOR NEW <Test> ELEMENT;
    PROMPT -----------------------------------------------------------------------------------;
    
    SET FEEDBACK OFF
    
    DECLARE
       l_xsd_url_con CONSTANT VARCHAR2(60) := 'http://home/xsd/test_binXML_v2.xsd';
       
       l_xml_schema VARCHAR2(32767);
       
       E_XSD_ALREADY_REGISTERED EXCEPTION;
       PRAGMA EXCEPTION_INIT(E_XSD_ALREADY_REGISTERED, -31085);
    BEGIN
       l_xml_schema :=
          '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" version="1.0" xdb:storeVarrayAsTable="true">'||CHR(10)||
          '<xs:element name="TransactionBatch" type="TransactionBatchType" xdb:defaultTable="XSD_TEST_BATCH_BINXML2"/>'||CHR(10)||
          '<xs:complexType name="TransactionBatchType">'||CHR(10)||
          ' <xs:sequence>'||CHR(10)||
          '  <xs:element name="Transaction" type="TransactionType" minOccurs="1" maxOccurs="unbounded" xdb:defaultTable="XSD_TEST_TRANSACTION_BINXML2"/>'||CHR(10)||
          ' </xs:sequence>'||CHR(10)||
          '</xs:complexType>'||CHR(10)||
          '<xs:complexType name="TransactionType">'||CHR(10)||
          ' <xs:sequence>'||CHR(10)||
          '  <xs:element name="Portal" type="PortalType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '  <xs:element name="CustomerId" type="CustomerIdType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '  <xs:element name="TransactionQuantity" type="TransactionQuantityType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '  <xs:element name="AppTransactionId" type="AppTransactionIdType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '  <xs:element name="TransactionDetails" type="TransactionDetailType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '  <xs:element name="Username" type="UsernameType" minOccurs="1" maxOccurs="1"/>'||CHR(10)||
          '  <xs:element name="Test" type="TestType" minOccurs="0" maxOccurs="1"/>'||CHR(10)||
          ' </xs:sequence>'||CHR(10)||
          '</xs:complexType>'||CHR(10)||
          '<xs:simpleType name="PortalType">'||CHR(10)||
          ' <xs:restriction base="xs:string">'||CHR(10)||
          '  <xs:minLength value="1"/>'||CHR(10)||
          '  <xs:maxLength value="30"/>'||CHR(10)||
          '  <xs:enumeration value="TEST1"/>'||CHR(10)||
          '  <xs:enumeration value="TEST2"/>'||CHR(10)||
          ' </xs:restriction>'||CHR(10)||
          '</xs:simpleType>'||CHR(10)||
          '<xs:simpleType name="CustomerIdType">'||CHR(10)||
          ' <xs:restriction base="xs:string"/>'||CHR(10)||
          '</xs:simpleType>'||CHR(10)||
          '<xs:simpleType name="TransactionQuantityType">'||CHR(10)||
          ' <xs:restriction base="xs:integer">'||CHR(10)||
          '  <xs:minExclusive value="0"/>'||CHR(10)||
          ' </xs:restriction>'||CHR(10)||
          '</xs:simpleType>'||CHR(10)||
          '<xs:simpleType name="AppTransactionIdType">'||CHR(10)||
          ' <xs:restriction base="xs:string">'||CHR(10)||
          '  <xs:minLength value="1"/>'||CHR(10)||
          '  <xs:maxLength value="20"/>'||CHR(10)||
          ' </xs:restriction>'||CHR(10)||
          '</xs:simpleType>'||CHR(10)||
          '<xs:simpleType name="TransactionDetailType">'||CHR(10)||
          ' <xs:restriction base="xs:string">'||CHR(10)||
          '  <xs:minLength value="1"/>'||CHR(10)||
          ' </xs:restriction>'||CHR(10)||
          '</xs:simpleType>'||CHR(10)||
          '<xs:simpleType name="UsernameType">'||CHR(10)||
          ' <xs:restriction base="xs:string">'||CHR(10)||
          '  <xs:minLength value="1"/>'||CHR(10)||
          '  <xs:maxLength value="30"/>'||CHR(10)||
          ' </xs:restriction>'||CHR(10)||
          '</xs:simpleType>'||CHR(10)||
          '<xs:simpleType name="TestType">'||CHR(10)||
          ' <xs:restriction base="xs:string">'||CHR(10)||
          '  <xs:minLength value="1"/>'||CHR(10)||
          '  <xs:maxLength value="30"/>'||CHR(10)||
          ' </xs:restriction>'||CHR(10)||
          '</xs:simpleType>'||CHR(10)||
          '</xs:schema>';
       
       DBMS_XMLSCHEMA.REGISTERSCHEMA(
          schemaurl       => l_xsd_url_con,
          schemadoc       => l_xml_schema,
          local           => TRUE,                             -- XSD must only be visible to the Owner DB Schema in which this script is run.
          genTypes        => FALSE,                            -- Don't want to generate object types, as we're using Binary XML.
          force           => FALSE,                            -- Raise all errors on creation
          owner           => USER,                             -- XML Schema will belong to the currently executing user.
          options         => DBMS_XMLSCHEMA.REGISTER_BINARYXML -- We wish to register the XSD as Binary XML.
       );
       
    EXCEPTION
       WHEN E_XSD_ALREADY_REGISTERED
       THEN
          DBMS_OUTPUT.PUT_LINE('XML Schema '||l_xsd_url_con||' is already registered.');
          
    END;
    /
    
    SET FEEDBACK ON
    H3. 5 test to insert a new XML document in line with the second XML schema. This test fails as expected.
    PROMPT ---------------------------------------------------------------;
    PROMPT ATTEMPT TO INSERT V2 XSD-COMPLIANT XMLDOC INTO TEST_BATCH TABLE;
    PROMPT ---------------------------------------------------------------;
    
    DECLARE
       l_transaction_xmldoc XMLTYPE;
       
       E_XSD_VALIDATION_FAILURE EXCEPTION;
       PRAGMA EXCEPTION_INIT(E_XSD_VALIDATION_FAILURE, -31061);
    BEGIN
       l_transaction_xmldoc := XMLTYPE.createXML(
                                  '<?xml version="1.0" encoding="UTF-8"?>'||CHR(10)||
                                  '<TransactionBatch>'||CHR(10)||
                                  '  <Transaction>'||CHR(10)||
                                  '    <Portal>CARMAN</Portal>'||CHR(10)||
                                  '    <CustomerId>1234567891</CustomerId>'||CHR(10)||
                                  '    <TransactionQuantity>4</TransactionQuantity>'||CHR(10)||
                                  '    <AppTransactionId>1232K89C</AppTransactionId>'||CHR(10)||
                                  '    <TransactionDetails>This is a long free text field</TransactionDetails>'||CHR(10)||
                                  '    <Username>Jimbo2</Username>'||CHR(10)||
                                  '    <Test>This is an In-Place Schema Evolution Test</Test>'||CHR(10)||
                                  '  </Transaction>'||CHR(10)||
                                  '</TransactionBatch>'
                               );
       
       -- Attempt to populate the SUBMISSION_BATCH Table.
       INSERT INTO submission_batch
         ( batch_id,
           batch_timestamp,
           batch_xml
         )
       VALUES
         ( SEQ_SUB_BATCH_ID.NEXTVAL,
           SYSTIMESTAMP,
           l_transaction_xmldoc
         );
       
       DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT||' row inserted.');
       COMMIT;
       DBMS_OUTPUT.PUT_LINE('Commit complete.');
    
    EXCEPTION
       WHEN E_XSD_VALIDATION_FAILURE
       THEN
          DBMS_OUTPUT.PUT_LINE('Insert failed as expected.'||CHR(10));
          DBMS_OUTPUT.PUT_LINE(SQLERRM);
    END;
    /
    H3. 6. try Inplace development of Version 1 of the XML schema in Version 2.
    PROMPT --------------------------------------------------------------------------------------;
    PROMPT PERFORM IN-PLACE EVOLUTION AND DE-REGISTER/PURGE OLD SCHEMA IF EVOLUTION IS SUCCESSFUL;
    PROMPT --------------------------------------------------------------------------------------;
    
    SET TIMING ON
    
    DECLARE
       l_current_schema   XMLTYPE;
       l_new_schema       XMLTYPE;
       l_xsd_differences  XMLTYPE;
       
       l_resource         BOOLEAN;
    BEGIN
       SELECT schema
         INTO l_current_schema
         FROM user_xml_schemas
        WHERE schema_url = 'http://home/xsd/test_binXML_v1.xsd';
       
       SELECT schema
         INTO l_new_schema
         FROM user_xml_schemas
        WHERE schema_url = 'http://home/xsd/test_binXML_v2.xsd';
       
       SELECT XMLDIFF(l_current_schema, l_new_schema)
         INTO l_xsd_differences
         FROM dual;
       
       DBMS_OUTPUT.PUT_LINE('Successfully extrapolated XDIFF XML Document.');
       
       DBMS_XMLSCHEMA.inPlaceEvolve( 'http://home/xsd/test_binXML_v1.xsd',
                                     l_xsd_differences,
                                     DBMS_XMLSCHEMA.INPLACE_TRACE
                                   );
       
       DBMS_OUTPUT.PUT_LINE('Successfully evolved original XML Schema.');
       
    EXCEPTION
       WHEN OTHERS
       THEN
          ROLLBACK;
          DBMS_OUTPUT.PUT_LINE('Error issued during InPlace XML Schema Evolution:');
          DBMS_OUTPUT.PUT_LINE(SQLERRM);
    END;
    /
    H3. The scripts above provide the following Test output:
    Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 
    Connected as TEST_DB_SCHEMA@dbs02local
     
    SQL> 
    -------------------------------
    INITIAL XML SCHEMA REGISTRATION
    -------------------------------
     
    XML Schema http://home/xsd/test_binXML_v1.xsd is already registered.
     
    Executed in 0 seconds
    
    ----------------------
    ONE-OFF DDL STATEMENTS
    ----------------------
      
    Table created
     
    Executed in 0.016 seconds
     
    Index created
     
    Executed in 0.016 seconds
     
    Table altered
     
    Executed in 0 seconds
     
    Sequence created
     
    Executed in 0 seconds
    
    --------------------------
    CREATING INITIAL TEST DATA
    --------------------------
     
    Table truncated
     
    Executed in 0.032 seconds
    
    Inserted a total of 10259 transaction XML pieces across 200 Test Batches.
    Commit complete.
     
    PL/SQL procedure successfully completed
     
    Executed in 8.487 seconds
    
    -----------------------------------------------------------------------------------
    NEW XML SCHEMA REGISTRATION - IDENTICAL TO OLD SCHEMA EXCEPT FOR NEW <Test> ELEMENT
    -----------------------------------------------------------------------------------
     
    XML Schema http://home/xsd/test_binXML_v2.xsd is already registered.
    
    ---------------------------------------------------------------
    ATTEMPT TO INSERT V2 XSD-COMPLIANT XMLDOC INTO TEST_BATCH TABLE
    ---------------------------------------------------------------
     
    Insert failed as expected.
    
    ORA-31061: XDB error: XML event error
    ORA-19202: Error occurred in XML processing
    LSX-00213: only 0 occurrences of particle "Transaction", minimum is 1
     
    PL/SQL procedure successfully completed
     
    --------------------------------------------------------------------------------------
    PERFORM IN-PLACE EVOLUTION AND DE-REGISTER/PURGE OLD SCHEMA IF EVOLUTION IS SUCCESSFUL
    --------------------------------------------------------------------------------------
     
    Successfully extrapolated XDIFF XML Document.
    Error issued during InPlace XML Schema Evolution:
    ORA-31166: internal error code to handle ignorable attributes
     
    PL/SQL procedure successfully completed
     
    Executed in 0.046 seconds
    SQL> 
    NOTE: When I ran the above tests, I had already created the test of XML schemas. That's why the output messages, say...

    H4. Now, as it is the first time I've ever tried evolution of XML schema in Oracle XMLDB, is there someone who could potentially open the door please, re. solve the < font color = "red" >ORA-31166< / police > error?

    Hello

    First of all, thank you for your efforts on the provision of a decent test case.

    However, there are a few inconsistencies:

    -Step 5 attempts to insert into SUBMISSION_BATCH, but the table created above is TEST_BATCH
    -Same for the sequence name

    Now back to the real question...

    I think the problem comes because you run XMLDiff against two versions saved of your drawings.
    When Oracle stores a schema, it adds a large number of attributes for internal use (you can see them by querying USER_XML_SCHEMAS. DIAGRAM) but we as end users don't have to worry about them.
    However, by building the Xdiff document based on these two 'internal' versions, we explicitly say Oracle whose internal attributes must be changed during the evolution of the scheme, leading to potential conflicts.

    A few other comments:
    -Given that you're using the binary XML schema, you must also set "genTables-online false" and more "genTypes-online false."
    -Also delete all annotations from xdb:defaultTable and xdb:storeVarrayAsTable on the diagrams, they are of no use in this situation.
    -Do not save the schema of the v2, it is not necessary. Just use a transient instance when calling XMLDiff

    So, to summarize:

    -XMLDiff run against both original patterns (do not save a new in any case, the process of evolution will take care of replacing the old).
    -of course, don't forget to change the INPLACE_TRACE to INPLACE_EVOLVE when ready :)

    Hope that helps.

    Published by: odie_63 on August 23, 2012 16:31 - fixed some typos

  • This copy of windows has failed the windows genuine validation.

    I get the following messages.
    ' may be victim of software counterfeiting.
    This copy of windows has failed the windows genuine validation.

    I ran the diagnostic tool and published the result below.

    Diagnostic report (1.9.0019.0):

    -----------------------------------------
    Given WGA-->
    Validation status: invalid license
    Validation code: 50

    Code of Validation caching: 0xc004c4a2
    Windows product key: *-* - X86GK - BQ8R6-2B9W4
    The Windows Product Key hash: otwCjetUnKokH4sIRWWvF1Jh0mA =
    Windows product ID: 00426-067-9529674-86380
    Windows product ID type: 5
    Windows license type: retail
    The Windows OS version: 6.1.7601.2.00010100.1.0.001
    ID: {4FADFC09-2F9F-4762-A0F9-9A67FC2D625C} (3)
    Admin: Yes
    TestCab: 0x0
    WGA Version: N/a, hr = 0 x 80070002
    Signed by: n/a, hr = 0 x 80070002
    Product name: Windows 7 Ultimate
    Architecture: 0x00000000
    Build lab: 7601.win7sp1_gdr.130104 - 1431
    TTS error:
    Validation of diagnosis:
    Resolution state: n/a

    WgaER data-->
    ThreatID (s): n/a, hr = 0 x 80070002
    Version: N/a, hr = 0 x 80070002

    WGA Notifications data-->
    Cached result: n/a, hr = 0 x 80070002
    File: No.
    Version: N/a, hr = 0 x 80070002
    WgaTray.exe signed by: n/a, hr = 0 x 80070002
    WgaLogon.dll signed by: n/a, hr = 0 x 80070002

    OGA Notifications data-->
    Cached result: n/a, hr = 0 x 80070002
    Version: N/a, hr = 0 x 80070002
    OGAExec.exe signed by: n/a, hr = 0 x 80070002
    OGAAddin.dll signed by: n/a, hr = 0 x 80070002

    OGA data-->
    Office status: 100 authentic
    Microsoft Office Enterprise 2007 - 100 authentic
    OGA Version: N/a, 0 x 80070002
    Signed by: n/a, hr = 0 x 80070002
    Office Diagnostics: 025D1FF3-364-80041010_025D1FF3-229-80041010_025D1FF3-230-1_025D1FF3-517-80040154_025D1FF3-237-80040154_025D1FF3-238-2_025D1FF3-244-80070002_025D1FF3-258-3

    Data browser-->
    Proxy settings: N/A
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Win32)
    Default browser: C:\Program Files\Mozilla Firefox\firefox.exe
    Download signed ActiveX controls: fast
    Download unsigned ActiveX controls: disabled
    Run ActiveX controls and plug-ins: allowed
    Initialize and script ActiveX controls not marked as safe: disabled
    Allow the Internet Explorer Webbrowser control scripts: disabled
    Active scripting: allowed
    Recognized ActiveX controls safe for scripting: allowed

    Analysis of file data-->

    Other data-->
    Office details: {4FADFC09-2F9F-4762-A0F9-9A67FC2D625C}1.9.0019.06.1.7601.2.00010100.1.0.001x 32*-*-*-*-2B9W400426-067-9529674-863805S-1-5-21-4040323424-3826660273-1778398338HP-Pavilion,RK571AAR-ABA m7780nPhoenix Technologies, LTD. 5.0820070330000000.000000 + 000BF603407018400FA04090409Pacific Standard Time(GMT-08:00)03HPQOEMSLIC-CPC100100126A2E2BE3F5B56CEw6MDp4yS8TlZEZ8QEMOPF8jblKI = Microsoft Office Enterprise 2007 81599-871-1537561-65389 1

    Content Spsys.log: 0 x 80070002

    License data-->
    The software licensing service version: 6.1.7601.17514

    Name: Windows 7 Ultimate edition
    Description: operating system Windows - Windows (r) 7, retail channel
    Activation ID: a0cde89c-3304-4157-b61c-c8ad785d1fad
    ID of the application: 55c92734-d682-4d71-983e-d6ec3f16059f
    Extended PID: 00426-00172-067-952967-00-1033-7601.0000-0742013
    Installation ID: 003244687483286725250224860754582221818646363405760155
    Processor certificate URL: http://go.microsoft.com/fwlink/?LinkID=88338
    The machine certificate URL: http://go.microsoft.com/fwlink/?LinkID=88339
    Use license URL: http://go.microsoft.com/fwlink/?LinkID=88341
    Product key certificate URL: http://go.microsoft.com/fwlink/?LinkID=88340
    Partial product key: 2B9W4
    License status: Notification
    Reason for the notification: 0xC004F200 (non-genuine).
    Remaining Windows rearm count: 4
    Trust time: 15/03/2013-14:00:31

    Windows Activation Technologies-->
    HrOffline: 0x00000000
    HrOnline: 0xC004C4A2
    Beyond: PASS
    Event timestamp: 3:15:2013 13:30
    WAT Activex: registered
    WAT administration service: registered

    --> HWID data
    Current HWID of Hash: MgAAAAEABAABAAEAAAABAAAAAgABAAEAeqjOwrhH7Ngu9/omeKQkLlSZBIPgaXZYKoU =

    Activation 1.0 data OEM-->
    N/A

    Activation 2.0 data OEM-->
    BIOS valid for OA 2.0: Yes
    Windows marker version: 0x0
    OEMID and OEMTableID consistent: Yes
    BIOS information:
    ACPI Table name OEMID value OEMTableID value
    HPQOEM APIC-SLIC-CPC
    FACP SLIC-CPC HPQOEM
    HPET SLIC-CPC HPQOEM
    MCFG SLIC-CPC HPQOEM
    SLIC SLIC-CPC HPQOEM
    SSDT HPQOEM SLIC-CPC

    Yes the sticker of the product keys match the diagnostic report. I've been running this product for more than two years and now all of a sudden it is not valid?
    I recently had a problem with hard drive with this machine and had to reinstall the system and restore data from a backup. Is it possible that this has some how changed the PID at the origin of this problem?

    If I have no choice but to buy a new OS can spend to Win 8 or will I run into a question?

    As I said before, "No matter how long he ran 'okay'..." »
     
    Copies MSDN work very well - until Microsoft discovers that they have been used in a way not scheduled (they are sold by unscrupulous people who probably to sell at an attractive price in comparison to other copies - a lot of people don't care about questioning why they might be cheaper.)  Others may sell at the same price and make more money before disappearing).
     
    You have an MSDN copy.  Your PID has not been changed by restoring the backup.  ;-)
     
    You can try changing your product key of Windows 7 than on the sticker:
    http://pcsupport.about.com/od/osproductkeys/HT/change-Windows-7-key.htm
     
    Then try to activate by phone:
    http://www.SevenForums.com/tutorials/18715-activate-Windows-7-phone.html
     
    And come back to report to what past.

    What operating system do you have on the laptop before? You can get a Windows 8 upgrade for that - but I would not honestly - recommend it because the difference is quite obvious and you haven't checked your software and hardware is supported on Windows 8, I know. My recommendation for Windows 8 is to use * if * the system you have came from the manufacturer with it pre-installed. :-)

  • How to copy a schema in another

    I need to copy a schema in another. This means that all tables, views, constraints, etc. and all of the data as well.
    I have a dmp source-schema file (created by day with expdp by our backup schedule).

    Can I use impdp to import this dmp file to dest-schema? I am thinking something like this:

    The dmp file was created with:
    expdp DIRECTORY source-schema/pwd = dmpdir DUMPFILE = myproject.dmp

    Create the copy on the dest scheme with:
    Impdp DIRECTORY dest-schema/pwd = dmpdir DUMPFILE = myproject.dmp

    (dest-diagram is a diagram on the same computer. I'll delete all tables before running the command. Is there anything else I need to do first?)

    If this approach is not possible, please suggest me an alternative.

    Thank you.

    Edited by: mgro on April 16, 2010 03:22 (changed 2nd order: expdp with the impdp)

    If the schema name is different you must use the option of remapping scheme in impdp

  • backup error "attempt to copy to disk"C:\" "failed. An unknown error occurred (-54). »

    When syncing iPhone 6 running iOS 9.3.1 I get the following error message: "attempt to copy to disk"C:\" "failed. An unknown error occurred (-54). »

    I am running iTunes 12.3.3.17 on a 64-bit Windows 7 Pro computer. I am logged in as administrator. The laptop has 8 GB of RAM and 700 + GB of available disk space.

    It seems to be synchronization of contacts and the calendar correctly, but the local backup fails.

    Does anyone have a solution for this?

    Thanks for your help.

    Help with error 54 here > If you see the error-54 when you synchronize with iTunes

  • Message "attempt to copy to the disk failed.

    Just installed iOS 9.3 on my iPhone 6. I am logged in as administrator. When you perform a backup, I get this message:
    "Copy to disk"DATADRIVE1"failed. An unknown error occurred (-54).

    "DATADRIVE1" is my internal drive of R:\, where most of my music is stored. Backups were usually at the: \USERS folder on my drive C:\. Well want to can someone help? Thank you!

    My guess would be that iTunes is trying to transfer some content on the device in your library and failure. See how to backup your iTunes for Windows with SyncToy library if you do not already have a backup method. Back up the data from left to right: before it breaks down just in case.

    There is an outside possibility that it might be a permissions problem trigger a somewhat ambiguous error message. Try to repair the security permissions for iTunes for Windows.

    TT2

  • The fastest way to copy one schema to another.

    Hi guys

    Oracle11gr2
    OEL 5

    I have a requirement to copy one schema to another. I don't have access to linux for the server hosting the database. So I guess that the datapump cannot be used. exp/imp conventional takes too long. Another way I can achieve the goal? What is the best way. is it possible to copy all the object using a dblink (triggers to tables, views, procedures etc.)

    PS: Both the schema are in the same database.

    Thank you
    Ankurk

    They are in the same database, so no db connection is necessary; Fatest? It depends on my factors;
    Why no loop all the sources of the tables in the schema and do;

    insert into target_schema.target_table
    select * from source_schema.source_table;
    

    You are 11 GR 2, datapump could be a solution...

    Directory user/pwd Impdp = DMP_DIR dumpfile = source_schema_dmp.dmp logfile = impdp.log remap_schema = source_schema:target_schema

  • Copy the schema

    Hello all-

    I have a planning application that has 3 data base. I want to build a new application that doesn't have a single base of data and is exactly the same as the 2nd database of my application from source. If I migrate the schema that I would be able to achieve this?

    But the concern is that my 3rd database has an extra dimension that I don't want in my new database, I don't think that if I will be able to remove only after migration?

    Thank you!

    If you want to get rid of the dimension, then the best way is simply to create a planning application with the types of plan you need (although I don't know what's wrong with having 3 types of plan and using only those you need) and the return charge in the metadata.

    What I meant by ignoring it is I thought the size was only assigned to the plan type 3, if you're not going to use plan type 3 is so important that the dimension exists, it could be renamed and used perhaps in the future.

    If you want to copy the schema you will get everything that is in your source application, so it will be a mirror of it.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Have an impact on changes in copy/change/return index?

    Hello

    I use the latest version of Berkeley DB XML (2.4.16).
    I use it to store relevant xml of .docx files archives... you can consider them as models in a document-generation application.

    The transformation of copy/change/return is used in several places.
    I also added the clues which can improve the queries that I am trying to make.

    I am interested in finding if index impact when using the transformations of copy/modify/back (it does not seem they help on the tests I've done).

    Here is the XQuery script that I use (I also wrote an xpath evaluation function that deals with simple XPath expressions that may contain attributes or the index... but it doesn't have an impact on the overall execution time):
    declare variable $productView as node() external;
    declare variable $templateName as xs:string external;
    declare variable $expressionValues as node() external;
    declare variable $docxMetadata as node() := doc('dbxml:/docxTemplates/templates.dbxml/metadata.xml')/templates;
    declare variable $customIdentifier as xs:string := fn:data($docxMetadata/template[name = $templateName]/dsStoreItemId) cast as xs:string;
    
    declare function local:getCustomXmlBlocksNode($template as xs:string) 
    {
         doc(fn:concat('dbxml:/docxTemplates/templates.dbxml/', $template, '_blocks.xml'))/*
    };
    
    declare function local:if-absent( $arg as item()* ,
        $value as item()* )  as item()* {
           
        if (exists($arg))
        then $arg
        else $value
    };
     
    declare function local:replace-multi($arg as xs:string?, $changeFrom as xs:string*, $changeTo as xs:string*) as xs:string? 
    {
         if (count($changeFrom)>0)
         then local:replace-multi
         (
              replace($arg, $changeFrom[1], local:if-absent($changeTo[1],'')), 
              $changeFrom[position() > 1], 
              $changeTo[position() > 1]
         )
            else $arg
    };
    
    declare function local:copy-attributes($copyTo as element(), $copyFrom as element())  as element() 
    {
         element { node-name($copyTo)}
                    { $copyTo/@*[not(node-name(.) = $copyFrom/@*/node-name(.))],
                  $copyFrom/@*,
                  $copyTo/node() }
     };
     
    declare function local:add-attributes 
      ( $elements as element()* ,
        $attrNames as xs:QName* ,
        $attrValues as xs:anyAtomicType* )  as element()? {
           
       for $element in $elements
       return element { node-name($element)}
                      { for $attrName at $seq in $attrNames
                        return if ($element/@*[node-name(.) = $attrName])
                               then ()
                               else attribute {$attrName}
                                              {$attrValues[$seq]},
                        $element/@*,
                        $element/node() }
    };
    
    declare function local:getEvaluation($expr as xs:string) as xs:string
     {
          fn:string($expressionValues/expressions/expression[name eq $expr]/value)
     };
    
    declare function local:renderSelectionParts($selPartName as xs:string*) as element()*
    {
         for $name in $selPartName
         return local:renderDocumentPart($name)
    };
    
    declare function local:evalPath($path as xs:string, $xml as node()*) as node()*
    {
       local:evalPathImpl(tokenize($path, "/"), $xml)
    };
    
    declare function local:evalPathImpl($steps as xs:string*, $xml as node()*) as node()*
    {
       if(empty($steps)) then $xml
       else if($steps[1] = "") then local:evalPathImpl(subsequence($steps, 2), $xml/root())
       else if(starts-with($steps[1], "@")) then local:evalPathImpl(subsequence($steps, 2), $xml/@*[name() = substring($steps[1], 2)])
       else if(ends-with($steps[1], "]")) then local:evalPathImpl(subsequence($steps, 2), $xml/*[name() = substring-before($steps[1],  "[")][fn:string(position()) = substring-before(substring-after($steps[1], "["), "]" )])
       else local:evalPathImpl(subsequence($steps, 2), $xml/*[name() = $steps[1]])
    };
    
    declare function local:renderRepeater($docPartName as xs:string, $blockNode as node(), $content as node(), $indexNames as xs:string*, $indexValues as xs:string*) as node()*
    {
         let $count := fn:count(local:evalPath(local:replace-multi(fn:string($blockNode/iw:ProductViewXPath), $indexNames, $indexValues), $productView))
         for $index in 1 to $count
              return local:renderRepeaterI($docPartName, $blockNode/iw:CCId, $content, ($indexNames, $blockNode/iw:KIdx/text()), ($indexValues, fn:string($index)))
    };
    
    declare function local:renderRepeaterI($docPartName as xs:string, $parentCCId as xs:string, $content as node(), $indexNames as xs:string*, $indexValues as xs:string*) as node()*
    {
         copy $c := $content
         modify (
              for $ccBlock in local:getCustomXmlBlocksNode($docPartName)/iw:Block[fn:string(iw:ParentContentControlId) eq $parentCCId]
              let $cc := $c//w:sdt[w:sdtPr/w:id/@w:val eq $ccBlock/iw:CCId]
              return
              (
                   if($ccBlock/iw:Type eq 'CalculatedControl') then 
                        insert node local:getDataBindingNode(local:replace-multi(fn:string($ccBlock/iw:ProductViewXPath), $indexNames, $indexValues)) into $cc/w:sdtPr
                   else if($ccBlock/iw:Type eq 'RepeaterDocPart') then
                        replace node $cc/w:sdtContent with element w:sdtContent { local:renderRepeater($docPartName, $ccBlock, $cc/w:sdtContent, $indexNames, $indexValues) }
                   else if($ccBlock/iw:Type eq 'RepeaterTable') then
                        replace node $cc/w:sdtContent/w:tbl/w:tr[last()] with local:renderRepeater($docPartName, $ccBlock, element content {$cc/w:sdtContent/w:tbl/w:tr[last()]}, $indexNames, $indexValues )
                   else ()               
              )
         )
         return $c/*
    };
    
    declare function local:getDataBindingNode($xpath as xs:string) as node()
    {
         local:add-attributes( element w:dataBinding{}, 
              ( xs:QName('w:prefixMappings'), xs:QName('w:xpath'), xs:QName('w:storeItemID') ), 
              ( "xmlns:iwpvp='http://interwoven.com/WordML07/ProductViewPlaceholders'", $xpath, $customIdentifier ) 
         )
    };
    
    declare function local:renderDocumentPart($docPartName as xs:string) 
    {
         copy $c := doc(fn:concat('dbxml:/docxTemplates/templates.dbxml/', $docPartName, '.xml'))/w:document/w:body
         modify (
              for $sectPr in $c/w:sectPr
              return delete nodes $sectPr,
              for $ccBlock in local:getCustomXmlBlocksNode($docPartName)/iw:Block[fn:string-length(iw:ParentContentControlId)=0]
              let $cc := $c//w:sdt[w:sdtPr/w:id/@w:val eq $ccBlock/iw:CCId]
              return
              (
                   if($ccBlock/iw:Type eq 'Expression') then 
                        replace node $cc/w:sdtContent/w:p with local:copy-attributes( element w:p {element w:r { element w:t { local:getEvaluation($ccBlock/iw:BindValue) } } }, $cc/w:sdtContent/w:p )
                   else if($ccBlock/iw:Type eq 'Switch') then
                        replace node $cc/w:sdtContent/* with local:renderDocumentPart(fn:string($ccBlock/iw:Items/iw:Item[local:getEvaluation(fn:string(iw:Info)) eq local:getEvaluation(fn:string($ccBlock/iw:BindValue))]/iw:DocPart))
                   else if($ccBlock/iw:Type eq 'Selection') then
                        replace node $cc/w:sdtContent/* with local:renderSelectionParts(fn:string($ccBlock/iw:Items/iw:Item[iw:Selected eq 'True']/iw:DocPart))
                   else if($ccBlock/iw:Type eq 'RepeaterDocPart') then
                        replace node $cc/w:sdtContent with element w:sdtContent { local:renderRepeater($docPartName, $ccBlock, $cc/w:sdtContent, (" "), ("")) }
                   else if($ccBlock/iw:Type eq 'RepeaterTable') then 
                   (
                        let $tr := $cc/w:sdtContent/w:tbl/w:tr[last()]
                        return replace node $tr with local:renderRepeater($docPartName, $ccBlock, element content {$tr}, (" "), (""))
                   )
                   else if($ccBlock/iw:Type eq 'DocumentPart') then
                        replace node $cc/w:sdtContent/* with local:renderDocumentPart($ccBlock/iw:BindValue cast as xs:string)
                   else ()               
              )
         ) 
         return $c/*
    };
    
    declare function local:renderDocument() 
    {
         copy $c := doc(fn:concat('dbxml:/docxTemplates/templates.dbxml/', $templateName, '.xml'))/w:document
         modify 
         (
              for $ccBlock in local:getCustomXmlBlocksNode($templateName)/iw:Block[fn:string-length(iw:ParentContentControlId)=0]
              let $cc := $c//w:sdt[w:sdtPr/w:id/@w:val eq $ccBlock/iw:CCId]
              return
              (
                   if($ccBlock/iw:Type eq 'Expression') then 
                        replace node $cc/w:sdtContent/w:p with local:copy-attributes( element w:p {element w:r { element w:t { local:getEvaluation($ccBlock/iw:BindValue) } } }, $cc/w:sdtContent/w:p )
                   else if($ccBlock/iw:Type eq 'Switch') then
                        replace node $cc/w:sdtContent/* with local:renderDocumentPart(fn:string($ccBlock/iw:Items/iw:Item[local:getEvaluation(fn:string(iw:Info)) eq local:getEvaluation(fn:string($ccBlock/iw:BindValue))]/iw:DocPart))
                   else if($ccBlock/iw:Type eq 'Selection') then
                        replace node $cc/w:sdtContent/* with local:renderSelectionParts(fn:string($ccBlock/iw:Items/iw:Item[iw:Selected eq 'True']/iw:DocPart))
                   else if($ccBlock/iw:Type eq 'RepeaterDocPart') then
                        replace node $cc/w:sdtContent with element w:sdtContent { local:renderRepeater($templateName, $ccBlock, $cc/w:sdtContent, (" "), ("")) }
                   else if($ccBlock/iw:Type eq 'RepeaterTable') then 
                   (
                        let $tr := $cc/w:sdtContent/w:tbl/w:tr[last()]
                        return replace node $tr with local:renderRepeater($templateName, $ccBlock, element content {$tr}, (" "), (""))
                   )
                   else if($ccBlock/iw:Type eq 'DocumentPart') then
                        replace node $cc/w:sdtContent/* with local:renderDocumentPart($ccBlock/iw:BindValue cast as xs:string)
                   else ()               
              )
         ) 
         return $c
    };
    
    element mainDocumentContent 
    {
         copy $c := local:renderDocument()
         modify 
         (
              for $cc in $c//w:sdt
              where fn:starts-with($cc/w:sdtPr/w:tag/@w:val, 'iw')
              return delete nodes $cc/w:sdtPr/w:placeholder/*,
              for $pictureCC in $c//w:sdt
              where $pictureCC/w:sdtPr/w:tag/@w:val eq 'iwPictureBlock'
              return delete nodes $pictureCC/w:sdtContent//a:blip/@r:embed,
              for $simpleCC in $c//w:sdt
              where fn:exists( fn:index-of( ('iwValueBlock', 'iwDateBlock', 'iwPictureBlock'), $simpleCC/w:sdtPr/w:tag/@w:val ) )
              return replace value of node $simpleCC/w:sdtPr/w:dataBinding/@w:storeItemID with $customIdentifier,
              let $sdtNodes := $c//w:sdt
              for $i in 1 to fn:count($sdtNodes)
              return replace value of node $sdtNodes[$i]/w:sdtPr/w:id/@w:val with $i
         ) 
         return $c
    }, 
    element customXmlPvpUri 
    { 
         fn:string($docxMetadata/template[name = $templateName]/customXmlPvpUri) 
    }
    ,
    element templatePath
    {
         fn:string($docxMetadata/template[name = $templateName]/path) 
    }
    Published by: donde on November 3, 2008 07:59

    Hello

    Index will not help the copied data. The indexes are limited to a particular container. Queries on this container will search for the appropriate indexes to optimize the query expression. Copied content is placed in a temporary storage that actually has a lot as a container, but is created without index so that queries that operate on this temporary copied content can be optimized using indexes.

    It's an interesting idea to think about the indexing of content, but there are all kinds of questions, I can think of that might occur. In any case, it's something to think about.

    If there is any way for you to cache and reuse the partially processed templates in a real (indexed) container'd win you indexes a bit more. Such a container could be in memory, so it serves as a pure cache. Should still transactions if you have concurrent access but it would disappear when the application is restarted. Just a thought.

    Kind regards
    George

  • Cannot change printers, reset failed.

    I cannot change my printer using Firefox. When I try to select another printer from the dropdown menu, the menu will close and I'm still on the printer I used. With the help of troubleshooting, I followed instructions to reset the printer. He failed. I have reset the default printer to a different printer through Windows 7 settings. He failed. I used followed Firefox instructions to reset Firefox (and lost my modules, thank you very much) and it failed. How can I get this printer working again the menu? For now, I'll have to use another browser whenever I want to use a different printer. Not good.

    Create a new profile as a test to see if your profile is the source of the problems.

    See creating a profile:

    If the new profile works then you can transfer files from a profile already used in the new profile, but be careful not to copy files corrupted to avoid transporting on the problem

    Profile backup and restore

  • Change of hostname: failed to contact the DSCC registry

    Hi all
    We installed ODSEE 11.1.1.5 x 86 Solaris 10/08/11 successfully
    IE were able to connect to DSCC as Manager of Directory Service.
    After changing the host name of the FORMER on NEW system we cannot use now
    The DSCC again because there is this message after having put in the directory service
    password:
    Failed to contact the DSCC registry. Make sure that the DSCC registry is online and
    listening on ldap: / / * OLD *: 3998
    How can organize us what the registry is listening to now... _NEW_:3998?
    Should we use ' dsccsetup remove/initialize?
    Thank you very much in advance for any advice!
    Rainer

    I had the same problem and disassemble/initialize using has solved the problem. I have not found another way to make little unfortunately.

    But what you can do if you have a lot of registered servers is to export the registry DSCC LDIF, before
    Disassembly. Then, make a copy of export LDIF, to keep only the entries corresponding to the same servers,
    reset the DSCC registry and import the LDIF updated the ' ldapmodify - AC» It will save you time.

  • Error message: cannot copy... Failed to create the directory or file.

    I get the Error Message ' cannot copy (a file USB Store n Go): failed to create the directory or file.»  All of a sudden I started getting error message is when I tried to copy to the USB mass storage: "F:" copy on the removable key worked for a proor very long in this message. And there are a lot of empty space.  The diagnosis says that everything works correctly.

    Dear Clarence

    Try first to unplug the mass storage device, then reconnect and format it by Righ click on Format.

    Then try to paste these files on this USB key again.

    If it fails this time then format your USB using HP USB stick formatting to http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?swItem=MTX-UNITY-I23839 tool

    Click Download on the page above. Install it and run it. This will guide you through the steps of formatting your USB drive in a few seconds...

    It is also useful for the repair of the almost dead usb keys.

    Concerning

    Zeeshan Ahmad

  • large directory copy paste on USB fails

    Using vista pro home, backup on USB key fails.  Copy and paste from a large directory fails after about 500 MB when stuck on an external USB drive.  When this happens, the program Explorer or xcopy or backup failure can; "t be terminated except in order to restart.  I restarted 50 times today.  My files and directories are not compressed.  The USB drive is ntfs and a new seagate brand.

    Larry Guichard

    Hello

    ·         What is the size of the external USB drive?

    ·         You receive an error message?

    I suggest you to format external USB drive once and check the issue. Do follow link below:

    http://Windows.Microsoft.com/en-us/Windows-Vista/formatting-disks-and-drives

  • Slow Changing dimension Interface fails at the step of the update

    Hello

    I've created an interface dimension slow evolution and it is a failure on the update.  When I go through the code generates the error, there are no columns identified to be updated.  Do not know what is happening...

    Ideas?

    Thank you

    It seems that you don't add any column as "crushed on change" to the field slowly change behavior Dimension in the Description of the data model tab.

    Please take a look at this topic SCD in this Oracle (SCD research) document:

    http://docs.Oracle.com/CD/E29542_01/integrate.1111/e12645.PDF

    Thank you.

  • Possible to copy changes from one catalog to another

    I upgraded the LR5 LR6 to, and when installing LR6 does not recognize that lr5 has been installed, then it has not deleted.  I played a bit in 6 for a while, then came back later to do some editing LR5 and accidentally started instead of LR6. My photos are present in both versions, but the changes I did only appear in the LR5.  Is it possible to copy or transfer these changes to the LR5 LR6 catalog catalog?  I'm on Win7 Pro 64 bit if that's important.


    Thanks for any help.

    I found the solution myself.  I used the "Import from another catalog" feature on the file menu, as described hereand specified my LR5 catalogue than the catalog to import from.  Because the LR5 catalogue comes from an earlier version of LR, it prompted me to update before you import it.  I chose to «Throw up to level after importation of the catalog»  Once the upgrade has completed, I selected the photos I wanted to import, and in the area of News Photos for "manipulation of file:" I said «don't import new photos»  In existing Photos area changed to "replace:" I said ' metadata settings and develop only ", and just to be sure, I checked the box"keep old settings as a virtual copy.  It worked perfectly.

Maybe you are looking for

  • Cannot access hard drive Time Capsule... Password not accepted

    The device ' Time Capsule 802.11n (3rd generation). Subject: Unable to connect to the HD TC I've reconfigured our old Time Capsule (CT) for use by my daughter dependent of the College.  What with the TC seems to work fine (IE. Internet access and WIF

  • My HP Notebook PC 630 color system fades... u will replace with new paint?

    My HP Notebook PC 630 system where its external surface is completely faded... I think that you have provided very poor... !!! I never saw any of notebooks with painted surface...  Even I can't make out when buying it... A little, he started to fade.

  • Time Machine is not not in the IOS 10.11 (El Capitan)

    Update to IOS 10.11 from the ReadyNAS Monte drive is no longer, and Timemaching can not find the disc. I tried to shoot the sequence to stop, restart, re-enable option option but again, it will not mount in the IOS. IOS shows the ReadyNAS as a shared

  • Where can I get a real installation of XP Home product key for purchased disc?

    I have an installation disc at home XP genuine, purchased in a 3 pack for OEM installation, but I lost the certificate of authenticity for this disc (other installed and sticker placed on the PC when sold)-this version has been installed on a PC for

  • Error with installing windows 7 32 bit.

    Hello, I was using 8.1 64-bit windows on my Dell Studio 1555 laptop. for using windows 10 64 bit, I installed with 7 home premium but I have the product key for windows 7 Home premium, but now, while installing windows 7 64 bit home edition premium,