Need the XQuery function that compares two nodes.

Is there a any function XQuery for the OSB 10 g which compares two nodes with a correct management of redundant namespaces?
There is a function "" fn:deep - equality "that compares two nodes." But it fails when one node is to have redundant namespaces as an attribute.
I need a XQuery function that compares two nodes for the same content, same child nodes and their content, the same attributes of the child nodes except the attribute xmlns for one of the node that has redundant namespaces (namespace that are already defined in the parent nodes or any unnecessary space of names).

for example, it should treat following two equal nodes:

< has t '1' = >
< xmlns:ns1 b = "ns1" >
2
< /b >
< /a >


< has t '1' = >
< b >
2
< /b >
< /a >


Above two nodes are the same attributes and content except 1st node attribute xmlns. Wise business scenario it is redundant but not bad, same case can occur and I need to take care of these scenarios.
Please let me know about a feature or logic to treat this

in fact the XMLs 2 you posted are different to a '2 '.

I tried this:

XQuery version "1.0" encoding "Cp1252";
(: pragma type = "xs: anyType" ::))

declare namespace xf = "http://tempuri.org/OSB%20Project%201/compare/";

declare function:compare() xf
{element (*)}

Let $a: = (t = '3')(b xmlns:ns="ns") 2 (/ b) (/a)
Let $b: = (a t = "3") (b) 2 / (b) (/a)

return {fn:deep - equal ($a, $b)}
};

XF:Compare()

and it does not work as expected, it is the additional xmlns:ns = 'ns' are ignored...
I have real

Tags: Fusion Middleware

