Schema validation fails on the transformed XML document

OK, this is weird.

I get XML files that are supposed to conform to a given XSD. There are dozens of different parties who send these files. To be more precise, I refer to the Ontario Energy Board (OEB) PIPE Documents.

I found that at least one sender sends invalid files. I can't that fixes to the source, so I'm working around that.

for example
<?xml version="1.0" encoding="UTF-8"?>
<PIPEDocument  xmlns="http://www.oeb.gov.on.ca" 
                          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                          xsi:schemaLocation="http://www.oeb.gov.on.ca/ PIPEDocument.xsd" 
                          Version="4.0" 
                          DocumentReferenceNumber="xxx" CreationDate="20110825100008000ES">
<MarketParticipantDirectory>
<Sender>
...
Oracle is not like this:
ORA-31154: invalid XML document
ORA-19202: Error occurred in XML processing
LSX-00344: namespace values "http://www.oeb.gov.on.ca" and "http://www.oeb.gov.on.ca/" differ
OK, so to work around this problem, before schema validation, I apply an XSLT transformation to clean the top-level element:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.oeb.gov.on.ca">
<xsl:output method="xml" indent="no"/>

<xsl:template match="/">
    <xsl:copy>
      <xsl:apply-templates/>
    </xsl:copy>
</xsl:template>

<xsl:template match="*">
    <xsl:if test="local-name() = name()">
            <xsl:element name="{local-name()}">
              <xsl:apply-templates select="@*|node()"/>
            </xsl:element>
    </xsl:if>
</xsl:template>

<xsl:template match="@*">
    <xsl:if test="local-name() = name()">
            <xsl:attribute name="{local-name()}">
              <xsl:value-of select="."/>
            </xsl:attribute>
    </xsl:if>
</xsl:template>
</xsl:stylesheet>
Nice: the fact that it is intended for:
<?xml version="1.0" encoding="UTF-8"?>
<PIPEDocument xmlns="http://www.oeb.gov.on.ca" 
                         Version="4.0" 
                         DocumentReferenceNumber="50520110825080908VA0001.EBT" 
                         CreationDate="20110825100008000ES">
<MarketParticipantDirectory>
<Sender>
...
If I now the schema validate the above transformed XML, then it validates OK.

Large? No, if I try to turn on the fly (i.e. without first transformation and followed by reading in the transformed data from the file), I get a strange error:
declare
 v_xml xmltype := xmltype(bfilename('ERS_FILE_LOAD_308', 'DecryptedFile-30873604.xml'), 0).transform(XDBURIType('/ERS_TEST01/PIPE/XSLT/V1.0/pre_validate_XSLT.xsl').getXML());
 v_xsd_name varchar2(255) := 'PIPE/Power/V4.0/PIPEDocument.xsd'; 
begin
if v_xml.isSchemaValid(v_xsd_name) = 1 then 
       dbms_Output.put_line('valid');
    else
       dbms_Output.put_line('invalid');
       
       --in order to get specific error info for a non-schema message need to convert the XML to schema based
       
       v_xml := v_xml.createSchemaBasedXML(v_xsd_name);
      
       v_xml.schemaValidate();               
       
    end if;  
end;
/
ORA-31043: Element '' not globally defined in schema ''
Exsqueeze me? What element in the schema?

The transformation itself works very well. Specifically, if I run the following:
select xmltype(bfilename('ERS_FILE_LOAD_308', 'DecryptedFile-30873604.xml'), 0).transform(XDBURIType('/ERS_TEST01/PIPE/XSLT/V1.0/pre_validate_XSLT.xsl').getXML()).getclobval() from dual;
... I get the desired result. Of course, if I save the result file and validate the fact that it works:
declare
 v_xml xmltype := xmltype(bfilename('ERS_FILE_LOAD_308', 'DecryptedFile-30873604_manually_saved.xml'), 0);
 v_xsd_name varchar2(255) := 'PIPE/Power/V4.0/PIPEDocument.xsd'; 
begin
if v_xml.isSchemaValid(v_xsd_name) = 1 then 
       dbms_Output.put_line('valid');
    else
       dbms_Output.put_line('invalid');
       
       --in order to get specific error info for a non-schema message need to convert the XML to schema based
       
       v_xml := v_xml.createSchemaBasedXML(v_xsd_name);
      
       v_xml.schemaValidate();               
       
    end if;  
end;
/
I would like to join example XML file, but it contains customer data so I can't do that. I would fix the XSD but it is the nest of a rat of 50 XSD with includes and a 300 script online registration scheme, so I can't do that.

What I'm missing here?

Looks like an Oracle bug for me at this isSchemaValid binds to a beginning of the XML instance and not to the instance transformed.

thoughts?

(using database Oracle 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production under linux)

Published by: Pollocks01 on October 18, 2011 16:11

Hello

Looks like an Oracle bug for me at this isSchemaValid binds to a beginning of the XML instance and not to the instance transformed.

That wouldn't be surprising. There are "few" bugs on the XSL transformation.
Here's a recently posted: {: identifier of the thread = 2245703}

The solution was to serialize the output and analyze again.
So, what you describe on 'reading of a works file' makes me think it's the same kind of problem.

You can also view the contents of the variable just after that:

v_xml := v_xml.createSchemaBasedXML(v_xsd_name);

?

Tags: Database