Similar Questions

  • Are the XQuery functions that are supported in the path of a function XMLTable clause?

    Hello

    Oracle 11.2, can I use XQuery functions in the path of a function XMLTable clause? I tried, but does not fit any result. Here is an example with and without the function fn:lower-case():

    SQL >
    SELECT EVENT_ID, ACTION
    OF EVENTSCHEMA.event x,.
    XMLTABLE ('/ *' from EVENTXMLTEXT)
    COLUMNS
    PATH varchar (10) ACTION ' / * / action'
    );

    EVENT_ID ACTION
    ------------- -----------
    1000 OBSERVE
    1001 OBSERVE

    SQL >
    SELECT EVENT_ID, ACTION
    OF EVENTSCHEMA.event x,.
    XMLTABLE ('/ *' from EVENTXMLTEXT)
    COLUMNS
    ACTION varchar (10) PATH "fn:lower - case(/*/action)".
    );

    EVENT_ID ACTION
    ------------- -----------
    1000
    1001


    At the end of the day, I will generate lines such as

    PATH of char (1) INFERRED ' if (fn:upper - case(/*/cah:extension/cah:inferred) = 'TRUE') then if "t" ElseIf (fn:upper - case(/*/cah:extension/cah:inferred) = 'FALSE') then 'f' not null'.
    PATH of TIMESTAMP BIZTRANSACTIONDATE "fn:adjust - dateTime-to-timezone(/*/cah:extension/cah:bizTransactionDate).

    but they also return null. If I remove the XQuery functions in them, they work.

    Do you know what could be the problem here?

    Thank you!
    -Daniela

    Works for me:

    SQL> with my_sample_table as (
      2    select xmltype('
      3    MONDAY
      4    TUESDAY
      5    WEDNESDAY
      6    TUESDAY
      7    FRIDAY
      8    SATURDAY
      9    SUNDAY
     10  ') xmldoc
     11    from dual
     12  )
     13  select x.*
     14  from my_sample_table t
     15     , xmltable(
     16        '$d/days/day'
     17        passing t.xmldoc as "d"
     18        columns day varchar2(30) path 'if (string-length(.)>6) then lower-case(.) else (.)'
     19       ) x
     20  ;
    
    DAY
    ------------------------------
    MONDAY
    tuesday
    wednesday
    tuesday
    FRIDAY
    saturday
    SUNDAY
    
    7 rows selected
     
    

    Do you know what could be the problem here?

    Please post an example of XML document.

  • r beeb used before on pc. The problem is that these two PCs are thrown NAWL avay chrased long, I hava a few photos on the program and its impossible to buy a new number for one that oldc product. What should do?

    r beeb used before on pc. The problem is that these two PCs are thrown NAWL avay chrased long, I hava a few photos on the program and its impossible to buy a new number for one that oldc product. What should do?

    If you have the serial number, you can contact the Adobe Support via chat (when they are available - not weekend) and ask them to reset your activations.  Which will allow you to reinstall and activate again using the serial number, which you have now.

    To the link below, click on the still need help? the option in the blue box below and choose the option to chat...
    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Serial number and activation support (non - CC) chat
    https://helpx.Adobe.com/contact.html?step=PHSP-PHXS_downloading-installing-setting-up_lice nsing-activation_stillNeedHelp

  • Is possible to write the INSERT statement that fills two columns: 'word' and 'sense' of the file text with multiple lines - in each line is followed word that is the meaning?

    Is possible to write the INSERT statement that fills two columns: 'word' and 'sense' of the file text with multiple lines - in each line is followed word that is the meaning?

    Hello

    2796614 wrote:

    Is possible to write the INSERT statement that fills two columns: 'word' and 'sense' of the file text with multiple lines - in each line is followed word that is the meaning?

    Of course, it is possible.  According to what the text file looks like to, you can create an external table that treats the text file as if it were a table.  Otherwise, you can always read the file in PL/SQL, using the utl_file package and INSERT of PL/SQL commands.

    You have problems whatever you wantt?  If so, your zip code and explain what the problem is.

    Whenever you have any questions, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the exact results you want from these data, so that people who want to help you can recreate the problem and test their ideas.  In this case, also post a small sample of the text involved file.

    If you ask about a DML operation, such as INSERT, then INSERT statements, you post should show what looks like the tables before the DML, and the results will be the content of the table changed after the DML.

    Explain, using specific examples, how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: Re: 2. How can I ask a question on the forums?

  • I need the BACK window that says

    I need the DOS window that says something like: change to new lr3 develop, this picture, everybody, see the difference, do not show this window.

    I checked the button everything and then do not show this window.

    Well well, in the following folder it only applied to an image, but not all, so I need the rear window origin.

    can someone tell me how?

    Thank you all very much.

    Preferences > General > reset all WARNING should help dialog boxes.

  • Get separate paths and the depth attribute value using the XQuery function

    Hi otn.
    I want to write the function XQuery that accept the following input document nodes.

    < counter Root = "8" >
    < has counter = "3" >
    < meter B '2' = >
    < C meter = "1" >
    < meter D = "1" / >
    / < C >
    < /B >
    < C meter = "2" >
    < counter E = "1" / >
    / < C >
    < /A >
    < meter B = "4" >
    < C meter = "3" / >
    < /B >
    < C meter = "6" >
    < counter E = "3" / >
    < counter D '2' = >
    < counter E = "1" / >
    / < d: >
    / < C >
    < meter D = "2" / >
    < counter E = "4" >
    < counter F = "1" / >
    < /E >
    < counter F = "1" / >
    < / root >

    Then returns many things at the same time as follows:
    1 - list of all of the separate paths
    2 - meter of the depth of each path element attribute value
    3 - the value of the previous counter in 2, is divided by the value of the attribute root counter.

    Thanks in advance :)))

    I'm sorry that not all xml input data correctly.

    You must use the {code} tag to enclose the code snippets. Formatting will be preserved and content not interpreted by the forum software.

    
      
       
        
         
        
       
       
        
       
      
      
       
      
      
       
       
        
       
      
      
      
       
      
      
    
    

    Here's an XQuery query that should work:

    declare function local:list-paths($d as element())
    as element()*
    {
      let $root := name($d)
      let $rootcnt := xs:integer($d/@counter)
      for $i in $d/descendant::*
      return element path
      {
        attribute value {
          substring-after(
            string-join(
              for $j in $i/ancestor-or-self::*
              return name($j)
            , "/"
            )
          , $root
          )
        }
      , attribute counter {$i/@counter}
      , attribute percentage {xs:integer($i/@counter) div $rootcnt}
      }
    };
    
  • Pavilion p7 - 1227c needs the network drivers that work with Windows 2008 server R2

    I bought this new Pavilion P7 - 1227C at Costco so that I can install Windows Server 2008 r2 with Hyper-V role

    I managed to install Windows 2008 server but unable to t the wireless or ethernet to work.  I tried to use the driver 64 bit Windows 7 without success.

    I think return Costco if I can't get the network driver that will work with Windows 2008 Server R2

    Thanks, in advance.

    Tour37

    Hi Paul,.

    Thanks for the link, I was able to download AR816X_V.0.14.15_WHQL.

    The driver works for Windows 2008 Server R2.  I just need to find the drivers for the wireless card.

    Best regards

    Round 37

  • Games like solitaire, free cell, hearts, etc. accidentally has been removed from my computer. When I go into Control Panel, add or remove windows, windows components, I need the floppy disk that I don't have. Any ideas how I can get these games back?

    I have windows xp service pack 3 and internet explorer 7

    Hi dollarsfor6,

     

    Welcome to Microsoft Answers Forums.

    In most cases if the games are deleted from the computer files will remain on the computer.

    I suggest that you are looking for game files in the system32 folder.

    Click on Start menu later click on run and type c:\\windows\system32 in the following search of the window for the file of games like free cell. If you get the files in the system32 folder then copy the file to c:\\program files\start menu\ later in the game folder.

    If fails it above step, try a system restore to the point when the game was available on the computer.

    See the link below to learn how to perform the system restore.

    How to restore Windows XP to a previous state

    http://support.Microsoft.com/kb/306084

    If the fail of steps above, you will need the Windows XP CD to install games on the computer, check out the link for more information below.

    How do I add or remove games in Windows XP

    http://support.Microsoft.com/kb/307768

    Halima S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • The only function that my mouse is scrolling pages or items on the desktop

    -Very well, so I start the computer and everything seems fine, but after a few seconds after that I get on the desktop, my mouse stops moving. After that when I try and move the mouse just as it is to scroll the page in my browser, or highlight items on my desktop. The last time something like this happened he turns out to be just the button toggle the mouse, but I tried that several times and he did nothing, or at least it lets move me the mouse for a fraction of a second before stopping again. I don't know what could be the problem. Another detail on the computer, is that it is also touch screen compatible. I hope someone can help out me.

    type msinfo32 in the run box and check SMBIOS version.and go to Toshiba website and download the latest bios, or help, you can call Toshiba technical support

  • Sort order, that I need the analytical functions?

    Hello

    The table structure is

    create the table test_order as
    (
    Ename varchar2 (100),
    Qno number,
    date of QDate
    );

    Data in it looks like

    ENAME QNO QDATE
    Laura 123 1/8/2009 10:00
    Alfred 234 1/8/2009 11:00
    Charles 435 1/8/2009 11:01
    Alfred 456 1/8/2009 11:03
    Laura 354 1/8/2009 14:00
    Charles 565 1/8/2009 15:00


    And the output should be the slot order

    ENAME QNO QDATE
    Laura 123 1/8/2009 10:00
    Laura 354 1/8/2009 14:00
    Alfred 234 1/8/2009 11:00
    Alfred 456 1/8/2009 11:03
    Charles 435 1/8/2009 11:01
    Charles 565 1/8/2009 15:00

    It should be sorted by qdate, but names should meet.
    in the opposite case
    grouped by ename, but sorted by time qdate - the oldest use this ename.

    All solutions?

    Thanks in advance.
    SQL> create table test_order
      2  (
      3  ename varchar2(100),
      4  qno number,
      5  qdate date
      6  );
    
    Table created.
    
    SQL> insert into test_order values ('Laura', 123, to_date('1/8/2009 10:00:00 AM','dd/mm/yyyy hh:mi:ss am'));
    
    1 row created.
    
    SQL> insert into test_order values ('Alfred', 234, to_date('1/8/2009 11:00:00 AM','dd/mm/yyyy hh:mi:ss am'));
    
    1 row created.
    
    SQL> insert into test_order values ('Charles', 435, to_date('1/8/2009 11:01:00 AM','dd/mm/yyyy hh:mi:ss am'));
    
    1 row created.
    
    SQL> insert into test_order values ('Alfred', 456, to_date('1/8/2009 11:03:00 AM','dd/mm/yyyy hh:mi:ss am'));
    
    1 row created.
    
    SQL> insert into test_order values ('Laura', 354, to_date('1/8/2009 2:00:00 PM','dd/mm/yyyy hh:mi:ss am'));
    
    1 row created.
    
    SQL> insert into test_order values ('Charles', 565, to_date('1/8/2009 3:00:00 PM','dd/mm/yyyy hh:mi:ss am'));
    
    1 row created.
    
    SQL> select ename
      2       , qno
      3       , qdate
      4    from test_order
      5   order by min(qdate) over (partition by ename)
      6       , qdate
      7  /
    
    ENAME             QNO QDATE
    ---------- ---------- -------------------
    Laura             123 01-08-2009 10:00:00
    Laura             354 01-08-2009 14:00:00
    Alfred            234 01-08-2009 11:00:00
    Alfred            456 01-08-2009 11:03:00
    Charles           435 01-08-2009 11:01:00
    Charles           565 01-08-2009 15:00:00
    
    6 rows selected.
    

    Kind regards
    Rob.

  • allocate memory and call the dll function that writes to the pointer

    Hello!

    I have a DLL that has a function as in the following example, I need to call from labview. In C, I need to allocate memory for data and of course the struct. I add the pointer and the length of the data to the struct and call the function with the struct. The function itself inserts values of the struct and affected memory. Someone at - it a working solution how this can be done with Labview?

    typedef struct Thestruct
    {
    UINT16 val1;
    UINT8 val2;
    UINT8 val3;
    DataLength UINT16;
    UINT8 * data;
    } T_Thestruct;

    MY_API status MY_API_CALL udaReceive (handle, T_Thestruct * args);

    I tried in labview (see photo), but I only got values inside the structure as well as the 1097 error, reserved memory included values as before.

    OK, I found the soluton to my own problem. Alignment on the struct must be corrected in Labview. There must be a value between dataLength 2Bytes dummy and the pointer.

  • Can we get all the contacts that are in the Blackberry phone using the PIM functionality that is, JSR 75?

    Hello guys,.

    I need to develop an application that should support devices such as the Bold 9700 and Pearl, Storm, Blackberry Curve 8900. If I go for j2me / MIDP, what will be the limits that I face in blackberry? Is it recommended to go for j2me or device-specific development of RIM.

    Can we get all contacts into the Blackberry phone using PIM JSR 75 i.e and other native features features if developing an application in j2me for blackberry. I guess that the user interface will be completely different, but we support all the controls that supports the JDE?

    Is someone can you please tell me if I can get access to all contacts present in the Blackberry phone using 'javax.microedition.pim' API - that is not specific to the RIM. Has anyone tried this one virtually on the phone or emulator?

    Y at - it something like a website where I can test my application on Blackberry devices as in the Nokia Forum Sites?

    Thanks in advance.

    Kind regards

    Raki

    JSR75 is supported

    However, there are some extensions specific "Blackberry" for the base PIM classes. These add a few extension Blackberry PIM data. I think that you can only use the JSR 75 classes as long as you don't need BB extensions.

    For the test, the development environment provides the device simulators.

  • How to create the javaScript function that erases the text of the field values

    Hello
    How can I create a javaScript function to clear the values of the text fields
    and I want to call this function on the clear button on my custom area

    Yes it is possible but not recommended approach.

    Here is the link that you can use if you want to implement using javascript
    http://www.itechies.NET/tutorials/JScript/jsexample.php-PID-set_field.htm

    Thank you
    AJ

  • (Bug)  Function that is called on the authenticationSuccess parameter is called several times

    < rtc:AdobeHSAuthenticator id = "auth" authenticationKey = '{authToken}' protocol = "rtmfp" authenticationSuccess = "onAuthSuccess (); "authenticationFailure ="onAuthFailure (event); "/ >

    The onAuthSuccess() function that is called at all times

    Hi Ashish,

    Can you give us the smallest possible complete app that reproduces it

    question? I just built a simple and it worked.

    Thank you

    Nigel

  • Is there an easy way to compare two null columns?

    I need to compare a large number of columns between the records from two tables for data conversion. I really need a comparison that returns true if: 1) the two columns are null; or (2) the two columns are not null and equal. I want him to return false if: 3) a column is set to null and the other isn't. or (4) the two columns are not null and are not equal. I'm trying to find the records which are not exact matches.

    I found the documentation for oracle-www.m-base.org/Sounds.html on the SYS_OP_MAP_NONNULL function that would do what I want, but I don't want to use it because it's an undocumented feature and my code will be in production for a period of time.

    I don't want to use a construction like this for each column that I compare:
    (
         (
              a.col is null
              and b.col is null
         )
         or (
              a.col = b.col
         )
    )
    Also, I don't know about the NVL function, but I compare columns that are entered by users, and I'm not comfortable, because these values could actually exist in the data of all NULL values.

    Hello

    Kiran says:
    where 1 = decode (coalesce(a.col,b.col), null, 1, decode (a.col, b.col, 1, 0))

    Or

    WHERE   1 = DECODE (a.col, b.col, 1)
    

Maybe you are looking for

  • Need a new disc of recovery for Satellite L300D

    My grandson got a Satellite L300D for Christmas and lost the recovery disk that came with it... He now has a problem where the laptop does not start and the drive needs. Anyone know where I can download one or get a new one. I would try to repair the

  • FN keys do not work on Satellite L10 - 103

    Hello I have a problem whit my fn keys.the problem is.My fn keys are not working properly, some work, some don't. and those who are not against hepatitis has the little sign on the screen.I have a Toshiba Satellite L10 103 Sorry for my bad EnglishI h

  • HP Notebook: HP laptop turns is not on / boot the system.

    I have a HP laptop and every time I turn on the HP logo comes on, but after seconds, the screen goes off and then returned to the logo and so on. I tried everything, remove the battery, turning on/off, closing the display, retrieve the BIOS, etc.. PS

  • Como reiniciar impresion trabajos administrator

    Trato print documents are only tells me that no you can print because no is pueden ver las propiedades del servidor. El servicio local impresion trabajos Administrator without be esta ejecutando, reiniciar el o el equipo administrator. No to como to

  • HP ENVY 15 Notebook PC G0T55AV: HP ENVY 15 t-k000 CTO Notebook PC (ENERGY STAR)

    One of my biggest complaints about this laptop is that pressing a key of function (F1-F12) by itself accomplishes what is the picture on it. For example, if I wanted to use a function key to do something like the open dialog box the "save under" in M