Similar Questions

  • error example of quote (schema validation failed for the part of the message)

    I get this error during the startup process.


    Anomaly of the non-recoverable system:
    < bpelFault > < faultType > 0 < / faultType > < remoteFault xmlns = "http://schemas.oracle.com/bpel/extension" > < a name = "summary" part > < summary > oracle.fabric.common.FabricInvocationException: failed the validation schema for load of message part. Please ensure that at the level of the sender of the message that the data being sent is schema compliant. Invalid text "in the element:"PurchaseToDate"< / summary > < / piece > < part name ="details"> < detail text > invalidated" in the element: "PurchaseToDate" < / detail > < / piece > < part name = "code" > < null code > < / code > < / piece > < / remoteFault > < / bpelFault >

    Paste this text into your XPath expression:

    oraext:parseXML('
         
              zzzz2
              Acme New
              
              0.0
              
                   Demo Way
                   Redwood Shores
                   CA
                   94065
                   USA
              
              
              
              jcooper
              James Cooper
              
              2010-05-30
              0.0
         
         
              a
              2
              2
              2
         
         aa
    ')
    
  • Catalog object privilege validation failed for the user.

    Hello
    I'm getting following error after adding HTML tags in 11g dashboard.
    How to set privileges?... Kindly let me know. Thank you.

    The error massage:
    Catalog object privilege validation failed for path/users/User1/_portal/page 1 user.
    Currently you do not have sufficient privileges to save a report page or dashboard that contains the HTML markup. Dashboard contains HTML tags customized for static text.

    Hi user,

    Go to settings-> directors-> Manage privileges-> "answers".

    Here you can see - 'Save content with HTML markup' next to it, you will see "presentation server administrators.
    Click on it and change it to "Everyone."

    And save the changes. Restart the BI Services now, you can add the content and it will not error messages appear.

    Thank you.

    Reward points and close the response unit to help others with the same question :)

  • Rich Table: entity validation fails, but the user can change the record! : O

    Hello
    I develop with JDeveloper 11.1.2.1.0 and I have the following problem. I have a rich table editable according to entity/view with a line entity level validator method that checks the consistency of rank according to custom rules.
    I noticed that if the validator fails, the error message is displayed correctly, but it is possible to move to a different folder and this causes a lot of problems. I need avoid recording of variation when this validator fails. I know there is a way to block navigation on an element using clientListener and javascript, but it's a different need because I don't want the user to change the recording while the validator fails.
    How can I do?
    Thank you

    Roberto

    Roberto R SCC wrote:
    I noticed that if the validator fails, the error message is displayed correctly, but it is possible to move to a different folder and this causes a lot of problems. I need avoid recording of variation when this validator fails. I > know there is a way to block navigation on an element using clientListener and javascript, but it's a different need because I don't want the user to change the recording while the validator fails.
    How can I do?

    When you change a line, it is the currentRow on the iterator. You do not want any line to become the currentRow.
    I would go to this topic, in this way: substitute the selectionListener table and the listener to custom selection, check if the current currentRow (the one you are editing) isValid (EntityImpl::isValid).
    Proceed with the treatment of the selection event only if it is validated... You could even show an error or a warning message asking the user to provide valid data and even commit the line before choosing another.
    (Sorry, don't have an example of a code of practice now)

  • 11g - save customizations fails with the error XML

    I have two guests of dashboard on my dashboard. One is a simple drop-down list. The other is a Variable presentation guest (number). I selected/entered two values normal, click on apply, and the dashboard has answered correctly. Then I chose 'save the current customization. After you have entered the name MYSTUFF as saved personalization and clicking on OK, I get this error:

    The current XML is not valid with the following errors: Bad xml instance! <? XML version = "1.0"? "" ' > < sawsel:dashboardSelections xmlns:sawsel="com.siebel.analytics.web/dashselections/v1" xmlns:sawst="com.siebel.analytics.web/state/v1" xmlns:sawx="com.siebel.analytics.web/expression/v1.1" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" version = "0.7" > < sawst:envState xmlVersion = "200811100" > < sawst:container cid = "d: dashboard" xsi: type = "sawst:topLevelStateContainer" > < sawst:container cid = 'f: dpstate"xsi: type ="sawst:dashpromptstate"statepoolId ="phn95bo9nflsvfr362fcakclb2"> < sawst: container cid = 'f' ': dpstate ' xsi: type = "sawst:dashpromptstate" statepoolId = "qkautlal0g0v511mfq72b30lai" / > < / sawst:container > < sawst:container cid = "p:bp8ao515lc33ru6u" xsi: type = "sawst:page" inDashboardPage = "true" > < sawst:container cid = "r: 2cnfc2145q1uiqcd" xsi: type = "sawst:report" links = defaultView "d" = "compoundView. 1"folder = ' / shared/training" itemName = "Sales and Profits" / > < sawst:container cid = "r: kbqpoefb9v4au3up" xsi: type = "sawst:report" defaultView = "compoundView!" 2"folder = ' / shared/training" itemName = "Declining sales" / > < sawst: container cid = "r: hj81v17v5fvsaeto" xsi: type = "sawst:report" defaultView "compoundView =! 2"folder = ' / shared/training" itemName = "Sales and Profits" / > < sawst:container cid = "s:5l6q89h71pmlb85t" xsi: type = "sawst:section" > < sawst:container cid = "a: isdndle4j7uru0uv" xsi: type = "sawst:actionlink" > < sawst:container cid = 'condition: n' xsi: type = "sawst:navigation" conditionEvalStatus = "full" / > < / sawst:container > < sawst:container cid = "n: condition" xsi: type = "sawst:navigation" conditionEvalStatus = "complete" / > < / sawst "" : container > < sawst:container cid = "s:3pt4biahbrdfsbke" xsi: type = "sawst:section" / > < sawst:container cid = "s:j40b1k5eh77c4i4o" xsi: type = "sawst:section" / > < sawst:container cid = "s:g2dns9sm7grqui3k" xsi: type = "sawst:section" / > < sawst:container cid = "s:rrdjna562b7qqomk" xsi: type = "sawst:section" / > < sawst:container cid = s ": ihgv7i7i0ch05gn2" xsi: type = "sawst:section" / > < sawst:container cid = "s:4t8lq8sfpv26qok8" xsi " : type = "sawst:section" / > < sawst:container cid = "s:sv6uv7de99eaa9l4" xsi: type = "sawst:section" / > < sawst:container cid = "s:839isfiqie8i751a" xsi: type = "sawst:section" / > < / sawst:container > < / sawst:container > < / sawst:envState > < sawsel:xmlStatesReferredTo > < sawsel:ref refId = "phn95bo9nflsvfr362fcakclb2" > < sawsel: appliedStates > < sawsel:filter > < sawx:expr xsi: type = "sawx ': logic "op = 'and' > < sawx:expr xsi: type ="sawx:list"="en"setVariable op ="dashboard.variables [& #39; Change_Pct & #39;] ' > < sawx:expr xsi: type = "sawx:sqlExpression" > 1 < / sawx:expr > < sawx:expr container = "http://www.w3.org/2001/XMLSchema" xsi: type = "xsd: Decimal" >-10 < / sawx:expr > < / sawx:expr > < sawx:expr xsi: type = "sawx:list" = "en" setVariable op = 'requestVariables [& #39; '. Selected_Month & #39;] ' > < sawx:expr xsi: type = "sawx:sqlExpression" > & quot; Times & quot;. & quot; Month & quot; < / sawx:expr > < sawx:expr container = "http://www.w3.org/2001/XMLSchema" xsi: type = "xsd: String" > may-09 < / sawx:expr > < / sawx:expr > < / sawx:expr > < / sawsel:filter > < sawsel:variables > < sawx:expr xsi: type = "sawx:list" = "en" setVariable op = "dashboard.variables [& #39; Change_Pct & #39;] ' > < sawx:expr xsi: type = "sawx:sqlExpression" > 1 < / sawx:expr > < sawx:expr container = "http://www.w3.org/2001/XMLSchema" xsi: type = "xsd: Decimal" >-10 < / sawx:expr > < / sawx:expr > < / sawsel:variables > < / sawsel:appliedStates > < / sawsel:ref > < / sawsel:xmlStatesReferredTo > < / sawsel:dashboardSelections > line: 2, Col: 1383, attribute 'conditionEvalStatus' is not declared for the 'container' Line item : 2, col: 1496, the 'conditionEvalStatus' attribute is not declared for the element "container".

    The error occurs in IE 8 and Firefox 3.6.13.

    Is this a known bug?

    It is a bug - if you have an article on a page and the Section has an associated illness, the link 'Save the current customization' will throw this error. In addition, the link 'Create the bookmark link' will throw the same error. If you remove the Condition, you will be able to save customizations/create bookmark links.

  • The schema Validation utility affect the metadata repository database?

    Hello

    We have a separate database for our portal repositories and metadata. I ran the SVU both in mode CLEANING and REPORT on our DEV environment without any problems.

    Is what I can't understand, if running the SVU in CLEANING mode change anything in the database metadata repository. All validation controls and cleanups that SVU is as far as I understand are in the database of the portal.

    My hypothesis is correct? Or is there anything on the metadata repository database that changes of the SVU?

    Any help will be appreciated.

    Thank you.

    CV

    Just follow the standard recommendation.
    Have a backup of the comic before you run the SVU; even if you used probably have to use it.

    AMN

  • in my file has changed recently, I constantly abt 10 thous of the jpeg & xml documents that are displayed.

    where they come from & how stop them from appearing. need me abt 1 HR to delete all the. Sharon R Bertling

    That's why I recommended the steps I did in my previous post - although it seems as if you have not yet tried.  They would systematically eliminiate possibilities for why these files keep re-appearance.  What AV program use you - I mean the one that you use are the Trojan horse in the first place (and I assume you are using yet)?  Do you remember the name of the virus?  It is possible that, despite the fact that you re-installed the system you likely to be infected (still or once again)-, that's why I have recommended to several programs different anti-malware initially.  The other stages are designed to verify your system files in an attempt to fix anything that causes this problem.  The last step is similar to a re - install except it does not affect your data, programs or settings - but will put your system to its original state (Yes, you will have a lot of updates to catch up) if all goes well after the first step to eradicate all remaining malware that may affect your system files and caused this problem (or still cause this problem).

    When you say that you get a completely different window when you type anywhere - do you hear when you perform an advanced search by clicking the search everywhere hyperlink?  What is the difference - I mean, what is different about it?  You can send us a screenshot?  Generally, research shows the folders and files and don't separate them into folders as folder recently changed (even though it may include elements that it contained - especially one request search everywhere).  If yours are separated in a recently modified file list then that certainly does not work according to the specifications (and makes me think the malware system file changes or malicious software).  Which version of Windows Vista you're using (I have 32 bit Vista Business SP2)?

    Thank you.  Please answer these questions and try these procedures.  We will do our best to help you, but we need your help.

    Good luck! Lorien - a - MCSE/MCSA/network + / A +.

  • Windows 7 Genuine Validation failed after the update of the BIOS

    Machine - HP Pavilion g6-1010tu

    System - Windows 7 Home Basic 32-bit

    Recently I updated the system with the latest version of the BIOS, and suddenly to reastart OS is not genuine. I tried to contact Microsoft, and it did nothing, so I had to get off using Windows recovery.

    How update the BIOS without any change on the Windows license?

    It would be possible to use the product key on your windows sticker & activate by phone.

    It is probably not Microsoft but more likely to have a problem with the SLIC tables in the new BIOS that you are trying to install.

    Better stick with the BIOS of your work & approved as BIOS constantly updated with minor changes & for users without problems on BIOS current tends to be more difficult than to a value... BIOS flash only if really necessary because problems risk is quite high.

  • No data when querying XML document which does not have all the elements that are populated

    Hi people

    Following the previous post http://bit.ly/beyCdc forum, I met a new show that I'm looking to solve today.

    General information:

    The xml document, I try to shred them may exist in 2 forms; b limited form and (b) complex form, which
    to comply with the same xmlschema.

    The structure of the two forms of the document is:

    b limited version

    (1) under the parent node (of BASANTA) is a child node - RTDRFileHeader
    (2) also under the parent node is a node of complex "ConnectionList. This can consist of thousands of child nodes 'connection '.
    (3) below a given node of "Connection" are child nodes that are of interest, they are:
          
          Connection/HPMN
          Connection/VPM
          Connection/FileItemList/FileItem/FileType/InitTAP/TAPSeqNo
          Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TAPTxCutoffTmstp
          Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TAPAvailTmstp
          Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TAPCurrency
          Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TotalNetCharge
          Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TotalTax
    (b) extended version

    The structure of the Extended version is identical to the above limited version but there are elements of additional group under the /chargeInfo. element
    It's TrafficBreakdownList and AdditionalChargeInfo. In addition, the TrafficBreakdownList has child nodes that contain elements of the group.
    For example.
        Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/CallEventType
        Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/CallEventType/CallEventInfo/NumberOfEvents
        Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/CallEventType/CallEventInfo/TotNetCharge
        Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/CallEventType/CallEventInfo/TotTaxValue
        Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/InvPeriod
        Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/TotalNetChargeSDR
        Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/TotalTaxSDR
        Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/VPMNLocCurr
        Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/TotalNetChargeVLCSR
        Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/TotalNetChargeVLCCD
        Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/TotalTaxVLCCD
        Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/TotalTaxVLCCD
    What I'm trying to achieve, if possible, is to have a SQL statement that can interrogate the two versions of the xml document. Currently
    the following SQL statement works properly against the extended version XML document, but when used against the limited version he returns no rows.

    I guess what I'm after is like a LEFT JOIN XML :-) If the node is not present, returns NULL for this element.

    b limited Version of XML
    <RTDR>
      <RTDRFileHeader>
        <Prefix>MRTDR</Prefix>
        <Sender>EDSCH</Sender>
        <Recipient>NXTMP</Recipient>
        <PMN>UKRAS</PMN>
        <ReportSeqNo>5</ReportSeqNo>
        <TADIGGenSchemaVersion>2.2</TADIGGenSchemaVersion>
        <RTDRSchemaVersion>1.1</RTDRSchemaVersion>
        <CreationTmstp>2009-09-04T04:04:00.000000+02:00</CreationTmstp>
      </RTDRFileHeader>
    <ConnectionList>
     <Connection>
          <VPMN>UKRAS</VPMN>
          <HPMN>LIEK9</HPMN>
          <FileItemList>
            <FileItem>
              <FileID>CDUKRASLIEK901274-00005-m</FileID>
              <ExchTmstp>2009-08-24T12:07:22.000000+02:00</ExchTmstp>
              <FileType>
                <InitTAP>
                  <TAPSeqNo>1274</TAPSeqNo>
                  <NotifFileInd>true</NotifFileInd>
                  <ChargeInfo>
                    <TAPTxCutoffTmstp>2009-08-24T12:52:10.000000+03:00</TAPTxCutoffTmstp>
                    <TAPAvailTmstp>2009-08-24T11:52:10.000000+02:00</TAPAvailTmstp>
                    <TAPCurrency>SDR</TAPCurrency>
                    <TotalNetCharge>0</TotalNetCharge>
                    <TotalTax>0</TotalTax>
                  </ChargeInfo>
                </InitTAP>
              </FileType>
            </FileItem>
            <FileItem>
              <FileID>CDUKRASLIEK901280-00005-m</FileID>
              <ExchTmstp>2009-08-30T12:14:39.000000+02:00</ExchTmstp>
              <FileType>
                <InitTAP>
                  <TAPSeqNo>1280</TAPSeqNo>
                  <NotifFileInd>true</NotifFileInd>
                  <ChargeInfo>
                    <TAPTxCutoffTmstp>2009-08-30T12:52:34.000000+03:00</TAPTxCutoffTmstp>
                    <TAPAvailTmstp>2009-08-30T11:52:34.000000+02:00</TAPAvailTmstp>
                    <TAPCurrency>SDR</TAPCurrency>
                    <TotalNetCharge>0</TotalNetCharge>
                    <TotalTax>0</TotalTax>
                  </ChargeInfo>
                </InitTAP>
              </FileType>
            </FileItem>
          </FileItemList>
        </Connection>
      <Connection>
          <VPMN>UKRZZ</VPMN>
          <HPMN>LIEZZ</HPMN>
          <FileItemList>
            <FileItem>
              <FileID>CDUKRZZLIEZZ01274-00005-m</FileID>
              <ExchTmstp>2009-08-24T12:07:22.000000+02:00</ExchTmstp>
              <FileType>
                <InitTAP>
                  <TAPSeqNo>1274</TAPSeqNo>
                  <NotifFileInd>true</NotifFileInd>
                  <ChargeInfo>
                    <TAPTxCutoffTmstp>2009-08-24T12:52:10.000000+03:00</TAPTxCutoffTmstp>
                    <TAPAvailTmstp>2009-08-24T11:52:10.000000+02:00</TAPAvailTmstp>
                    <TAPCurrency>SDR</TAPCurrency>
                    <TotalNetCharge>0</TotalNetCharge>
                    <TotalTax>0</TotalTax>
                  </ChargeInfo>
                </InitTAP>
              </FileType>
            </FileItem>
            <FileItem>
              <FileID>CDUKRZZLIEZZ01280-00005-m</FileID>
              <ExchTmstp>2009-08-30T12:14:39.000000+02:00</ExchTmstp>
              <FileType>
                <InitTAP>
                  <TAPSeqNo>1280</TAPSeqNo>
                  <NotifFileInd>true</NotifFileInd>
                  <ChargeInfo>
                    <TAPTxCutoffTmstp>2009-08-30T12:52:34.000000+03:00</TAPTxCutoffTmstp>
                    <TAPAvailTmstp>2009-08-30T11:52:34.000000+02:00</TAPAvailTmstp>
                    <TAPCurrency>SDR</TAPCurrency>
                    <TotalNetCharge>0</TotalNetCharge>
                    <TotalTax>0</TotalTax>
                  </ChargeInfo>
                </InitTAP>
              </FileType>
            </FileItem>
          </FileItemList>
        </Connection>
     </ConnectionList>
     </RTDR> '
    (b) extended version of XML
    <RTDR xmlns:tadig-gen="https://infocentre.gsm.org/TADIG-GEN" xmlns="https://infocentre.gsm.org/TADIG-RTDR">
      <RTDRFileHeader>
        <Prefix>DRTDR</Prefix>
        <Sender>EDSCH</Sender>
        <Recipient>NXTMP</Recipient>
        <PMN>AAAAA</PMN>
        <ReportSeqNo>1</ReportSeqNo>
        <TADIGGenSchemaVersion>2.2</TADIGGenSchemaVersion>
        <RTDRSchemaVersion>1.1</RTDRSchemaVersion>
        <CreationTmstp>2010-03-17T12:32:37.000000+01:00</CreationTmstp>
      </RTDRFileHeader>
      <ConnectionList>
        <Connection>
          <VPMN>AAAAA</VPMN>
          <HPMN>GRCCO</HPMN>
          <FileItemList>
            <FileItem>
              <FileID>CDAAAAAGRCCO04164-00001-d</FileID>
              <ExchTmstp>2010-03-16T00:30:27.000000+01:00</ExchTmstp>
              <FileType>
                <InitTAP>
                  <TAPSeqNo>4164</TAPSeqNo>
                  <NotifFileInd>false</NotifFileInd>
                  <ChargeInfo>
                    <TAPTxCutoffTmstp>2010-03-16T00:15:25.000000+01:00</TAPTxCutoffTmstp>
                    <TAPAvailTmstp>2010-03-16T00:15:25.000000+01:00</TAPAvailTmstp>
                    <TAPCurrency>SDR</TAPCurrency>
                    <TotalNetCharge>48.546</TotalNetCharge>
                    <TotalTax>0</TotalTax>
                    <TrafficBreakdownList>
                      <TrafficBreakdownItem>
                        <CallEventType>CS MO</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>7</NumberOfEvents>
                          <TotNetCharge>11.16</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                      <TrafficBreakdownItem>
                        <CallEventType>CS MT</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>2</NumberOfEvents>
                          <TotNetCharge>0</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                      <TrafficBreakdownItem>
                        <CallEventType>GPRS Calls</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>26</NumberOfEvents>
                          <TotNetCharge>37.35</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                      <TrafficBreakdownItem>
                        <CallEventType>SM-MO</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>1</NumberOfEvents>
                          <TotNetCharge>.036</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                      <TrafficBreakdownItem>
                        <CallEventType>SM-MT</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>3</NumberOfEvents>
                          <TotNetCharge>0</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                    </TrafficBreakdownList>
                    <AdditionalChargeInfo>
                      <InvPeriod>2010-03</InvPeriod>
                      <TotalNetChargeSDR>48.546</TotalNetChargeSDR>
                      <TotalTaxSDR>0</TotalTaxSDR>
                      <VPMNLocCurr>EUR</VPMNLocCurr>
                      <TotalNetChargeVLCSR>54.687</TotalNetChargeVLCSR>
                      <TotalTaxVLCSR>0</TotalTaxVLCSR>
                      <TotalNetChargeVLCCD>54.216</TotalNetChargeVLCCD>
                      <TotalTaxVLCCD>0</TotalTaxVLCCD>
                    </AdditionalChargeInfo>
                  </ChargeInfo>
                </InitTAP>
              </FileType>
            </FileItem>
            <FileItem>
              <FileID>CDAAAAAGRCCO04165-00001-d</FileID>
              <ExchTmstp>2010-03-16T09:27:15.000000+01:00</ExchTmstp>
              <FileType>
                <InitTAP>
                  <TAPSeqNo>4165</TAPSeqNo>
                  <NotifFileInd>false</NotifFileInd>
                  <ChargeInfo>
                    <TAPTxCutoffTmstp>2010-03-16T09:15:20.000000+01:00</TAPTxCutoffTmstp>
                    <TAPAvailTmstp>2010-03-16T09:15:20.000000+01:00</TAPAvailTmstp>
                    <TAPCurrency>SDR</TAPCurrency>
                    <TotalNetCharge>7.114</TotalNetCharge>
                    <TotalTax>0</TotalTax>
                    <TrafficBreakdownList>
                      <TrafficBreakdownItem>
                        <CallEventType>CS MO</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>5</NumberOfEvents>
                          <TotNetCharge>4.985</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                      <TrafficBreakdownItem>
                        <CallEventType>CS MT</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>1</NumberOfEvents>
                          <TotNetCharge>0</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                      <TrafficBreakdownItem>
                        <CallEventType>GPRS Calls</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>10</NumberOfEvents>
                          <TotNetCharge>2.057</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                      <TrafficBreakdownItem>
                        <CallEventType>SM-MO</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>2</NumberOfEvents>
                          <TotNetCharge>.072</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                      <TrafficBreakdownItem>
                        <CallEventType>SM-MT</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>6</NumberOfEvents>
                          <TotNetCharge>0</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                    </TrafficBreakdownList>
                    <AdditionalChargeInfo>
                      <InvPeriod>2010-03</InvPeriod>
                      <TotalNetChargeSDR>7.114</TotalNetChargeSDR>
                      <TotalTaxSDR>0</TotalTaxSDR>
                      <VPMNLocCurr>EUR</VPMNLocCurr>
                      <TotalNetChargeVLCSR>8.014</TotalNetChargeVLCSR>
                      <TotalTaxVLCSR>0</TotalTaxVLCSR>
                      <TotalNetChargeVLCCD>7.959</TotalNetChargeVLCCD>
                      <TotalTaxVLCCD>0</TotalTaxVLCCD>
                    </AdditionalChargeInfo>
                  </ChargeInfo>
                </InitTAP>
              </FileType>
            </FileItem>
            <FileItem>
              <FileID>CDAAAAAGRCCO04166-00001-d</FileID>
              <ExchTmstp>2010-03-16T14:28:43.000000+01:00</ExchTmstp>
              <FileType>
                <InitTAP>
                  <TAPSeqNo>4166</TAPSeqNo>
                  <NotifFileInd>false</NotifFileInd>
                  <ChargeInfo>
                    <TAPTxCutoffTmstp>2010-03-16T14:15:23.000000+01:00</TAPTxCutoffTmstp>
                    <TAPAvailTmstp>2010-03-16T14:15:23.000000+01:00</TAPAvailTmstp>
                    <TAPCurrency>SDR</TAPCurrency>
                    <TotalNetCharge>1.638</TotalNetCharge>
                    <TotalTax>0</TotalTax>
                    <TrafficBreakdownList>
                      <TrafficBreakdownItem>
                        <CallEventType>CS MO</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>2</NumberOfEvents>
                          <TotNetCharge>1.458</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                      <TrafficBreakdownItem>
                        <CallEventType>CS MT</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>7</NumberOfEvents>
                          <TotNetCharge>0</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                      <TrafficBreakdownItem>
                        <CallEventType>SM-MO</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>5</NumberOfEvents>
                          <TotNetCharge>.18</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                      <TrafficBreakdownItem>
                        <CallEventType>SM-MT</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>15</NumberOfEvents>
                          <TotNetCharge>0</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                    </TrafficBreakdownList>
                    <AdditionalChargeInfo>
                      <InvPeriod>2010-03</InvPeriod>
                      <TotalNetChargeSDR>1.638</TotalNetChargeSDR>
                      <TotalTaxSDR>0</TotalTaxSDR>
                      <VPMNLocCurr>EUR</VPMNLocCurr>
                      <TotalNetChargeVLCSR>1.845</TotalNetChargeVLCSR>
                      <TotalTaxVLCSR>0</TotalTaxVLCSR>
                      <TotalNetChargeVLCCD>1.832</TotalNetChargeVLCCD>
                      <TotalTaxVLCCD>0</TotalTaxVLCCD>
                    </AdditionalChargeInfo>
                  </ChargeInfo>
                </InitTAP>
              </FileType>
            </FileItem>
          </FileItemList>
        </Connection>
        <Connection>
          <VPMN>AAAAA</VPMN>
          <HPMN>GRCSH</HPMN>
          <FileItemList>
            <FileItem>
              <FileID>CDAAAAAGRCSH03283-00001-d</FileID>
              <ExchTmstp>2010-03-16T00:30:29.000000+01:00</ExchTmstp>
              <FileType>
                <InitTAP>
                  <TAPSeqNo>3283</TAPSeqNo>
                  <NotifFileInd>false</NotifFileInd>
                  <ChargeInfo>
                    <TAPTxCutoffTmstp>2010-03-16T00:15:25.000000+01:00</TAPTxCutoffTmstp>
                    <TAPAvailTmstp>2010-03-16T00:15:25.000000+01:00</TAPAvailTmstp>
                    <TAPCurrency>SDR</TAPCurrency>
                    <TotalNetCharge>0</TotalNetCharge>
                    <TotalTax>0</TotalTax>
                    <TrafficBreakdownList>
                      <TrafficBreakdownItem>
                        <CallEventType>SM-MT</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>1</NumberOfEvents>
                          <TotNetCharge>0</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                    </TrafficBreakdownList>
                    <AdditionalChargeInfo>
                      <InvPeriod>2010-03</InvPeriod>
                      <TotalNetChargeSDR>0</TotalNetChargeSDR>
                      <TotalTaxSDR>0</TotalTaxSDR>
                      <VPMNLocCurr>EUR</VPMNLocCurr>
                      <TotalNetChargeVLCSR>0</TotalNetChargeVLCSR>
                      <TotalTaxVLCSR>0</TotalTaxVLCSR>
                      <TotalNetChargeVLCCD>0</TotalNetChargeVLCCD>
                      <TotalTaxVLCCD>0</TotalTaxVLCCD>
                    </AdditionalChargeInfo>
                  </ChargeInfo>
                </InitTAP>
              </FileType>
            </FileItem>
            <FileItem>
              <FileID>CDAAAAAGRCSH03284-00001-d</FileID>
              <ExchTmstp>2010-03-16T09:27:16.000000+01:00</ExchTmstp>
              <FileType>
                <InitTAP>
                  <TAPSeqNo>3284</TAPSeqNo>
                  <NotifFileInd>false</NotifFileInd>
                  <ChargeInfo>
                    <TAPTxCutoffTmstp>2010-03-16T09:15:20.000000+01:00</TAPTxCutoffTmstp>
                    <TAPAvailTmstp>2010-03-16T09:15:20.000000+01:00</TAPAvailTmstp>
                    <TAPCurrency>SDR</TAPCurrency>
                    <TotalNetCharge>.072</TotalNetCharge>
                    <TotalTax>0</TotalTax>
                    <TrafficBreakdownList>
                      <TrafficBreakdownItem>
                        <CallEventType>SM-MO</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>2</NumberOfEvents>
                          <TotNetCharge>.072</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                      <TrafficBreakdownItem>
                        <CallEventType>SM-MT</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>2</NumberOfEvents>
                          <TotNetCharge>0</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                    </TrafficBreakdownList>
                    <AdditionalChargeInfo>
                      <InvPeriod>2010-03</InvPeriod>
                      <TotalNetChargeSDR>.072</TotalNetChargeSDR>
                      <TotalTaxSDR>0</TotalTaxSDR>
                      <VPMNLocCurr>EUR</VPMNLocCurr>
                      <TotalNetChargeVLCSR>.081</TotalNetChargeVLCSR>
                      <TotalTaxVLCSR>0</TotalTaxVLCSR>
                      <TotalNetChargeVLCCD>.081</TotalNetChargeVLCCD>
                      <TotalTaxVLCCD>0</TotalTaxVLCCD>
                    </AdditionalChargeInfo>
                  </ChargeInfo>
                </InitTAP>
              </FileType>
            </FileItem>
            <FileItem>
              <FileID>CDAAAAAGRCSH03285-00001-d</FileID>
              <ExchTmstp>2010-03-16T14:28:45.000000+01:00</ExchTmstp>
              <FileType>
                <InitTAP>
                  <TAPSeqNo>3285</TAPSeqNo>
                  <NotifFileInd>false</NotifFileInd>
                  <ChargeInfo>
                    <TAPTxCutoffTmstp>2010-03-16T14:15:24.000000+01:00</TAPTxCutoffTmstp>
                    <TAPAvailTmstp>2010-03-16T14:15:24.000000+01:00</TAPAvailTmstp>
                    <TAPCurrency>SDR</TAPCurrency>
                    <TotalNetCharge>0</TotalNetCharge>
                    <TotalTax>0</TotalTax>
                    <TrafficBreakdownList>
                      <TrafficBreakdownItem>
                        <CallEventType>SM-MT</CallEventType>
                        <CallEventInfo>
                          <NumberOfEvents>1</NumberOfEvents>
                          <TotNetCharge>0</TotNetCharge>
                          <TotTaxValue>0</TotTaxValue>
                        </CallEventInfo>
                      </TrafficBreakdownItem>
                    </TrafficBreakdownList>
                    <AdditionalChargeInfo>
                      <InvPeriod>2010-03</InvPeriod>
                      <TotalNetChargeSDR>0</TotalNetChargeSDR>
                      <TotalTaxSDR>0</TotalTaxSDR>
                      <VPMNLocCurr>EUR</VPMNLocCurr>
                      <TotalNetChargeVLCSR>0</TotalNetChargeVLCSR>
                      <TotalTaxVLCSR>0</TotalTaxVLCSR>
                      <TotalNetChargeVLCCD>0</TotalNetChargeVLCCD>
                      <TotalTaxVLCCD>0</TotalTaxVLCCD>
                    </AdditionalChargeInfo>
                  </ChargeInfo>
                </InitTAP>
              </FileType>
            </FileItem>
          </FileItemList>
        </Connection>
      </ConnectionList>
    </RTDR>’
    It's the query I want to be able to run against the two XML documents. As mentioned, this works very well against the complex XML but no result against the simple XML.
    SELECT
             rtd.rtdr_document_id
            ,rtd.filename
            ,EXTRACTVALUE(rtd.rtdr , '/RTDR/RTDRFileHeader/PMN' )                                      client_pmn
            ,connXML."VPMN"                                                                            vpmn
            ,connXML."HPMN"                                                                            hpmn
            ,fileXML."TAPSeqNo"                                                                        tap_seq_no
            ,chrgXML."TAPTxCutoffTmstp"                                                                tap_tx_cut_off_tmstp
            ,chrgXML."TAPAvailTmstp"                                                                   tap_avail_tmstp
            ,chrgXML."TAPCurrency"                                                                     tap_currency
            ,chrgXML."TotalNetCharge"                                                                  total_net_charge
            ,chrgXML."TotalTax"                                                                        total_tax
            ,traffXML."CallEventType"                                                                  call_event_type     
            ,callEvtXML."NumberOfEvents"                                                               number_of_events
            ,callEvtXML."TotNetCharge"                                                                 call_event_ttl_net_charge
            ,callEvtXML."TotTaxValue"                                                                  call_event_ttl_tax_value
    FROM     t   rtd
            ,XMLTABLE(
                      XMLNAMESPACES
                      (
                        DEFAULT 'https://infocentre.gsm.org/TADIG-RTDR'
                      ),
                      '/RTDR/ConnectionList/Connection'
                      PASSING  rtd.myXML
                      COLUMNS
                      "VPMN"       VARCHAR2(5)    PATH '/Connection/VPMN'
                     ,"HPMN"       VARCHAR2(5)    PATH '/Connection/HPMN'
                     ,"FileXML"    XMLTYPE        PATH '/Connection/FileItemList/FileItem/FileType/InitTAP'
                     )  connXML
           ,XMLTABLE(
                      XMLNAMESPACES
                      (
                        DEFAULT 'https://infocentre.gsm.org/TADIG-RTDR'
                      ),
                      '/InitTAP'
                      PASSING  connXML."FileXML"
                      COLUMNS
                      "TAPSeqNo"       VARCHAR2(50)   PATH '/InitTAP/TAPSeqNo'
                     ,"ChargeInfoXML"  XMLTYPE        PATH '/InitTAP/ChargeInfo'
                    )  fileXML
           ,XMLTABLE(
                      XMLNAMESPACES
                      (
                        DEFAULT 'https://infocentre.gsm.org/TADIG-RTDR'
                      ),
                     '/ChargeInfo'
                      PASSING  fileXML."ChargeInfoXML"
                      COLUMNS
                      "TAPTxCutoffTmstp"          VARCHAR2(30)     PATH '/ChargeInfo/TAPTxCutoffTmstp'
                     ,"TAPAvailTmstp"             VARCHAR2(30)     PATH '/ChargeInfo/TAPAvailTmstp'
                     ,"TAPCurrency"               VARCHAR2(30)     PATH '/ChargeInfo/TAPCurrency'
                     ,"TotalNetCharge"            NUMBER(22,5)     PATH '/ChargeInfo/TotalNetCharge'
                     ,"TotalTax"                  NUMBER(22,5)     PATH '/ChargeInfo/TotalTax'
                     ,"TrafficBreakdownListXML"   XMLTYPE          PATH 'TrafficBreakdownList/TrafficBreakdownItem'
                    )  chrgXML
           ,XMLTABLE(
                      XMLNAMESPACES
                      (
                        DEFAULT 'https://infocentre.gsm.org/TADIG-RTDR'
                      ),
                     '/TrafficBreakdownItem'
                      PASSING  chrgXML."TrafficBreakdownListXML"
                      COLUMNS
                      "CallEventType"             VARCHAR2(20)     PATH '/TrafficBreakdownItem/CallEventType'
                     ,"CallEventInfoXML"          XMLTYPE          PATH '/TrafficBreakdownItem/CallEventInfo'
                    )  traffXML
           ,XMLTABLE(
                      XMLNAMESPACES
                      (
                        DEFAULT 'https://infocentre.gsm.org/TADIG-RTDR'
                      ),
                     '/CallEventInfo'
                      PASSING  traffXML."CallEventInfoXML" 
                      COLUMNS
                      "NumberOfEvents"            NUMBER           PATH '/CallEventInfo/NumberOfEvents'
                     ,"TotNetCharge"              NUMBER           PATH '/CallEventInfo/TotNetCharge'
                     ,"TotTaxValue"               NUMBER           PATH '/CallEventInfo/TotTaxValue'
                    )   callEvtXML
    Thank you very much

    Kind regards

    Simon Gadd

    Hi Simon,.

    I guess what I'm after looks like a LEFT JOIN XML

    Exactly.

    Try to add a (+) after the last two XMLTABLEs operator:

    ...
           ,XMLTABLE(
                      XMLNAMESPACES
                      (
                        DEFAULT 'https://infocentre.gsm.org/TADIG-RTDR'
                      ),
                     '/TrafficBreakdownItem'
                      PASSING  chrgXML."TrafficBreakdownListXML"
                      COLUMNS
                      "CallEventType"             VARCHAR2(20)     PATH '/TrafficBreakdownItem/CallEventType'
                     ,"CallEventInfoXML"          XMLTYPE          PATH '/TrafficBreakdownItem/CallEventInfo'
                    ) (+)  traffXML
           ,XMLTABLE(
                      XMLNAMESPACES
                      (
                        DEFAULT 'https://infocentre.gsm.org/TADIG-RTDR'
                      ),
                     '/CallEventInfo'
                      PASSING  traffXML."CallEventInfoXML"
                      COLUMNS
                      "NumberOfEvents"            NUMBER           PATH '/CallEventInfo/NumberOfEvents'
                     ,"TotNetCharge"              NUMBER           PATH '/CallEventInfo/TotNetCharge'
                     ,"TotTaxValue"               NUMBER           PATH '/CallEventInfo/TotTaxValue'
                    ) (+)  callEvtXML
    

    HTH.

    PS: the declaration of namespaces does not appear in the 'limited' version, perhaps you simply forgotten in your sample? Could you confirm?

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

  • Difficult to extract multiple values from an XML document

    I have the following XML Document
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
       <s:Header>
          <ActivityId CorrelationId="4fc67c0d-4416-4c1f-92c5-0d6624fb41fd" 
    xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">30ccb32d-d6f5-4442-a41a-1eb735112501</ActivityId>
       </s:Header>
       <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
          <FacilitySiteInteractionList xmlns="urn:WA.Ecy.ADS.FacilitySite.Services">
             <FacilitySiteInteraction>
                <Id>78105</Id>
                <StartDate>2009-07-31T00:00:00</StartDate>
                <StatusCode>65</StatusCode>
                <InteractionTypeCode>WQGSWI</InteractionTypeCode>
                <FacilitySiteId>14951</FacilitySiteId>
                <CurrentSystemProgramName>WATQUAL</CurrentSystemProgramName>
                <CurrentSystemName>WPLCS</CurrentSystemName>
                <FederalProgramId/>
                <EndDate xsi:nil="true"/>
                <InteractionId>78105</InteractionId>
                <ProgramFacilitySiteName>Hedwall Inc.</ProgramFacilitySiteName>
                <ModifiedDate>2009-07-31T07:30:57.99</ModifiedDate>
                <ModifiedByName>taus461</ModifiedByName>
                <CreatedDate>2009-07-31T07:30:57.99</CreatedDate>
                <FS_FEATUREs/>
             </FacilitySiteInteraction>
             <FacilitySiteInteraction>
                <Id>78104</Id>
                <StartDate>2009-07-01T00:00:00</StartDate>
                <StatusCode>65</StatusCode>
                <InteractionTypeCode>WQMJIND</InteractionTypeCode>
                <FacilitySiteId>14951</FacilitySiteId>
                <CurrentSystemProgramName>WATQUAL</CurrentSystemProgramName>
                <CurrentSystemName>WPLCS</CurrentSystemName>
                <FederalProgramId/>
                <EndDate xsi:nil="true"/>
                <InteractionId>78104</InteractionId>
                <ProgramFacilitySiteName>Hedwall Inc.</ProgramFacilitySiteName>
                <ModifiedDate>2009-07-31T07:24:02.76</ModifiedDate>
                <ModifiedByName>taus461</ModifiedByName>
                <CreatedDate>2009-07-31T07:24:02.76</CreatedDate>
                <FS_FEATUREs/>
             </FacilitySiteInteraction>
          </FacilitySiteInteractionList>
          <TotalRowCount xmlns="urn:WA.Ecy.ADS.FacilitySite.Services">2</TotalRowCount>
       </s:Body>
    </s:Envelope>
    I need to retrieve the Id of the node FacilitySiteInteraction - in this case, the values are 78104 and 78105.

    I tried to use extractvalue just, but he hesitates with error ORA-19025.
    select extractvalue(x,'//FacilitySiteInteractionList/FacilitySiteInteraction/Id','xmlns="urn:WA.Ecy.ADS.FacilitySite.Services"')
    from my_tab;
    
    ERROR at line 2:
    ORA-19025: EXTRACTVALUE returns value of only one node
    
    -- note: column my_tab.x is an xmltype data type
    If I use just extracted I see there the rub
    select extract(x,'//FacilitySiteInteractionList/FacilitySiteInteraction/Id',
    'xmlns="urn:WA.Ecy.ADS.FacilitySite.Services"')
    from my_tab;
    
    <Id xmlns="urn:WA.Ecy.ADS.FacilitySite.Services">78105</Id><Id xmlns="urn:WA.Ecy.ADS.FacilitySite.Services">78104</Id>
    The format of the XML document does not have to consider another records/lines.

    So, the next thing I tried was using the value of the iterator:
    select extractvalue(x,'//FacilitySiteInteractionList/FacilitySiteInteraction[2]/Id',
    'xmlns="urn:WA.Ecy.ADS.FacilitySite.Services"')
    from my_tab;
    
    78104
    The downside of what I see is that I must first enter the TotalRowCount value and then more wrap XML Document TotalRowCount times
    in order to get these values. So I was wondering if it is a more effective approach to enter these data?

    Thank you, Tony
    SQL>  with t as (
    select xmltype('
    
       
          30ccb32d-d6f5-4442-a41a-1eb735112501
       
       
          
             
                78105
                2009-07-31T00:00:00
                65
                WQGSWI
                14951
                WATQUAL
                WPLCS
                
                
                78105
                Hedwall Inc.
                2009-07-31T07:30:57.99
                taus461
                2009-07-31T07:30:57.99
                
             
             
                78104
                2009-07-01T00:00:00
                65
                WQMJIND
                14951
                WATQUAL
                WPLCS
                
                
                78104
                Hedwall Inc.
                2009-07-31T07:24:02.76
                taus461
                2009-07-31T07:24:02.76
                
             
          
          2
       
    ') xml from dual
    )
    --
    select x.* from t t, xmltable('declare namespace e="urn:WA.Ecy.ADS.FacilitySite.Services";
                                 //e:Id' passing t.xml.extract('//FacilitySiteInteraction','xmlns="urn:WA.Ecy.ADS.FacilitySite.Services"')
                                 columns Id int path '.') x
    /
            ID
    ----------
         78105
         78104
    
    2 rows selected.
    
  • How do you use the config.xml file to determine which version of an application, a user will download?

    I have two APKs for the same application and I implemented the config.XML of lower version number working for all screen sizes.  The config.XML for the higher version number is set up for only the scresns large and extra-large.  Here's the code from the config.xml file.

    Version 1

    < media screens android: anyDensity = "true" android: Center = 'true '.
    Android: smallScreens = "true".
    Android: normalScreens = 'true '.
    Android: largeScreens = "true".
    Android: xlargeScreens = "true" / >

    Version 2

    < media screens android: anyDensity = "true" android: Center = 'true '.
    Android: smallScreens = "false".
    Android: normalScreens = "false".
    Android: largeScreens = "true".
    Android: xlargeScreens = "true" / >

    When I try to download the app on Google game, only the top version is available, regardless of the size of the unit.  When I asked Google game why this was not behave as expected, they said that the file manifest for both applications is the same.  Here is the code, they shot in the manifest after having used PhoneGap Build.

    < media screens android: anyDensity = "true" android: smallScreens = "true" android: normalScreens = "true" android: largeScreens = "true" android: Center = "true" android: xlargeScreens = "true" / >

    Can someone explain why PhoneGap Build is not using the settings I set in the config.xml file?  And how to fix this?

    The tag is not a valid tag in the config.xml file. This is probably why you see the same tag in two, as the build service is ignorant.

    As to how solve you this problem. Currently, you can not, but the next version of android-cordova will include the ability to add a tag which you will be able to use like this:

  • Validation failed secret fields

    I have a problem in my application of adf for the change password page and page edition user.

    I have a validator put in place on the second of the two password fields (secret af:inputText = 'true') to make sure that the passwords match. If the validation fails, then the value of the field is replaced by ' * ' in the sense of UIConstants.SECRET_FIELD_DEFAULT_VALUE as defined in the trinidad-impl jar.

    I did so that this problem no longer occurs on any other communication by deleting the values on the presentation, so that all other errors (such as existing username or sufficient permissions) do not cause, but validation occurs before the bid if it does not work with password incompatibility.

    I tried to hide the values of bean to support both in the validator if field values we reach the State of failure, but seems to have absolutely no effect, I guess because it passes the value to validate, and so uses to display anything.

    I need to go through the validator rather that just do not reach the presentation, because we need to highlight the field with the error rather than just giving the General error popup. I tried different ways to try to define the State of the error of the field but nothing showed up without lifting, the exception of validator that then triggers the change in the value to «*»

    Is it possible to erase the value of a field that is currently being validated or to ignore the value of secret field Reset? The documentation says it changes the value on the submission, but since the validator keeps it from getting the listener to the effective presentation, then is there a way to raise awareness that this is not presented yet? Or to force validation to occur without pressing the submit button? I tried to adjust autosubmit = "true", but it does not work unless they navigate away from the field, which they do not if it is the last field of a password change form, so I don't think it's an option.

    We use the ADF 11.1.1, but if there is a solution available in 12.1.2 then I can wait until we are able to ship with that instead.

    Thank you in advance, please let me know if there is anything I missed. (We are not using JDeveloper, just in case anyone wants to know)

    The answer to the failure of validation of downloads makes unmodifiable of Timo Hahn also seems to be applicable to this question.

    In the validator just before launching the ValidationException call resetValue() on the text field component and local value will be reset to empty and is not reset to "*".

  • XML document to tables relational object

    Experts: I followed several examples online and was able to insert an XML document in a relational Table of Oracle objects. I see that Oracle creates a table behind the scenes and some types of data which map to the elements in the xsd file.

    My hypothesis is that I can run selects plain
    ( select col1, col2, col3 from OR_XML_Table )
    against the inserted xml document columns lbut infact I still have to xpath in the relational table object for oracle to access the values of the element.

    Is it possible to insert xml elements to Oracle relational tables that can be queried without xpath expressions.
    Oracle db 11.2.0.3
    Linux 5
    Thank you
    KeV

    Published by: Kevin_K on February 5, 2013 12:50

    I get an error "ORA-01730: number of column names specified invalid."

    I am very close. Please suggest what I'm doing wrong?

    The error is pretty self-explanatory.
    The columns of three of the projects of query, but you try to generate a view of the object (with a column of the single object).

    You also use the deprecated functions.

    CREATE OR REPLACE VIEW person_view as
    select x.*
    from Person_xml t
       , xmltable(
           '/Person'
           passing t.object_value
           columns First_Name  varchar2(30) path 'FirstName'
                 , Last_Name   varchar2(30) path 'LastName'
                 , dob         date         path 'DateOfBirth'
         ) x
    -- where x.first_name = 'Kevin'
     ;
    

    (adjust as necessary data types)

  • DataGuard enviornment, rman duplication showed validation failed

    I have backup rman to backup site installation.
    DB version is GR 11, 2,
    version of the OS is redhat linux

    I did the rman duplication, here are some results:

    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/system.324.792993247 RECID = 621 STAMP = 793373396
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/system.314.788073527 RECID = 483 STAMP = 792994113
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/system.323.786903909 RECID = 343 STAMP = 788102778
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/system.333.785989831 RECID = 206 STAMP = 786907706
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/system.347.785963645 RECID = 69 = 785990015 STAMP
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/sysaux.355.792993227 RECID = 622 STAMP = 793373396
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/sysaux.293.788073519 RECID = 484 STAMP = 792994113
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/sysaux.322.786903909 RECID = 344 STAMP = 788102779
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/sysaux.332.785989833 RECID = 207 STAMP = 786907706
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/sysaux.346.785963645 RECID = 70 = 785990015 STAMP
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/undotbs1.351.792993227 RECID = 623 STAMP = 793373396
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/undotbs1.361.788073413 RECID = 485 STAMP = 792994114
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/undotbs1.319.786903909 RECID = 345 STAMP = 788102779
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/undotbs1.258.785989851 RECID = 208 = 786907706 STAMP
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/undotbs1.345.785963645 RECID = STAMP 71 = 785990015
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arindex.341.785186191 RECID = 624 STAMP = 793373396
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arindex.319.713996145 RECID = 346 STAMP = 788102779
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/undotbs2.291.792993257 RECID = 625 STAMP = 793373396
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/undotbs2.315.788073545 RECID = 487 STAMP = 792994114
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/undotbs2.316.786903931 RECID = 347 STAMP = 788102779
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/undotbs2.348.785989855 RECID = 210 STAMP = 786907706
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/undotbs2.339.785963789 RECID = 73 = 785990015 STAMP
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arindex.429.785173115 RECID = 626 STAMP = 793373396
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arindex.274.713990673 RECID = 348 STAMP = 788102779
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/ggs_data.290.792993255 RECID = 627 STAMP = 793373397
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/ggs_data.294.788073529 RECID = 489 STAMP = 792994114
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/ggs_data.329.786903917 RECID = 349 STAMP = 788102779
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/ggs_data.257.785989847 RECID = 212 STAMP = 786907706
    validation failed for the copy of the data file
    DataFile copy file name=+DAT/prd/datafile/ggs_data.305.785981949 RECID = 75 = 785990015 STAMP
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arindex.407.785164105 RECID = 628 STAMP = 793373397
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arindex.273.713990667 RECID = 350 STAMP = 788102779
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arsystem.313.785209331 RECID = 629 STAMP = 793373397
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arsystem.360.770344487 RECID = 351 STAMP = 788102779
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arsystem.408.785164107 RECID = 630 STAMP = 793373397
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arsystem.359.770344385 RECID = 352 STAMP = 788102779
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arsystem.347.785193013 RECID = STAMP 631 = 793373397
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arsystem.358.770343541 RECID = 353 STAMP = 788102779
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arsystem.327.785199047 RECID = 632 STAMP = 793373397
    validation failed for the copy of the data file
    Copy file name=/oracle_backup/stage/arsystem.357.770343495 RECID DataFile = 354 STAMP = 788102779
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arsystem.309.785213677 RECID = 633 STAMP = 793373397
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arsystem.286.713990693 RECID = 355 STAMP = 788102780
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arsystem.317.785207493 RECID = 634 STAMP = 793373397
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arsystem.288.713990693 RECID = 356 STAMP = 788102780
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arsystem.316.785204659 RECID = 635 STAMP = 793373398
    validation failed for the copy of the data file

    How can I remove these entries from invalid rman? I can't overlap with success their.

    Thank you

    DataFile copy file name=/oracle_backup/stage/arsystem.288.713990693 RECID = 356 STAMP = 788102780
    validation failed for the copy of the data file
    DataFile copy file name=/oracle_backup/stage/arsystem.316.785204659 RECID = 635 STAMP = 793373398
    validation failed for the copy of the data file

    Have you tried below command?

    RMAN > CHANGE DATAFILECOPY '+ DAT/prd/datafile/undotbs2.339.785963789' UNCATALOG;

Maybe you are looking for

  • Cannot find HP printer after reset printers on Air

    I hope someone here can help or has had the same problem. I recently got a new printer wireless HP Envy 5660.  Everything worked find when installing, it finds the printer on the network, and he added with the scan function.  During the last part of

  • Satellite L350 - strange screen problem (contrast is gone)

    Has anyone met on Toshiba Satellite L350 - 14f (PSLD0E-00v01men) a display problem where looks contrast went? Is this a common fault so that it works well on screen/TFT external? I checked gamma, even started in safe mode and used a standard VGA driv

  • Tecra M4 - DVD player does not recognize discs in Vista

    Hello After the installation of Vista my dvd player does not recognize discs!No update XP! It was a clean install of Vista. I found several links on the upper filter and lower registry entries this entry does not exist in my registry under the CDROM

  • on the voice control

    I noticed that if your not connected to the internet the voice command does not work... is it really need that your phone must be connected to internet to be able to work the voice command?

  • code error pro 8 del place 0 x 0000034

    I browsed the forum google and dell, but nothing showed me how to recover from this problem "The Boot Configuration data file is missing some required information. File: \BCD Error code: 0x000000d "You'll need to use the tools of recovery on your ins